public class UnitSelectionSpecificUnit extends Object implements IUnitSelection
| Constructor and Description |
|---|
UnitSelectionSpecificUnit(fr.paris.lutece.plugins.unittree.service.unit.IUnitService unitService,
fr.paris.lutece.plugins.workflowcore.business.config.ITaskConfigDAO<UnitSelectionSpecificUnitConfig> configDAO)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
IConfigurationHandler |
getConfigurationHandler()
Gives the configuration handler associated to this unit selection
|
String |
getId()
Gives the id.
|
ITaskFormHandler |
getTaskFormHandler()
Gives the form handler associated to this unit selection
|
boolean |
isAutomatic()
Tells if the unit selection is automatic or not.
|
int |
select(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.
|
@Inject
public UnitSelectionSpecificUnit(fr.paris.lutece.plugins.unittree.service.unit.IUnitService unitService,
fr.paris.lutece.plugins.workflowcore.business.config.ITaskConfigDAO<UnitSelectionSpecificUnitConfig> configDAO)
unitService - the unit service to setconfigDAO - the configuration DAO to setpublic 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.
getId in interface IUnitSelectionpublic 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.
isAutomatic in interface IUnitSelectiontrue if the unit selection is automatic, false otherwisepublic IConfigurationHandler getConfigurationHandler()
getConfigurationHandler in interface IUnitSelectionpublic ITaskFormHandler getTaskFormHandler()
getTaskFormHandler in interface IUnitSelectionpublic 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.
select in interface IUnitSelectionnIdResource - the resource idstrResourceType - the resource typerequest - the request containing information to select the unit. WARNING : if the unit selection is automatic, the request is null.task - the task associated to the unit selectionAssignmentNotPossibleException - if the assignment is not possibleCopyright © 2018 City of Paris. All rights reserved.