use of com.odysseusinc.arachne.portal.service.impl.submission.SubmissionAction in project ArachneCentralAPI by OHDSI.
the class BaseSubmissionServiceImpl method getPublishAction.
protected SubmissionAction getPublishAction(Submission submission) {
SubmissionAction publishAction = new SubmissionAction(PUBLISH.name());
publishAction.setAvailable(Arrays.asList(EXECUTED, FAILED, IN_PROGRESS).contains(submission.getStatus()));
switch(submission.getStatus()) {
case EXECUTED_PUBLISHED:
case FAILED_PUBLISHED:
publishAction.setResult(true);
break;
case EXECUTED_REJECTED:
case FAILED_REJECTED:
publishAction.setResult(false);
break;
default:
publishAction.setResult(null);
break;
}
return publishAction;
}
Aggregations