-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pivotal ID # 188131969: Archieve submission request (#868)
https://www.pivotaltracker.com/story/show/188131969 - added archieve rest operation
- Loading branch information
Showing
19 changed files
with
393 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 20 additions & 4 deletions
24
client/bio-webclient/src/main/kotlin/ac/uk/ebi/biostd/client/api/SubmissionRequestClient.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,35 @@ | ||
package ac.uk.ebi.biostd.client.api | ||
|
||
import ac.uk.ebi.biostd.client.integration.web.SubmissionRequestOperations | ||
import ebi.ac.uk.commons.http.ext.getForObject | ||
import ebi.ac.uk.model.RequestStatus | ||
import kotlinx.coroutines.reactive.awaitSingle | ||
import org.springframework.web.reactive.function.client.WebClient | ||
import org.springframework.web.reactive.function.client.awaitBody | ||
|
||
private const val SUBMISSION_REQUEST_URL = "/submissions/requests" | ||
|
||
class SubmissionRequestClient( | ||
private val client: WebClient, | ||
) : SubmissionRequestOperations { | ||
override fun getSubmissionRequestStatus( | ||
override suspend fun getSubmissionRequestStatus( | ||
accNo: String, | ||
version: Int, | ||
): RequestStatus { | ||
return client.getForObject("$SUBMISSION_REQUEST_URL/$accNo/$version/status") | ||
): RequestStatus = | ||
client | ||
.post() | ||
.uri("$SUBMISSION_REQUEST_URL/$accNo/$version/status") | ||
.retrieve() | ||
.awaitBody<RequestStatus>() | ||
|
||
override suspend fun archiveSubmissionRequest( | ||
accNo: String, | ||
version: Int, | ||
) { | ||
client | ||
.post() | ||
.uri("$SUBMISSION_REQUEST_URL/$accNo/$version/archive") | ||
.retrieve() | ||
.bodyToMono(Void::class.java) | ||
.awaitSingle() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
commons/commons-test/src/main/kotlin/ebi/ac/uk/db/DatabaseConstants.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...otlin/ac/uk/ebi/biostd/persistence/doc/db/data/SubmissionRequestFilesDocDataRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ac.uk.ebi.biostd.persistence.doc.db.data | ||
|
||
import ac.uk.ebi.biostd.persistence.doc.db.reactive.repositories.SubmissionRequestFilesRepository | ||
|
||
class SubmissionRequestFilesDocDataRepository( | ||
private val submissionRequestFilesRepository: SubmissionRequestFilesRepository, | ||
) : SubmissionRequestFilesRepository by submissionRequestFilesRepository |
Oops, something went wrong.