mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
[DS-2646]: javadoc & SUBMIT_EDIT_METADATA to ProcessingAction
This commit is contained in:
@@ -44,6 +44,10 @@ public abstract class Action {
|
||||
public abstract ActionResult execute(Context c, XmlWorkflowItem wfi, Step step, HttpServletRequest request)
|
||||
throws SQLException, AuthorizeException, IOException, WorkflowException;
|
||||
|
||||
/**
|
||||
* Returns a list of options that the user can select at this action which results in the next step in the workflow
|
||||
* @return A list of options of this action, resulting in the next step of the workflow
|
||||
*/
|
||||
public abstract List<String> getOptions();
|
||||
|
||||
public WorkflowActionConfig getParent() {
|
||||
|
@@ -61,6 +61,10 @@ public class WorkflowActionConfig {
|
||||
return step;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of options the user has on this action, resulting in the next step of the workflow
|
||||
* @return A list of options of this action, resulting in the next step of the workflow
|
||||
*/
|
||||
public List<String> getOptions() {
|
||||
return this.processingAction.getOptions();
|
||||
}
|
||||
|
@@ -35,7 +35,6 @@ public class AcceptEditRejectAction extends ProcessingAction {
|
||||
|
||||
private static final String SUBMIT_APPROVE = "submit_approve";
|
||||
private static final String SUBMIT_REJECT = "submit_reject";
|
||||
private static final String SUBMIT_EDIT_METADATA = "submit_edit_metadata";
|
||||
|
||||
//TODO: rename to AcceptAndEditMetadataAction
|
||||
|
||||
@@ -63,7 +62,7 @@ public class AcceptEditRejectAction extends ProcessingAction {
|
||||
List<String> options = new ArrayList<>();
|
||||
options.add(SUBMIT_APPROVE);
|
||||
options.add(SUBMIT_REJECT);
|
||||
options.add(SUBMIT_EDIT_METADATA);
|
||||
options.add(ProcessingAction.SUBMIT_EDIT_METADATA);
|
||||
return options;
|
||||
}
|
||||
|
||||
|
@@ -33,7 +33,6 @@ import org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItem;
|
||||
public class FinalEditAction extends ProcessingAction {
|
||||
|
||||
private static final String SUBMIT_APPROVE = "submit_approve";
|
||||
private static final String SUBMIT_EDIT_METADATA = "submit_edit_metadata";
|
||||
|
||||
@Override
|
||||
public void activate(Context c, XmlWorkflowItem wf) {
|
||||
@@ -63,7 +62,7 @@ public class FinalEditAction extends ProcessingAction {
|
||||
public List<String> getOptions() {
|
||||
List<String> options = new ArrayList<>();
|
||||
options.add(SUBMIT_APPROVE);
|
||||
options.add(SUBMIT_EDIT_METADATA);
|
||||
options.add(ProcessingAction.SUBMIT_EDIT_METADATA);
|
||||
return options;
|
||||
}
|
||||
|
||||
|
@@ -34,6 +34,7 @@ public abstract class ProcessingAction extends Action {
|
||||
@Autowired(required = true)
|
||||
protected ItemService itemService;
|
||||
|
||||
protected static final String SUBMIT_EDIT_METADATA = "submit_edit_metadata";
|
||||
|
||||
@Override
|
||||
public boolean isAuthorized(Context context, HttpServletRequest request, XmlWorkflowItem wfi) throws SQLException {
|
||||
|
Reference in New Issue
Block a user