Class AssignOriginalSubmitterAction
- java.lang.Object
-
- org.dspace.xmlworkflow.state.actions.Action
-
- org.dspace.xmlworkflow.state.actions.userassignment.UserSelectionAction
-
- org.dspace.xmlworkflow.state.actions.userassignment.AssignOriginalSubmitterAction
-
public class AssignOriginalSubmitterAction extends UserSelectionAction
A user selection action that assigns the original submitter to the workflowitem- Author:
- Bram De Schouwer (bram.deschouwer at dot com), Kevin Van de Velde (kevin at atmire dot com), Ben Bosman (ben at atmire dot com), Mark Diggory (markd at atmire dot com)
-
-
Field Summary
Fields Modifier and Type Field Description protected WorkflowRequirementsServiceworkflowRequirementsService-
Fields inherited from class org.dspace.xmlworkflow.state.actions.userassignment.UserSelectionAction
claimedTaskService, log, poolTaskService, workflowItemRoleService
-
-
Constructor Summary
Constructors Constructor Description AssignOriginalSubmitterAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(Context c, XmlWorkflowItem wf)voidalertUsersOnActivation(Context c, XmlWorkflowItem wfi, RoleMembers roleMembers)protected voidcreateTaskForEPerson(Context c, XmlWorkflowItem wfi, Step step, WorkflowActionConfig actionConfig, EPerson user)Create a claimed task for the user IF this user doesn't have a claimed action for this workflow itemActionResultexecute(Context c, XmlWorkflowItem wfi, Step step, javax.servlet.http.HttpServletRequest request)List<String>getOptions()Returns a list of options that the user can select at this action which results in the next step in the workflowbooleanisFinished(XmlWorkflowItem wfi)booleanisValidUserSelection(Context context, XmlWorkflowItem wfi, boolean hasUI)Verifies if the user selection action is valid User constraints will be checked (enough users, group exists, ...)voidregenerateTasks(Context c, XmlWorkflowItem wfi, RoleMembers roleMembers)Should a person have the option to repool the task the tasks will have to be regeneratedbooleanusesTaskPool()A boolean indicating wether or not the task pool is used for this type of user selection-
Methods inherited from class org.dspace.xmlworkflow.state.actions.userassignment.UserSelectionAction
isAuthorized
-
Methods inherited from class org.dspace.xmlworkflow.state.actions.Action
addErrorField, getErrorFields, getParent, getProvenanceStartId, isOptionInParam, setParent
-
-
-
-
Field Detail
-
workflowRequirementsService
@Autowired(required=true) protected WorkflowRequirementsService workflowRequirementsService
-
-
Method Detail
-
isFinished
public boolean isFinished(XmlWorkflowItem wfi)
- Specified by:
isFinishedin classUserSelectionAction
-
regenerateTasks
public void regenerateTasks(Context c, XmlWorkflowItem wfi, RoleMembers roleMembers) throws SQLException
Description copied from class:UserSelectionActionShould a person have the option to repool the task the tasks will have to be regenerated- Specified by:
regenerateTasksin classUserSelectionAction- Parameters:
c- the dspace contextwfi- the workflowitemroleMembers- the list of users for which tasks must be regenerated- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
isValidUserSelection
public boolean isValidUserSelection(Context context, XmlWorkflowItem wfi, boolean hasUI) throws WorkflowConfigurationException, SQLException
Description copied from class:UserSelectionActionVerifies if the user selection action is valid User constraints will be checked (enough users, group exists, ...)- Specified by:
isValidUserSelectionin classUserSelectionAction- Parameters:
context- the dspace contextwfi- the workflow itemhasUI- boolean indicating whether or not the action has a user interface- Returns:
- if the action is valid
- Throws:
WorkflowConfigurationException- occurs if there is a configuration error in the workflowSQLException- An exception that provides information on a database access error or other errors.
-
usesTaskPool
public boolean usesTaskPool()
Description copied from class:UserSelectionActionA boolean indicating wether or not the task pool is used for this type of user selection- Specified by:
usesTaskPoolin classUserSelectionAction- Returns:
- a boolean
-
activate
public void activate(Context c, XmlWorkflowItem wf) throws SQLException, IOException
- Specified by:
activatein classAction- Throws:
SQLExceptionIOException
-
alertUsersOnActivation
public void alertUsersOnActivation(Context c, XmlWorkflowItem wfi, RoleMembers roleMembers) throws IOException, SQLException
- Overrides:
alertUsersOnActivationin classAction- Throws:
IOExceptionSQLException
-
execute
public ActionResult execute(Context c, XmlWorkflowItem wfi, Step step, javax.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeException, IOException, WorkflowException
- Specified by:
executein classAction- Throws:
SQLExceptionAuthorizeExceptionIOExceptionWorkflowException
-
getOptions
public List<String> getOptions()
Description copied from class:ActionReturns a list of options that the user can select at this action which results in the next step in the workflow- Specified by:
getOptionsin classAction- Returns:
- A list of options of this action, resulting in the next step of the workflow
-
createTaskForEPerson
protected void createTaskForEPerson(Context c, XmlWorkflowItem wfi, Step step, WorkflowActionConfig actionConfig, EPerson user) throws SQLException, AuthorizeException, IOException
Create a claimed task for the user IF this user doesn't have a claimed action for this workflow item- Parameters:
c- the dspace contextwfi- the workflow itemstep- the current stepactionConfig- the actionuser- the user to create the action for- Throws:
SQLException- ...AuthorizeException- ...IOException- ...
-
-