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
public abstract class UserSelectionAction extends Action
An abstract class representing the processing side of a user selection action. 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
Fields Modifier and Type Field Description protected ClaimedTaskServiceclaimedTaskServiceprotected org.apache.logging.log4j.Loggerlogprotected PoolTaskServicepoolTaskServiceprotected WorkflowItemRoleServiceworkflowItemRoleService
-
Constructor Summary
Constructors Constructor Description UserSelectionAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanisAuthorized(Context context, javax.servlet.http.HttpServletRequest request, XmlWorkflowItem wfi)abstract booleanisFinished(XmlWorkflowItem wfi)abstract booleanisValidUserSelection(Context context, XmlWorkflowItem wfi, boolean hasUI)Verifies if the user selection action is valid User constraints will be checked (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 booleanusesTaskPool()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.Action
activate, addErrorField, alertUsersOnActivation, execute, getErrorFields, getOptions, getParent, getProvenanceStartId, isOptionInParam, setParent
-
-
-
-
Field Detail
-
log
protected org.apache.logging.log4j.Logger log
-
claimedTaskService
@Autowired(required=true) protected ClaimedTaskService claimedTaskService
-
poolTaskService
@Autowired(required=true) protected PoolTaskService poolTaskService
-
workflowItemRoleService
@Autowired(required=true) protected WorkflowItemRoleService workflowItemRoleService
-
-
Method Detail
-
isFinished
public abstract boolean isFinished(XmlWorkflowItem wfi)
-
isAuthorized
public boolean isAuthorized(Context context, javax.servlet.http.HttpServletRequest request, XmlWorkflowItem wfi) throws SQLException, AuthorizeException, IOException, WorkflowConfigurationException
- Specified by:
isAuthorizedin classAction- Throws:
SQLExceptionAuthorizeExceptionIOExceptionWorkflowConfigurationException
-
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
Verifies if the user selection action is valid User constraints will be checked (enough users, group exists, ...)- 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 abstract boolean usesTaskPool()
A boolean indicating wether or not the task pool is used for this type of user selection- Returns:
- a boolean
-
-