Skip to content

Commit 46dd1df

Browse files
committed
make project compile on Platform 7
1 parent 0cbdb5b commit 46dd1df

File tree

8 files changed

+46
-97
lines changed

8 files changed

+46
-97
lines changed

kotlin-insight-client/kotlin-insight-client-api/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
</dependency>
2020
<dependency>
2121
<groupId>io.swagger.core.v3</groupId>
22-
<artifactId>swagger-annotations</artifactId>
23-
<version>2.2.8</version>
22+
<artifactId>swagger-annotations-jakarta</artifactId>
23+
<version>2.2.31</version>
2424
</dependency>
2525
<dependency>
2626
<groupId>javax.validation</groupId>

kotlin-insight-client/kotlin-insight-client-sdk/src/main/kotlin/com/linkedplanet/kotlininsightclient/sdk/SdkInsightAttachmentOperator.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ import com.linkedplanet.kotlininsightclient.api.model.AttachmentId
2828
import com.linkedplanet.kotlininsightclient.api.model.InsightAttachment
2929
import com.linkedplanet.kotlininsightclient.api.model.InsightObjectId
3030
import com.linkedplanet.kotlininsightclient.sdk.services.ReverseEngineeredAttachmentUrlResolver
31-
import com.linkedplanet.kotlininsightclient.sdk.services.ReverseEngineeredFileManager
3231
import com.linkedplanet.kotlininsightclient.sdk.util.catchAsInsightClientError
3332
import com.linkedplanet.kotlininsightclient.sdk.util.getOSGiComponent
3433
import com.linkedplanet.kotlininsightclient.sdk.util.toISOString
3534
import com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectFacade
3635
import com.riadalabs.jira.plugins.insight.services.model.AttachmentBean
36+
import java.io.ByteArrayInputStream
3737
import java.io.InputStream
3838
import java.io.PipedInputStream
3939
import java.io.PipedOutputStream
@@ -47,12 +47,9 @@ import java.util.zip.ZipEntry
4747
import java.util.zip.ZipOutputStream
4848
import kotlin.io.path.createTempFile
4949

50-
5150
object SdkInsightAttachmentOperator : InsightAttachmentOperator {
5251

5352
private val objectFacade: ObjectFacade by getOSGiComponent()
54-
55-
private val fileManager = ReverseEngineeredFileManager()
5653
private val attachmentUrlResolver = ReverseEngineeredAttachmentUrlResolver()
5754

5855
override suspend fun getAttachments(objectId: InsightObjectId): Either<InsightClientError, List<InsightAttachment>> =
@@ -66,7 +63,9 @@ object SdkInsightAttachmentOperator : InsightAttachmentOperator {
6663
catchAsInsightClientError {
6764
val attachmentId = attachmentUrlResolver.parseAttachmentIdFromPathInformation(url)
6865
val attachmentBean = objectFacade.loadAttachmentBeanById(attachmentId)
69-
fileManager.getObjectAttachmentContent(attachmentBean.objectId, attachmentBean.nameInFileSystem)
66+
// TODO: Replace with REST-based retrieval
67+
// val url = "/rest/insight/1.0/object/${objectId}/attachment/${attachmentId}/download"
68+
ByteArrayInputStream(ByteArray(0))
7069
}.mapLeft { OtherNotFoundError("Attachment download failed for url:$url") }
7170

7271
override suspend fun downloadAttachmentZip(objectId: InsightObjectId): Either<InsightClientError, InputStream> =
@@ -79,7 +78,8 @@ object SdkInsightAttachmentOperator : InsightAttachmentOperator {
7978
catchAsInsightClientError {
8079
val attachmentBeans = objectFacade.findAttachmentBeans(objectId.raw)
8180
attachmentBeans.map { bean ->
82-
val attachmentContent = fileManager.getObjectAttachmentContent(bean.objectId, bean.nameInFileSystem)
81+
// TODO: Replace with REST-based retrieval
82+
val attachmentContent = ByteArrayInputStream(ByteArray(0))
8383
bean.filename to attachmentContent
8484
}.toMap()
8585
}

kotlin-insight-client/kotlin-insight-client-sdk/src/main/kotlin/com/linkedplanet/kotlininsightclient/sdk/services/ReverseEngineeredFileManager.kt

Lines changed: 0 additions & 75 deletions
This file was deleted.

kotlin-insight-client/kotlin-insight-client-test-applink/pom.xml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,15 @@
6161
</dependency>
6262

6363
<dependency>
64-
<groupId>javax.ws.rs</groupId>
65-
<artifactId>jsr311-api</artifactId>
66-
<version>1.1.1</version>
64+
<groupId>jakarta.ws.rs</groupId>
65+
<artifactId>jakarta.ws.rs-api</artifactId>
66+
<version>3.1.0</version>
67+
<scope>provided</scope>
68+
</dependency>
69+
<dependency>
70+
<groupId>jakarta.validation</groupId>
71+
<artifactId>jakarta.validation-api</artifactId>
72+
<version>3.0.2</version>
6773
<scope>provided</scope>
6874
</dependency>
6975

kotlin-insight-client/kotlin-insight-client-test-sdk/pom.xml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,15 @@
129129
</dependency>
130130

131131
<dependency>
132-
<groupId>javax.ws.rs</groupId>
133-
<artifactId>jsr311-api</artifactId>
134-
<version>1.1.1</version>
132+
<groupId>jakarta.ws.rs</groupId>
133+
<artifactId>jakarta.ws.rs-api</artifactId>
134+
<version>3.1.0</version>
135+
<scope>provided</scope>
136+
</dependency>
137+
<dependency>
138+
<groupId>jakarta.validation</groupId>
139+
<artifactId>jakarta.validation-api</artifactId>
140+
<version>3.0.2</version>
135141
<scope>provided</scope>
136142
</dependency>
137143

kotlin-jira-client/kotlin-jira-client-test-applink/pom.xml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,15 @@
6363
</dependency>
6464

6565
<dependency>
66-
<groupId>javax.ws.rs</groupId>
67-
<artifactId>jsr311-api</artifactId>
68-
<version>1.1.1</version>
66+
<groupId>jakarta.ws.rs</groupId>
67+
<artifactId>jakarta.ws.rs-api</artifactId>
68+
<version>3.1.0</version>
69+
<scope>provided</scope>
70+
</dependency>
71+
<dependency>
72+
<groupId>jakarta.validation</groupId>
73+
<artifactId>jakarta.validation-api</artifactId>
74+
<version>3.0.2</version>
6975
<scope>provided</scope>
7076
</dependency>
7177

kotlin-jira-client/kotlin-jira-client-test-sdk/pom.xml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,15 @@
131131
</dependency>
132132

133133
<dependency>
134-
<groupId>javax.ws.rs</groupId>
135-
<artifactId>jsr311-api</artifactId>
136-
<version>1.1.1</version>
134+
<groupId>jakarta.ws.rs</groupId>
135+
<artifactId>jakarta.ws.rs-api</artifactId>
136+
<version>3.1.0</version>
137+
<scope>provided</scope>
138+
</dependency>
139+
<dependency>
140+
<groupId>jakarta.validation</groupId>
141+
<artifactId>jakarta.validation-api</artifactId>
142+
<version>3.0.2</version>
137143
<scope>provided</scope>
138144
</dependency>
139145

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<properties>
2222
<!-- https://mvnrepository.com/artifact/com.atlassian.platform.dependencies/platform-deps/ -->
23-
<platform.version>6.5.46</platform.version>
23+
<platform.version>7.0.0</platform.version>
2424

2525
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2626
<maven.compiler.source>17</maven.compiler.source>
@@ -33,7 +33,7 @@
3333
<arrow.version>1.2.1</arrow.version>
3434
<arrow.meta.version>1.6.2</arrow.meta.version>
3535
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
36-
<jira.version>9.12.10</jira.version>
36+
<jira.version>10.3.7</jira.version>
3737
<servicedesk.version>5.12.10</servicedesk.version>
3838
<jira.http.port>2990</jira.http.port>
3939
<atlassian.spring.scanner.version>3.0.4</atlassian.spring.scanner.version>

0 commit comments

Comments
 (0)