org.dspace.xmlworkflow.state.actions.userassignment
Class UserSelectionAction

java.lang.Object
  extended by org.dspace.xmlworkflow.state.actions.Action
      extended by 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
protected static org.apache.log4j.Logger log
           
 
Constructor Summary
UserSelectionAction()
           
 
Method Summary
 boolean isAuthorized(Context context, javax.servlet.http.HttpServletRequest request, XmlWorkflowItem wfi)
           
abstract  boolean isFinished(XmlWorkflowItem wfi)
           
abstract  boolean isValidUserSelection(Context context, XmlWorkflowItem wfi, boolean hasUI)
          Verifies if the user selection action is valid User constraints will be checked (enough users, group exists, ...)
abstract  void regenerateTasks(Context c, XmlWorkflowItem wfi, RoleMembers roleMembers)
          Should a person have the option to repool the task the tasks will have to be regenerated
abstract  boolean usesTaskPool()
          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, getParent, getProvenanceStartId, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
Constructor Detail

UserSelectionAction

public UserSelectionAction()
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:
isAuthorized in class Action
Throws:
SQLException
AuthorizeException
IOException
WorkflowConfigurationException

regenerateTasks

public abstract void regenerateTasks(Context c,
                                     XmlWorkflowItem wfi,
                                     RoleMembers roleMembers)
                              throws SQLException,
                                     AuthorizeException
Should a person have the option to repool the task the tasks will have to be regenerated

Parameters:
c - the dspace context
wfi - the workflowitem
roleMembers - the list of users for which tasks must be regenerated
Throws:
SQLException - ...
AuthorizeException - thrown if the current user isn't authorized

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 context
wfi - the workflow item
hasUI - 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 workflow
SQLException - ...

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


Copyright © 2011 DuraSpace. All Rights Reserved.