Interface IUnitSelection


public 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 Type
    Method
    Description
    Gives the configuration handler associated to this unit selection
    Gives the id.
    Gives the form handler associated to this unit selection
    boolean
    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.
  • 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:
      true if the unit selection is automatic, false otherwise
    • 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 id
      strResourceType - the resource type
      request - 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 selection
      Returns:
      the id of the target unit
      Throws:
      AssignmentNotPossibleException - if the assignment is not possible