Class UserSelectionAction
java.lang.Object
org.dspace.xmlworkflow.state.actions.Action
org.dspace.xmlworkflow.state.actions.userassignment.UserSelectionAction
- Direct Known Subclasses:
AssignAction,AssignOriginalSubmitterAction,AutoAssignAction,ClaimAction,InheritUsersAction,NoUserSelectionAction
An action that associates workflow users with tasks.
All the user selection actions must inherit from this action
- 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
FieldsModifier and TypeFieldDescriptionprotected ClaimedTaskServiceprotected org.apache.logging.log4j.Loggerprotected PoolTaskServiceprotected WorkflowItemRoleService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisAuthorized(Context context, jakarta.servlet.http.HttpServletRequest request, XmlWorkflowItem wfi) Is this client authorized to act on this item?abstract booleanabstract booleanisValidUserSelection(Context context, XmlWorkflowItem wfi, boolean hasUI) Check user constraints (enough users, group exists, ...).abstract voidregenerateTasks(Context c, XmlWorkflowItem wfi, RoleMembers roleMembers) Should a person have the option to repool the task the tasks will have to be regeneratedabstract booleanA boolean indicating whether or not the task pool is used for this type of user selectionMethods inherited from class org.dspace.xmlworkflow.state.actions.Action
activate, addApprovedProvenance, addErrorField, alertUsersOnActivation, execute, getAdvancedInfo, getAdvancedOptions, getErrorFields, getOptions, getParent, getProvenanceStartId, isAdvanced, isOptionInParam, setParent
-
Field Details
-
log
protected org.apache.logging.log4j.Logger log -
claimedTaskService
-
poolTaskService
-
workflowItemRoleService
-
-
Constructor Details
-
UserSelectionAction
public UserSelectionAction()
-
-
Method Details
-
isFinished
-
isAuthorized
public boolean isAuthorized(Context context, jakarta.servlet.http.HttpServletRequest request, XmlWorkflowItem wfi) throws SQLException, AuthorizeException, IOException, WorkflowConfigurationException Description copied from class:ActionIs this client authorized to act on this item?- Specified by:
isAuthorizedin classAction- Parameters:
context- current DSpace session.request- current client request.wfi- the workflow item in question.- Returns:
- true if authorized.
- Throws:
SQLException- passed through.AuthorizeException- passed through.IOException- passed through.WorkflowConfigurationException- if the workflow is mis-configured.
-
regenerateTasks
public abstract void regenerateTasks(Context c, XmlWorkflowItem wfi, RoleMembers roleMembers) throws SQLException, AuthorizeException, IOException Should a person have the option to repool the task the tasks will have to be regenerated- Parameters:
c- the dspace contextwfi- the workflowitemroleMembers- the list of users for which tasks must be regenerated- Throws:
AuthorizeException- thrown if the current user isn't authorizedSQLException- An exception that provides information on a database access error or other errors.IOException- A general class of exceptions produced by failed or interrupted I/O operations.
-
isValidUserSelection
public abstract boolean isValidUserSelection(Context context, XmlWorkflowItem wfi, boolean hasUI) throws WorkflowConfigurationException, SQLException Check user constraints (enough users, group exists, ...).- Parameters:
context- the dspace contextwfi- the workflow itemhasUI- whether or not the Step has a user interface- Returns:
- if the action is valid
- Throws:
WorkflowConfigurationException- if there is an error in the workflow configuration.SQLException- passed through.
-
usesTaskPool
public abstract boolean usesTaskPool()A boolean indicating whether or not the task pool is used for this type of user selection- Returns:
- a boolean
-