Skip to content

Commit

Permalink
IJMP-1813 new structure of kotlin sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
Dedo4k authored and KUGDev committed Sep 18, 2024
1 parent 7bfc34f commit 1917116
Show file tree
Hide file tree
Showing 243 changed files with 6,134 additions and 870 deletions.
2 changes: 1 addition & 1 deletion .idea/copyright/kotlinsdk.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion .run/Package Kotlin SDK.run.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<!-- Copyright (c) 2024 IBA Group. -->
<!-- -->
<!-- This program and the accompanying materials are made available under the terms of the -->
<!-- Eclipse Public License v2.0 which accompanies this distribution, and is available at -->
<!-- https://www.eclipse.org/legal/epl-v20.html -->
<!-- -->
<!-- SPDX-License-Identifier: EPL-2.0 -->
<!-- -->
<!-- Contributors: -->
<!-- IBA Group -->
<!-- Zowe Community -->

<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Package Kotlin SDK" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
Expand All @@ -21,4 +33,4 @@
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>
</component>
12 changes: 11 additions & 1 deletion .run/Run integration tests.run.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
<!-- Copyright © 2020 IBA Group, a.s. All rights reserved. Use of this source code is governed by Eclipse Public License – v 2.0 that can be found at: https://www.eclipse.org/legal/epl-2.0/ -->
<!-- Copyright (c) 2024 IBA Group. -->
<!-- -->
<!-- This program and the accompanying materials are made available under the terms of the -->
<!-- Eclipse Public License v2.0 which accompanies this distribution, and is available at -->
<!-- https://www.eclipse.org/legal/epl-v20.html -->
<!-- -->
<!-- SPDX-License-Identifier: EPL-2.0 -->
<!-- -->
<!-- Contributors: -->
<!-- IBA Group -->
<!-- Zowe Community -->

<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run integration tests" type="GradleRunConfiguration" factoryName="Gradle">
Expand Down
14 changes: 13 additions & 1 deletion .run/Run unit tests.run.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<!-- Copyright (c) 2024 IBA Group. -->
<!-- -->
<!-- This program and the accompanying materials are made available under the terms of the -->
<!-- Eclipse Public License v2.0 which accompanies this distribution, and is available at -->
<!-- https://www.eclipse.org/legal/epl-v20.html -->
<!-- -->
<!-- SPDX-License-Identifier: EPL-2.0 -->
<!-- -->
<!-- Contributors: -->
<!-- IBA Group -->
<!-- Zowe Community -->

<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run unit tests" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
Expand All @@ -20,4 +32,4 @@
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>
</component>
12 changes: 12 additions & 0 deletions dokka/assets/logo-styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/* Copyright (c) 2024 IBA Group. */
/* */
/* This program and the accompanying materials are made available under the terms of the */
/* Eclipse Public License v2.0 which accompanies this distribution, and is available at */
/* https://www.eclipse.org/legal/epl-v20.html */
/* */
/* SPDX-License-Identifier: EPL-2.0 */
/* */
/* Contributors: */
/* IBA Group */
/* Zowe Community */

.library-name a {
position: relative;
}
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) 2024 IBA Group.
#
# Copyright (c) 2020-2024 IBA Group.
#
Expand Down
12 changes: 12 additions & 0 deletions gradle/bootstrap/bootstrap_gradlew.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#!/usr/bin/env sh

# Copyright (c) 2024 IBA Group.
#
# This program and the accompanying materials are made available under the terms of the
# Eclipse Public License v2.0 which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# IBA Group
# Zowe Community

if [ ! -f gradle/wrapper/gradle-wrapper.jar ]; then
echo "Gradle Wrapper not found. Attempting to download..."
curl --silent --output gradle/wrapper/gradle-wrapper.jar \
Expand Down
12 changes: 12 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Copyright (c) 2024 IBA Group.
#
# This program and the accompanying materials are made available under the terms of the
# Eclipse Public License v2.0 which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# IBA Group
# Zowe Community

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
Expand Down
20 changes: 8 additions & 12 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
#!/bin/sh

# Copyright (c) 2024 IBA Group.
#
# Copyright © 2015-2021 the original authors.
# This program and the accompanying materials are made available under the terms of the
# Eclipse Public License v2.0 which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-v20.html
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# IBA Group
# Zowe Community

##############################################################################
#
Expand Down
3 changes: 1 addition & 2 deletions src/intTest/kotlin/common/BaseTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@

package common

import org.zowe.kotlinsdk.BytesConverterFactory
import okhttp3.Credentials
import okhttp3.OkHttpClient
import org.zowe.kotlinsdk.BytesConverterFactory
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import java.lang.Exception
import java.security.SecureRandom
import java.security.cert.CertificateException
import java.security.cert.X509Certificate
Expand Down
4 changes: 2 additions & 2 deletions src/intTest/kotlin/common/CancelJobAndPurgeOutputTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

package common

import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.zowe.kotlinsdk.CancelJobPurgeOutRequest
import org.zowe.kotlinsdk.JESApi
import org.zowe.kotlinsdk.ProcessMethod
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import retrofit2.Call
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
Expand Down
4 changes: 2 additions & 2 deletions src/intTest/kotlin/common/CancelJobTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

package common

import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.zowe.kotlinsdk.CancelJobRequest
import org.zowe.kotlinsdk.CancelJobRequestBody
import org.zowe.kotlinsdk.JESApi
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import retrofit2.Call
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
Expand Down
2 changes: 1 addition & 1 deletion src/intTest/kotlin/common/DataAPITest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*/
package common

import org.zowe.kotlinsdk.*
import org.junit.jupiter.api.Test
import org.zowe.kotlinsdk.*


class DataAPITest {
Expand Down
2 changes: 1 addition & 1 deletion src/intTest/kotlin/common/HoldJobFor10sThenReleaseTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

package common

import org.zowe.kotlinsdk.*
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.zowe.kotlinsdk.*
import retrofit2.Call
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
Expand Down
5 changes: 4 additions & 1 deletion src/intTest/kotlin/common/ListFilteredJobsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@

package common

import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import org.junit.jupiter.api.Timeout
import org.zowe.kotlinsdk.JESApi
import org.zowe.kotlinsdk.Job
import org.junit.jupiter.api.*
import retrofit2.Call
import java.util.concurrent.TimeUnit
import java.util.regex.Pattern
Expand Down
4 changes: 2 additions & 2 deletions src/intTest/kotlin/common/ListSpoolFilesTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

package common

import org.zowe.kotlinsdk.JESApi
import org.zowe.kotlinsdk.SpoolFile
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import org.zowe.kotlinsdk.JESApi
import org.zowe.kotlinsdk.SpoolFile
import retrofit2.Call

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
Expand Down
6 changes: 3 additions & 3 deletions src/intTest/kotlin/common/ObtainJobStatusTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

package common

import org.zowe.kotlinsdk.JESApi
import org.zowe.kotlinsdk.Job
import org.zowe.kotlinsdk.UseStepData
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import org.zowe.kotlinsdk.JESApi
import org.zowe.kotlinsdk.Job
import org.zowe.kotlinsdk.UseStepData
import retrofit2.Call

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
Expand Down
6 changes: 3 additions & 3 deletions src/intTest/kotlin/common/SpoolFileRecordsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
*/
package common

import org.zowe.kotlinsdk.BinaryMode
import org.zowe.kotlinsdk.JESApi
import org.zowe.kotlinsdk.RecordRange
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import org.zowe.kotlinsdk.BinaryMode
import org.zowe.kotlinsdk.JESApi
import org.zowe.kotlinsdk.RecordRange
import retrofit2.Call

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
Expand Down
4 changes: 2 additions & 2 deletions src/intTest/kotlin/common/SubmitJobRequestTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

package common

import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.zowe.kotlinsdk.JESApi
import org.zowe.kotlinsdk.SubmitFileNameBody
import org.zowe.kotlinsdk.SubmitJobRequest
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import retrofit2.Call
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
Expand Down
2 changes: 1 addition & 1 deletion src/intTest/kotlin/common/TsoApiTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

package common

import org.zowe.kotlinsdk.*
import org.junit.jupiter.api.Test
import org.zowe.kotlinsdk.*

class TsoApiTest: BaseTest() {

Expand Down
11 changes: 8 additions & 3 deletions src/intTest/kotlin/common/ZoweConfigParsingTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@

package common

import okhttp3.OkHttpClient
import okhttp3.mockwebserver.MockWebServer
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import org.zowe.kotlinsdk.DataAPI
import org.zowe.kotlinsdk.zowe.config.*
import okhttp3.OkHttpClient
import org.junit.jupiter.api.*
import org.zowe.kotlinsdk.zowe.config.KeytarWrapper
import org.zowe.kotlinsdk.zowe.config.ZoweConfig
import org.zowe.kotlinsdk.zowe.config.getAuthEncoding
import org.zowe.kotlinsdk.zowe.config.withBasicPrefix

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class ZoweConfigParsingTest() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package org.zowe.kotlinsdk

import okhttp3.MediaType
import okhttp3.RequestBody
import okhttp3.ResponseBody
import retrofit2.Converter
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/org/zowe/kotlinsdk/DataAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@

package org.zowe.kotlinsdk

import okhttp3.ResponseBody
import org.zowe.kotlinsdk.annotations.AvailableSince
import org.zowe.kotlinsdk.annotations.ZVersion
import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.http.*

interface DataAPI {

@AvailableSince(ZVersion.ZOS_2_1)
@GET("zosmf/restfiles/ds")
fun listDataSets(
fun listDataSets(
@Header("Authorization") authorizationToken: String,
@Header("X-IBM-Attributes") xIBMAttr: XIBMAttr = XIBMAttr(),
@Header("X-IBM-Max-Items") xIBMMaxItems: Int = 0,
Expand Down
1 change: 0 additions & 1 deletion src/main/kotlin/org/zowe/kotlinsdk/JESApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import org.zowe.kotlinsdk.annotations.AvailableSince
import org.zowe.kotlinsdk.annotations.ZVersion
import retrofit2.Call
import retrofit2.http.*
import java.lang.IllegalArgumentException

interface JESApi {

Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/org/zowe/kotlinsdk/ServiceAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ package org.zowe.kotlinsdk
import org.zowe.kotlinsdk.annotations.AvailableSince
import org.zowe.kotlinsdk.annotations.ZVersion
import retrofit2.Call
import retrofit2.http.*
import retrofit2.http.Body
import retrofit2.http.PUT

interface ServiceAPI {

Expand Down
13 changes: 4 additions & 9 deletions src/main/kotlin/org/zowe/kotlinsdk/UnsafeOkHttpClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,14 @@
package org.zowe.kotlinsdk

import okhttp3.OkHttpClient
import java.lang.Exception
import javax.net.ssl.TrustManager
import javax.net.ssl.X509TrustManager
import kotlin.Throws
import javax.net.ssl.SSLContext
import javax.net.ssl.SSLSocketFactory
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.SSLSession
import java.lang.RuntimeException
import java.security.SecureRandom
import java.security.cert.CertificateException
import java.security.cert.X509Certificate
import java.time.Duration
import javax.net.ssl.SSLContext
import javax.net.ssl.SSLSession
import javax.net.ssl.TrustManager
import javax.net.ssl.X509TrustManager

object UnsafeOkHttpClient {
// Create a trust manager that does not validate certificate chains
Expand Down
Loading

0 comments on commit 1917116

Please sign in to comment.