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:
Miriam Baglioni 2020-11-03 16:57:01 +01:00
parent cbbb1bdc54
commit 7d2eda43ca
2 changed files with 13 additions and 2 deletions

View File

@ -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();
}

View File

@ -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
}
]