added new non mandatory property publish to determine if to publish the upload or leave it pending. Default value flase
This commit is contained in:
parent
cbbb1bdc54
commit
7d2eda43ca
|
@ -42,6 +42,10 @@ public class SendToZenodoHDFS implements Serializable {
|
|||
final String concept_rec_id = Optional
|
||||
.ofNullable(parser.get("conceptRecordId"))
|
||||
.orElse(null);
|
||||
final Boolean publish = Optional
|
||||
.ofNullable(parser.get("publish"))
|
||||
.map(Boolean::valueOf)
|
||||
.orElse(false);
|
||||
|
||||
final String depositionId = Optional.ofNullable(parser.get("depositionId")).orElse(null);
|
||||
final String communityMapPath = parser.get("communityMapPath");
|
||||
|
@ -96,7 +100,8 @@ public class SendToZenodoHDFS implements Serializable {
|
|||
}
|
||||
|
||||
zenodoApiClient.sendMretadata(metadata);
|
||||
zenodoApiClient.publish();
|
||||
if (publish)
|
||||
zenodoApiClient.publish();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -53,5 +53,11 @@
|
|||
"paramLongName":"metadata",
|
||||
"paramDescription": "metadata associated to the deposition",
|
||||
"paramRequired": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"paramName":"p",
|
||||
"paramLongName":"publish",
|
||||
"paramDescription": "if to publish the upload",
|
||||
"paramRequired": false
|
||||
}
|
||||
]
|
Loading…
Reference in New Issue