Interface IWorkflowProvider


public interface IWorkflowProvider
IWorkflowProvider.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canProcessAction(int nIdResource, String strResourceType, int nIdAction, jakarta.servlet.http.HttpServletRequest request, fr.paris.lutece.api.user.User user)
    Check if the action can be proceed for the given resource.
    doValidateTasksForm(int nIdResource, String strResourceType, int nIdAction, jakarta.servlet.http.HttpServletRequest request, Locale locale, fr.paris.lutece.api.user.User user)
    Test if the information relating to various tasks associated with action are validated.
    Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action>
    getActions(int nIdResource, String strResourceType, Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> listActions, fr.paris.lutece.api.user.User user)
    returns a list of actions possible for a given document based on the status of the document in the workflow and the user role.
    Map<Integer,List<fr.paris.lutece.plugins.workflowcore.business.action.Action>>
    getActions(String strResourceType, Map<Integer,List<fr.paris.lutece.plugins.workflowcore.business.action.Action>> mapActions, fr.paris.lutece.api.user.User user)
    returns a list of actions possible for a given document based on the status of the document in the workflow and the user role.
    Collection<fr.paris.lutece.plugins.workflowcore.business.state.State>
    getAllStateByWorkflow(Collection<fr.paris.lutece.plugins.workflowcore.business.state.State> listStates, fr.paris.lutece.api.user.User user)
    returns all state of a given workflow.
    Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action>
    getAuthorizedActions(Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> listActions, fr.paris.lutece.api.user.User user)
    Returns authorized action list
    getAuthorizedResourceList(String strResourceType, int nIdWorkflow, int nIdWorkflowState, Integer nExternalParentId, fr.paris.lutece.api.user.User user)
    Get all authorized resource Id.
    getAuthorizedResourceList(String strResourceType, int nIdWorkflow, List<Integer> lListIdWorkflowState, Integer nExternalParentId, fr.paris.lutece.api.user.User user)
    Get all authorized resource Id.
    getDisplayDocumentHistory(int nIdResource, String strResourceType, int nIdWorkflow, jakarta.servlet.http.HttpServletRequest request, Locale locale, fr.paris.lutece.api.user.User user)
    returns the actions history performed on a resource.
    getDisplayDocumentHistory(int nIdResource, String strResourceType, int nIdWorkflow, jakarta.servlet.http.HttpServletRequest request, Locale locale, Map<String,Object> model, String strTemplate, fr.paris.lutece.api.user.User user)
    returns the actions history performed on a resource.
    getDisplayTasksForm(int nIdResource, String strResourceType, int nIdAction, jakarta.servlet.http.HttpServletRequest request, Locale locale, fr.paris.lutece.api.user.User user)
    returns the tasks form.
    getUserAccessCode(jakarta.servlet.http.HttpServletRequest request, fr.paris.lutece.api.user.User user)
    The user access code.
    getWorkflowsEnabled(fr.paris.lutece.api.user.User user, Locale locale)
    return a referencelist wich contains a list enabled workflow.
    boolean
    isAuthorized(int nIdResource, String strResourceType, int nIdWorkflow, fr.paris.lutece.api.user.User user)
    Check that a given user is allowed to view a resource depending the state of the resource.
  • Method Details

    • getActions

      Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> getActions(int nIdResource, String strResourceType, Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> listActions, fr.paris.lutece.api.user.User user)
      returns a list of actions possible for a given document based on the status of the document in the workflow and the user role.
      Parameters:
      nIdResource - the id of the document
      strResourceType - the type of the document
      listActions - the list actions
      user - the User
      Returns:
      a list of Action
    • getActions

      Map<Integer,List<fr.paris.lutece.plugins.workflowcore.business.action.Action>> getActions(String strResourceType, Map<Integer,List<fr.paris.lutece.plugins.workflowcore.business.action.Action>> mapActions, fr.paris.lutece.api.user.User user)
      returns a list of actions possible for a given document based on the status of the document in the workflow and the user role.
      Parameters:
      strResourceType - the type of the document
      mapActions - the map actions
      user - the nUser
      Returns:
      a list of Action
    • getAuthorizedActions

      Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> getAuthorizedActions(Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> listActions, fr.paris.lutece.api.user.User user)
      Returns authorized action list
      Parameters:
      listActions -
      nIdWorkflowState -
      user -
      Returns:
      authorized action list
    • getDisplayDocumentHistory

      String getDisplayDocumentHistory(int nIdResource, String strResourceType, int nIdWorkflow, jakarta.servlet.http.HttpServletRequest request, Locale locale, fr.paris.lutece.api.user.User user)
      returns the actions history performed on a resource.
      Parameters:
      nIdResource - the resource id
      strResourceType - the resource type
      nIdWorkflow - the workflow id
      request - the request
      locale - the locale
      user - the User
      Returns:
      the history of actions performed on a resource
    • getDisplayDocumentHistory

      String getDisplayDocumentHistory(int nIdResource, String strResourceType, int nIdWorkflow, jakarta.servlet.http.HttpServletRequest request, Locale locale, Map<String,Object> model, String strTemplate, fr.paris.lutece.api.user.User user)
      returns the actions history performed on a resource.
      Parameters:
      nIdResource - the resource id
      strResourceType - the resource type
      nIdWorkflow - the workflow id
      request - the request
      locale - the locale
      model - The model to add to the default model
      strTemplate - The template
      user - the User
      Returns:
      the history of actions performed on a resource
    • getDisplayTasksForm

      String getDisplayTasksForm(int nIdResource, String strResourceType, int nIdAction, jakarta.servlet.http.HttpServletRequest request, Locale locale, fr.paris.lutece.api.user.User user)
      returns the tasks form.
      Parameters:
      nIdResource - the resource id
      strResourceType - the resource type
      nIdAction - the action id
      request - the request
      locale - the locale
      user - the User
      Returns:
      the tasks form associated to the action
    • getAuthorizedResourceList

      List<Integer> getAuthorizedResourceList(String strResourceType, int nIdWorkflow, int nIdWorkflowState, Integer nExternalParentId, fr.paris.lutece.api.user.User user)
      Get all authorized resource Id.
      Parameters:
      strResourceType - the resource type
      nIdWorkflow - the workflow id
      nIdWorkflowState - The workflow state id
      nExternalParentId - The external parent id
      user - the User
      Returns:
      The list
    • getAuthorizedResourceList

      List<Integer> getAuthorizedResourceList(String strResourceType, int nIdWorkflow, List<Integer> lListIdWorkflowState, Integer nExternalParentId, fr.paris.lutece.api.user.User user)
      Get all authorized resource Id.
      Parameters:
      strResourceType - the resource type
      nIdWorkflow - the workflow id
      lListIdWorkflowState - The list workflow state id
      nExternalParentId - he external parent id
      user - the User
      Returns:
      The list
    • getWorkflowsEnabled

      ReferenceList getWorkflowsEnabled(fr.paris.lutece.api.user.User user, Locale locale)
      return a referencelist wich contains a list enabled workflow.
      Parameters:
      user - the User
      locale - the locale
      Returns:
      a referencelist wich contains a list enabled workflow
    • getAllStateByWorkflow

      Collection<fr.paris.lutece.plugins.workflowcore.business.state.State> getAllStateByWorkflow(Collection<fr.paris.lutece.plugins.workflowcore.business.state.State> listStates, fr.paris.lutece.api.user.User user)
      returns all state of a given workflow.
      Parameters:
      listStates - the list states
      user - the User
      Returns:
      the state of a given document
    • getUserAccessCode

      String getUserAccessCode(jakarta.servlet.http.HttpServletRequest request, fr.paris.lutece.api.user.User user)
      The user access code.
      Parameters:
      request - the HTTP request
      user - the RBACUser
      Returns:
      the user access code
    • isAuthorized

      boolean isAuthorized(int nIdResource, String strResourceType, int nIdWorkflow, fr.paris.lutece.api.user.User user)
      Check that a given user is allowed to view a resource depending the state of the resource.
      Parameters:
      nIdResource - the document id
      strResourceType - the document type
      nIdWorkflow - the workflow id*
      user - the user
      Returns:
      a list of Action
    • canProcessAction

      boolean canProcessAction(int nIdResource, String strResourceType, int nIdAction, jakarta.servlet.http.HttpServletRequest request, fr.paris.lutece.api.user.User user)
      Check if the action can be proceed for the given resource.
      Parameters:
      nIdResource - the id of the resource
      strResourceType - the type of the resource
      nIdAction - the id action
      request - the HTTP request
      user - the User
      Returns:
      true if the action can proceed, false otherwise
    • doValidateTasksForm

      String doValidateTasksForm(int nIdResource, String strResourceType, int nIdAction, jakarta.servlet.http.HttpServletRequest request, Locale locale, fr.paris.lutece.api.user.User user)
      Test if the information relating to various tasks associated with action are validated.
      Parameters:
      nIdResource - the resource id
      strResourceType - the resource type
      nIdAction - the action id
      request - the request
      locale - the locale
      user - the user
      Returns:
      null if there is no error in the tasks form, return the error message otherwise