Added UNPULISH Operation in the Default3PhaseManager

This commit is contained in:
Francesco Mangiacrapa 2023-03-01 17:35:44 +01:00
parent 1431a06171
commit 9c9bd0b382
1 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,7 @@ import org.gcube.application.geoportal.common.utils.Files;
import com.vdurmont.semver4j.Semver;
import SimpleLifeCycleManager.Phases;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@ -37,11 +38,13 @@ public class Default3PhaseManager extends SimpleLifeCycleManager implements Life
public static final OperationDescriptor SUBMIT=new OperationDescriptor("SUBMIT-FOR-REVIEW","Submits the Draft for reviewing");
public static final OperationDescriptor REJECT=new OperationDescriptor("REJECT-DRAFT","Rejects the submitted Draft");
public static final OperationDescriptor APPROVE=new OperationDescriptor("APPROVE-SUBMITTED","Approves the submitted Draft");
public static final OperationDescriptor UNPUBLISH = new OperationDescriptor("UNPUBLISH","UnPublish the project. DeMaterialize and DeIndex the project");
static {
SUBMIT.setAppliableToPhases(Collections.singletonList(LifecycleInformation.CommonPhases.DRAFT_PHASE));
REJECT.setAppliableToPhases(Collections.singletonList(Phases.PENDING_APPROVAL));
APPROVE.setAppliableToPhases(Collections.singletonList(Phases.PENDING_APPROVAL));
UNPUBLISH.setAppliableToPhases(Collections.singletonList(Phases.PUBLISHED));
}
}