Interface IUnitSelection
This interface represents a unit selection.
A unit selection is part of the workflow task to assign a resource to a unit. In this task, several unit selections can be configured. Then when the user executes an action containing this task, the user will choose which unit selection she / he wants.
-
Method Summary
Modifier and TypeMethodDescriptionGives the configuration handler associated to this unit selectiongetId()Gives the id.Gives the form handler associated to this unit selectionbooleanTells if the unit selection is automatic or not.intselect(int nIdResource, String strResourceType, javax.servlet.http.HttpServletRequest request, fr.paris.lutece.plugins.workflowcore.service.task.ITask task) Selects the unit the resource will be assigned to.
-
Method Details
-
getId
String getId()Gives the id.
The id is used to find which unit selection has to be used in the task. The id must be unique among the unit selections.
- Returns:
- the id
-
isAutomatic
boolean isAutomatic()Tells if the unit selection is automatic or not.
A non-automatic unit selection means the user has to choose the unit she / he wants the resource to be assigned to.
An automatic unit selection can be used in the task to automatically assign a resource to a unit. A non-automatic unit selection cannot.
- Returns:
trueif the unit selection is automatic,falseotherwise
-
getConfigurationHandler
IConfigurationHandler getConfigurationHandler()Gives the configuration handler associated to this unit selection- Returns:
- the configuration handler
-
getTaskFormHandler
ITaskFormHandler getTaskFormHandler()Gives the form handler associated to this unit selection- Returns:
- the form handler
-
select
int select(int nIdResource, String strResourceType, javax.servlet.http.HttpServletRequest request, fr.paris.lutece.plugins.workflowcore.service.task.ITask task) throws AssignmentNotPossibleException Selects the unit the resource will be assigned to.
This method is not responsible of storing the assignment. The store is done by the workflow task itself.
- Parameters:
nIdResource- the resource idstrResourceType- the resource typerequest- the request containing information to select the unit. WARNING : if the unit selection is automatic, the request isnull.task- the task associated to the unit selection- Returns:
- the id of the target unit
- Throws:
AssignmentNotPossibleException- if the assignment is not possible
-