-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP * Better return type for submitForReview * Fix submitForReview
- Loading branch information
1 parent
fbf3520
commit 8c1a541
Showing
6 changed files
with
75 additions
and
4 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
34 changes: 34 additions & 0 deletions
34
examples/src/main/java/nl/knaw/dans/lib/dataverse/example/DatasetSubmitForReview.java
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,34 @@ | ||
/* | ||
* Copyright (C) 2021 DANS - Data Archiving and Networked Services ([email protected]) | ||
* | ||
* 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 | ||
* | ||
* http://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. | ||
*/ | ||
package nl.knaw.dans.lib.dataverse.example; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import nl.knaw.dans.lib.dataverse.DataverseResponse; | ||
import nl.knaw.dans.lib.dataverse.ExampleBase; | ||
import nl.knaw.dans.lib.dataverse.model.dataset.DatasetPublicationResult; | ||
import nl.knaw.dans.lib.dataverse.model.dataset.SubmitForReviewResult; | ||
|
||
@Slf4j | ||
public class DatasetSubmitForReview extends ExampleBase { | ||
|
||
public static void main(String[] args) throws Exception { | ||
String persistentId = args[0]; | ||
DataverseResponse<SubmitForReviewResult> r = client.dataset(persistentId).submitForReview(); | ||
log.info("Response message: {}", r.getEnvelopeAsJson().toPrettyString()); | ||
log.info("In Review?: {}", r.getData().getInReview()); | ||
log.info("Message: {}", r.getData().getMessage()); | ||
} | ||
} |
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
24 changes: 24 additions & 0 deletions
24
lib/src/main/java/nl/knaw/dans/lib/dataverse/model/dataset/SubmitForReviewResult.java
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,24 @@ | ||
/* | ||
* Copyright (C) 2021 DANS - Data Archiving and Networked Services ([email protected]) | ||
* | ||
* 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 | ||
* | ||
* http://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. | ||
*/ | ||
package nl.knaw.dans.lib.dataverse.model.dataset; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class SubmitForReviewResult { | ||
private Boolean inReview; | ||
private String message; | ||
} |
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