Class WorkflowService


  • public final class WorkflowService
    extends java.lang.Object
    WorkflowService
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean canProcessAction​(int nIdResource, java.lang.String strResourceType, int nIdAction, java.lang.Integer nExternalParentId, javax.servlet.http.HttpServletRequest request, boolean bIsAutomatic)
      Deprecated.
      use canProcessAction( int, String, int, Integer, HttpServletRequest, User )
      boolean canProcessAction​(int nIdResource, java.lang.String strResourceType, int nIdAction, java.lang.Integer nExternalParentId, javax.servlet.http.HttpServletRequest request, boolean bIsAutomatic, fr.paris.lutece.api.user.User user)
      Check if the action can be proceed for the given resource
      void doProcessAction​(int nIdResource, java.lang.String strResourceType, int nIdAction, java.lang.Integer nExternalParentId, javax.servlet.http.HttpServletRequest request, java.util.Locale locale, boolean bIsAutomatic)
      Deprecated.
      use doProcessAction( int, String, int, Integer, HttpServletRequest, Locale, boolean, User )
      java.util.List<fr.paris.lutece.plugins.workflowcore.business.resource.ResourceHistory> doProcessAction​(int nIdResource, java.lang.String strResourceType, int nIdAction, java.lang.Integer nExternalParentId, javax.servlet.http.HttpServletRequest request, java.util.Locale locale, boolean bIsAutomatic, fr.paris.lutece.api.user.User user)
      Proceed action given in parameter
      void doProcessAutomaticReflexiveActions​(int nIdResource, java.lang.String strResourceType, int nIdState, java.lang.Integer nIdExternalParent, java.util.Locale locale)
      Deprecated.
      use doProcessAutomaticReflexiveActions( int, String, int, Integer, Locale, User )
      void doProcessAutomaticReflexiveActions​(int nIdResource, java.lang.String strResourceType, int nIdState, java.lang.Integer nIdExternalParent, java.util.Locale locale, fr.paris.lutece.api.user.User user)
      Proceed automatic reflexive actions of state given in parameter.
      void doRemoveWorkFlowResource​(int nIdResource, java.lang.String strResourceType)
      Remove in every workflows the resource specified in parameter
      void doRemoveWorkFlowResourceByListId​(java.util.List<java.lang.Integer> lListIdResource, java.lang.String strResourceType, java.lang.Integer nIdWorflow)
      Remove list of resource workflow by list id
      java.lang.String doSaveTasksForm​(int nIdResource, java.lang.String strResourceType, int nIdAction, java.lang.Integer nExternalParentId, javax.servlet.http.HttpServletRequest request, java.util.Locale locale)
      Deprecated.
      use doSaveTasksForm( int, String, int, Integer, HttpServletRequest, Locale, User )
      java.lang.String doSaveTasksForm​(int nIdResource, java.lang.String strResourceType, int nIdAction, java.lang.Integer nExternalParentId, javax.servlet.http.HttpServletRequest request, java.util.Locale locale, fr.paris.lutece.api.user.User user)
      Deprecated.
      java.lang.String doSaveTasksForm​(int nIdResource, java.lang.String strResourceType, int nIdAction, java.lang.Integer nExternalParentId, javax.servlet.http.HttpServletRequest request, java.util.Locale locale, fr.paris.lutece.api.user.User user, java.util.List<fr.paris.lutece.plugins.workflowcore.business.resource.ResourceHistory> actionHistoryResourceList)
      Perform the information on the various tasks associated with the given action specified in parameter
      void executeActionAutomatic​(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, java.lang.Integer nExternalParentId)
      Deprecated.
      use executeActionAutomatic( int, String, int, Integer, User )
      void executeActionAutomatic​(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, java.lang.Integer nExternalParentId, fr.paris.lutece.api.user.User user)
      Execute action automatic
      java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> getActions​(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, 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
      java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> getActions​(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, AdminUser user)
      Deprecated.
      use getActions( int, String, int, User )
      java.util.Map<java.lang.Integer,​java.util.List<fr.paris.lutece.plugins.workflowcore.business.action.Action>> getActions​(java.util.List<java.lang.Integer> listIdResource, java.lang.String strResourceType, java.lang.Integer nIdExternalParentId, int nIdWorkflow, 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
      java.util.Map<java.lang.Integer,​java.util.List<fr.paris.lutece.plugins.workflowcore.business.action.Action>> getActions​(java.util.List<java.lang.Integer> listIdResource, java.lang.String strResourceType, java.lang.Integer nIdExternalParentId, int nIdWorkflow, AdminUser user)
      Deprecated.
      getActions( List, String, Integer, int, User )
      java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.state.State> getAllStateByWorkflow​(int nIdWorkflow, fr.paris.lutece.api.user.User user)
      returns all state of a given workflow
      java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.state.State> getAllStateByWorkflow​(int nIdWorkflow, AdminUser user)
      Deprecated.
      use getAllStateByWorkflow( int, User )
      java.util.List<java.lang.Integer> getAuthorizedResourceList​(java.lang.String strResourceType, int nIdWorkflow, int nIdWorkflowState, java.lang.Integer nExternalParentId, fr.paris.lutece.api.user.User user)
      Get all authorized resource Id
      java.util.List<java.lang.Integer> getAuthorizedResourceList​(java.lang.String strResourceType, int nIdWorkflow, int nIdWorkflowState, java.lang.Integer nExternalParentId, AdminUser user)
      Deprecated.
      use getAuthorizedResourceList( String, int, int, Integer, User )
      java.util.List<java.lang.Integer> getAuthorizedResourceList​(java.lang.String strResourceType, int nIdWorkflow, java.util.List<java.lang.Integer> lListIdWorkflowState, java.lang.Integer nExternalParentId, fr.paris.lutece.api.user.User user)
      Get all authorized resource Id by list of state
      java.util.List<java.lang.Integer> getAuthorizedResourceList​(java.lang.String strResourceType, int nIdWorkflow, java.util.List<java.lang.Integer> lListIdWorkflowState, java.lang.Integer nExternalParentId, AdminUser user)
      Deprecated.
      use getAuthorizedResourceList( String, int, List, Integer, User )
      java.lang.String getDisplayDocumentHistory​(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, javax.servlet.http.HttpServletRequest request, java.util.Locale locale)
      Deprecated.
      use getDisplayDocumentHistory( int, String, int, HttpServletRequest, Locale, User )
      java.lang.String getDisplayDocumentHistory​(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, javax.servlet.http.HttpServletRequest request, java.util.Locale locale, fr.paris.lutece.api.user.User user)
      returns the actions history performed on a resource
      java.lang.String getDisplayDocumentHistory​(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, javax.servlet.http.HttpServletRequest request, java.util.Locale locale, java.util.Map<java.lang.String,​java.lang.Object> model, java.lang.String strTemplate)
      Deprecated.
      use getDisplayDocumentHistory( int, String, int, HttpServletRequest, Locale, Map, String, User )
      java.lang.String getDisplayDocumentHistory​(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, javax.servlet.http.HttpServletRequest request, java.util.Locale locale, java.util.Map<java.lang.String,​java.lang.Object> model, java.lang.String strTemplate, fr.paris.lutece.api.user.User user)
      returns the actions history performed on a resource
      java.lang.String getDisplayTasksForm​(int nIdResource, java.lang.String strResourceType, int nIdAction, javax.servlet.http.HttpServletRequest request, java.util.Locale locale)
      Deprecated.
      use getDisplayTasksForm( int, String, int, HttpServletRequest, Locale, User )
      java.lang.String getDisplayTasksForm​(int nIdResource, java.lang.String strResourceType, int nIdAction, javax.servlet.http.HttpServletRequest request, java.util.Locale locale, fr.paris.lutece.api.user.User user)
      returns the tasks form
      static WorkflowService getInstance()
      Returns the unique instance of the service
      java.util.List<fr.paris.lutece.plugins.workflowcore.business.action.Action> getMassActions​(int nIdWorkflow)
      Get the list of mass actions from a given id workflow
      java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> getMassActions​(int nIdWorkflow, int nIdState, fr.paris.lutece.api.user.User user)
      Get the list of mass actions from a given id workflow
      java.util.List<java.lang.Integer> getResourceIdListByIdState​(int nIdState, java.lang.String strResourceType)
      Get the list of ids of resources of a given type that are in a given state
      java.util.List<java.lang.Integer> getResourceIdListByIdState​(int nIdState, java.lang.String strResourceType, int nExternalParentId)
      Get the list of ids of resources of a given type that are in a given state and have a specific external parent id
      fr.paris.lutece.plugins.workflowcore.business.state.State getState​(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, java.lang.Integer nIdExternalParentId)
      returns the state of a given document of the document in the workflow and the user role
      ReferenceList getWorkflowsEnabled​(fr.paris.lutece.api.user.User user, java.util.Locale locale)
      return a reference list which contains a list enabled workflow
      ReferenceList getWorkflowsEnabled​(AdminUser user, java.util.Locale locale)
      Deprecated.
      use getWorkflowsEnabled( User, Locale )
      boolean isAuthorized​(int nIdResource, java.lang.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
      boolean isAuthorized​(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, AdminUser user)
      Deprecated.
      use isAuthorized( int, String, int, User )
      boolean isAvailable()
      Check if the workflow service is available.
      boolean isDisplayTasksForm​(int nIdAction, java.util.Locale locale)
      return true if a form is associate to the action
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

        public static WorkflowService getInstance()
        Returns the unique instance of the service
        Returns:
        The instance of the service
      • isAvailable

        public boolean isAvailable()
        Check if the workflow service is available. To be available, the following conditions must be verified :
        • the Bean service is not null
        • the plugin-workflow must be enable
        Returns:
        true if the workflow service is available
      • getActions

        public java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> getActions​(int nIdResource,
                                                                                                            java.lang.String strResourceType,
                                                                                                            int nIdWorkflow,
                                                                                                            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 document id
        strResourceType - the document type
        user - the adminUser
        nIdWorkflow - the workflow id
        Returns:
        a list of Action
      • getActions

        @Deprecated
        public java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> getActions​(int nIdResource,
                                                                                                            java.lang.String strResourceType,
                                                                                                            int nIdWorkflow,
                                                                                                            AdminUser user)
        Deprecated.
        use getActions( int, String, int, 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 document id
        strResourceType - the document type
        user - the adminUser
        nIdWorkflow - the workflow id
        Returns:
        a list of Action
      • getActions

        public java.util.Map<java.lang.Integer,​java.util.List<fr.paris.lutece.plugins.workflowcore.business.action.Action>> getActions​(java.util.List<java.lang.Integer> listIdResource,
                                                                                                                                             java.lang.String strResourceType,
                                                                                                                                             java.lang.Integer nIdExternalParentId,
                                                                                                                                             int nIdWorkflow,
                                                                                                                                             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:
        listIdResource - the list of resource id
        strResourceType - the document type
        nIdExternalParentId - the external parent identifier
        nIdWorkflow - the workflow id
        user - the User
        Returns:
        a list of Action
      • getActions

        @Deprecated
        public java.util.Map<java.lang.Integer,​java.util.List<fr.paris.lutece.plugins.workflowcore.business.action.Action>> getActions​(java.util.List<java.lang.Integer> listIdResource,
                                                                                                                                             java.lang.String strResourceType,
                                                                                                                                             java.lang.Integer nIdExternalParentId,
                                                                                                                                             int nIdWorkflow,
                                                                                                                                             AdminUser user)
        Deprecated.
        getActions( List, String, Integer, int, 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:
        listIdResource - the list of resource id
        strResourceType - the document type
        nIdExternalParentId - the external parent identifier
        nIdWorkflow - the workflow id
        user - the User
        Returns:
        a list of Action
      • isDisplayTasksForm

        public boolean isDisplayTasksForm​(int nIdAction,
                                          java.util.Locale locale)
        return true if a form is associate to the action
        Parameters:
        nIdAction - the action id
        locale - the loacle
        Returns:
        true if a form is associate to the action
      • doProcessAction

        @Deprecated
        public void doProcessAction​(int nIdResource,
                                    java.lang.String strResourceType,
                                    int nIdAction,
                                    java.lang.Integer nExternalParentId,
                                    javax.servlet.http.HttpServletRequest request,
                                    java.util.Locale locale,
                                    boolean bIsAutomatic)
        Deprecated.
        use doProcessAction( int, String, int, Integer, HttpServletRequest, Locale, boolean, User )
        Proceed action given in parameter
        Parameters:
        nIdResource - the resource id
        strResourceType - the resource type
        nIdAction - the action id
        nExternalParentId - the external parent id
        request - the request
        locale - locale
        bIsAutomatic - Is automatic
      • doProcessAction

        public java.util.List<fr.paris.lutece.plugins.workflowcore.business.resource.ResourceHistory> doProcessAction​(int nIdResource,
                                                                                                                      java.lang.String strResourceType,
                                                                                                                      int nIdAction,
                                                                                                                      java.lang.Integer nExternalParentId,
                                                                                                                      javax.servlet.http.HttpServletRequest request,
                                                                                                                      java.util.Locale locale,
                                                                                                                      boolean bIsAutomatic,
                                                                                                                      fr.paris.lutece.api.user.User user)
        Proceed action given in parameter
        Parameters:
        nIdResource - the resource id
        strResourceType - the resource type
        nIdAction - the action id
        nExternalParentId - the external parent id
        request - the request
        locale - locale
        bIsAutomatic - Is automatic
        user - The User
      • getDisplayDocumentHistory

        @Deprecated
        public java.lang.String getDisplayDocumentHistory​(int nIdResource,
                                                          java.lang.String strResourceType,
                                                          int nIdWorkflow,
                                                          javax.servlet.http.HttpServletRequest request,
                                                          java.util.Locale locale)
        Deprecated.
        use getDisplayDocumentHistory( int, String, int, HttpServletRequest, Locale, User )
        returns the actions history performed on a resource
        Parameters:
        nIdResource - the resource id
        strResourceType - the resource type
        request - the request
        nIdWorkflow - the workflow id
        locale - the locale
        Returns:
        the history of actions performed on a resource
      • getDisplayDocumentHistory

        public java.lang.String getDisplayDocumentHistory​(int nIdResource,
                                                          java.lang.String strResourceType,
                                                          int nIdWorkflow,
                                                          javax.servlet.http.HttpServletRequest request,
                                                          java.util.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
        request - the request
        nIdWorkflow - the workflow id
        locale - the locale
        user - The User
        Returns:
        the history of actions performed on a resource
      • getDisplayDocumentHistory

        @Deprecated
        public java.lang.String getDisplayDocumentHistory​(int nIdResource,
                                                          java.lang.String strResourceType,
                                                          int nIdWorkflow,
                                                          javax.servlet.http.HttpServletRequest request,
                                                          java.util.Locale locale,
                                                          java.util.Map<java.lang.String,​java.lang.Object> model,
                                                          java.lang.String strTemplate)
        Deprecated.
        use getDisplayDocumentHistory( int, String, int, HttpServletRequest, Locale, Map, String, User )
        returns the actions history performed on a resource
        Parameters:
        nIdResource - the resource id
        strResourceType - the resource type
        request - the request
        nIdWorkflow - the workflow id
        locale - the locale
        model - The model to add to the default model
        strTemplate - The template
        Returns:
        the history of actions performed on a resource
      • getDisplayDocumentHistory

        public java.lang.String getDisplayDocumentHistory​(int nIdResource,
                                                          java.lang.String strResourceType,
                                                          int nIdWorkflow,
                                                          javax.servlet.http.HttpServletRequest request,
                                                          java.util.Locale locale,
                                                          java.util.Map<java.lang.String,​java.lang.Object> model,
                                                          java.lang.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
        request - the request
        nIdWorkflow - the workflow id
        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
      • doSaveTasksForm

        @Deprecated
        public java.lang.String doSaveTasksForm​(int nIdResource,
                                                java.lang.String strResourceType,
                                                int nIdAction,
                                                java.lang.Integer nExternalParentId,
                                                javax.servlet.http.HttpServletRequest request,
                                                java.util.Locale locale)
        Deprecated.
        use doSaveTasksForm( int, String, int, Integer, HttpServletRequest, Locale, User )
        Perform the information on the various tasks associated with the given action specified in parameter
        Parameters:
        nIdResource - the resource id
        strResourceType - the resource type
        nExternalParentId - the external parent id
        request - the request
        nIdAction - the action id
        locale - the locale
        Returns:
        null if there is no error in the task form else return the error message url
      • doSaveTasksForm

        @Deprecated
        public java.lang.String doSaveTasksForm​(int nIdResource,
                                                java.lang.String strResourceType,
                                                int nIdAction,
                                                java.lang.Integer nExternalParentId,
                                                javax.servlet.http.HttpServletRequest request,
                                                java.util.Locale locale,
                                                fr.paris.lutece.api.user.User user)
        Deprecated.
        Perform the information on the various tasks associated with the given action specified in parameter
        Parameters:
        nIdResource - the resource id
        strResourceType - the resource type
        nExternalParentId - the external parent id
        request - the request
        nIdAction - the action id
        locale - the locale
        user - the user
        Returns:
        null if there is no error in the task form else return the error message url
      • doSaveTasksForm

        public java.lang.String doSaveTasksForm​(int nIdResource,
                                                java.lang.String strResourceType,
                                                int nIdAction,
                                                java.lang.Integer nExternalParentId,
                                                javax.servlet.http.HttpServletRequest request,
                                                java.util.Locale locale,
                                                fr.paris.lutece.api.user.User user,
                                                java.util.List<fr.paris.lutece.plugins.workflowcore.business.resource.ResourceHistory> actionHistoryResourceList)
        Perform the information on the various tasks associated with the given action specified in parameter
        Parameters:
        nIdResource - the resource id
        strResourceType - the resource type
        nExternalParentId - the external parent id
        request - the request
        nIdAction - the action id
        locale - the locale
        user - the user
        actionHistoryResourceList - the history of action performed on a resource
        Returns:
        null if there is no error in the task form else return the error message url
      • getResourceIdListByIdState

        public java.util.List<java.lang.Integer> getResourceIdListByIdState​(int nIdState,
                                                                            java.lang.String strResourceType)
        Get the list of ids of resources of a given type that are in a given state
        Parameters:
        nIdState - The id of the state of resources to get
        strResourceType - The type of resources to get
        Returns:
        The list of resources matching both given state id and resource given. Return an empty list if no resource was found, or if the state does not exist.
      • getResourceIdListByIdState

        public java.util.List<java.lang.Integer> getResourceIdListByIdState​(int nIdState,
                                                                            java.lang.String strResourceType,
                                                                            int nExternalParentId)
        Get the list of ids of resources of a given type that are in a given state and have a specific external parent id
        Parameters:
        nIdState - The id of the state of resources to get
        strResourceType - The type of resources to get
        Returns:
        The list of resources matching both given state id and resource given. Return an empty list if no resource was found, or if the state does not exist.
      • doRemoveWorkFlowResource

        public void doRemoveWorkFlowResource​(int nIdResource,
                                             java.lang.String strResourceType)
        Remove in every workflows the resource specified in parameter
        Parameters:
        nIdResource - the resource id
        strResourceType - the resource type
      • doRemoveWorkFlowResourceByListId

        public void doRemoveWorkFlowResourceByListId​(java.util.List<java.lang.Integer> lListIdResource,
                                                     java.lang.String strResourceType,
                                                     java.lang.Integer nIdWorflow)
        Remove list of resource workflow by list id
        Parameters:
        lListIdResource - list of id resource
        strResourceType - the ressource type
        nIdWorflow - the workflow id
      • getDisplayTasksForm

        @Deprecated
        public java.lang.String getDisplayTasksForm​(int nIdResource,
                                                    java.lang.String strResourceType,
                                                    int nIdAction,
                                                    javax.servlet.http.HttpServletRequest request,
                                                    java.util.Locale locale)
        Deprecated.
        use getDisplayTasksForm( int, String, int, HttpServletRequest, Locale, User )
        returns the tasks form
        Parameters:
        nIdResource - the document id
        strResourceType - the document type
        request - the request
        nIdAction - the action id
        locale - the locale
        Returns:
        the tasks form associated to the action
      • getDisplayTasksForm

        public java.lang.String getDisplayTasksForm​(int nIdResource,
                                                    java.lang.String strResourceType,
                                                    int nIdAction,
                                                    javax.servlet.http.HttpServletRequest request,
                                                    java.util.Locale locale,
                                                    fr.paris.lutece.api.user.User user)
        returns the tasks form
        Parameters:
        nIdResource - the document id
        strResourceType - the document type
        request - the request
        nIdAction - the action id
        locale - the locale
        user - the user
        Returns:
        the tasks form associated to the action
      • isAuthorized

        public boolean isAuthorized​(int nIdResource,
                                    java.lang.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
        user - the User
        nIdWorkflow - the workflow id
        Returns:
        a list of Action
      • isAuthorized

        @Deprecated
        public boolean isAuthorized​(int nIdResource,
                                    java.lang.String strResourceType,
                                    int nIdWorkflow,
                                    AdminUser user)
        Deprecated.
        use isAuthorized( int, String, int, 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
        user - the User
        nIdWorkflow - the workflow id
        Returns:
        a list of Action
      • getAuthorizedResourceList

        public java.util.List<java.lang.Integer> getAuthorizedResourceList​(java.lang.String strResourceType,
                                                                           int nIdWorkflow,
                                                                           int nIdWorkflowState,
                                                                           java.lang.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 or -1 for all workflow states
        nExternalParentId - The external parent id
        user - the User
        Returns:
        a list resource id
      • getAuthorizedResourceList

        @Deprecated
        public java.util.List<java.lang.Integer> getAuthorizedResourceList​(java.lang.String strResourceType,
                                                                           int nIdWorkflow,
                                                                           int nIdWorkflowState,
                                                                           java.lang.Integer nExternalParentId,
                                                                           AdminUser user)
        Deprecated.
        use getAuthorizedResourceList( String, int, int, Integer, User )
        Get all authorized resource Id
        Parameters:
        strResourceType - the resource type
        nIdWorkflow - the workflow id
        nIdWorkflowState - The workflow state id or -1 for all workflow states
        nExternalParentId - The external parent id
        user - the User
        Returns:
        a list resource id
      • getAuthorizedResourceList

        public java.util.List<java.lang.Integer> getAuthorizedResourceList​(java.lang.String strResourceType,
                                                                           int nIdWorkflow,
                                                                           java.util.List<java.lang.Integer> lListIdWorkflowState,
                                                                           java.lang.Integer nExternalParentId,
                                                                           fr.paris.lutece.api.user.User user)
        Get all authorized resource Id by list of state
        Parameters:
        strResourceType - the resource type
        nIdWorkflow - the workflow id
        lListIdWorkflowState - The workflow state id or null for all workflow states
        nExternalParentId - the externbal parent identifier
        user - the User
        Returns:
        a list resource id
      • getAuthorizedResourceList

        @Deprecated
        public java.util.List<java.lang.Integer> getAuthorizedResourceList​(java.lang.String strResourceType,
                                                                           int nIdWorkflow,
                                                                           java.util.List<java.lang.Integer> lListIdWorkflowState,
                                                                           java.lang.Integer nExternalParentId,
                                                                           AdminUser user)
        Deprecated.
        use getAuthorizedResourceList( String, int, List, Integer, User )
        Get all authorized resource Id by list of state
        Parameters:
        strResourceType - the resource type
        nIdWorkflow - the workflow id
        lListIdWorkflowState - The workflow state id or null for all workflow states
        nExternalParentId - the externbal parent identifier
        user - the User
        Returns:
        a list resource id
      • getWorkflowsEnabled

        public ReferenceList getWorkflowsEnabled​(fr.paris.lutece.api.user.User user,
                                                 java.util.Locale locale)
        return a reference list which contains a list enabled workflow
        Parameters:
        user - the User
        locale - the locale
        Returns:
        a reference list which contains a list enabled workflow
      • getWorkflowsEnabled

        @Deprecated
        public ReferenceList getWorkflowsEnabled​(AdminUser user,
                                                 java.util.Locale locale)
        Deprecated.
        use getWorkflowsEnabled( User, Locale )
        return a reference list which contains a list enabled workflow
        Parameters:
        user - the User
        locale - the locale
        Returns:
        a reference list which contains a list enabled workflow
      • getAllStateByWorkflow

        public java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.state.State> getAllStateByWorkflow​(int nIdWorkflow,
                                                                                                                     fr.paris.lutece.api.user.User user)
        returns all state of a given workflow
        Parameters:
        user - the user
        nIdWorkflow - the workflow id
        Returns:
        the state of a given document
      • getAllStateByWorkflow

        @Deprecated
        public java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.state.State> getAllStateByWorkflow​(int nIdWorkflow,
                                                                                                                     AdminUser user)
        Deprecated.
        use getAllStateByWorkflow( int, User )
        returns all state of a given workflow
        Parameters:
        user - the adminUser
        nIdWorkflow - the workflow id
        Returns:
        the state of a given document
      • getState

        public fr.paris.lutece.plugins.workflowcore.business.state.State getState​(int nIdResource,
                                                                                  java.lang.String strResourceType,
                                                                                  int nIdWorkflow,
                                                                                  java.lang.Integer nIdExternalParentId)
        returns the state of a given document of the document in the workflow and the user role
        Parameters:
        nIdResource - the document id
        strResourceType - the document type
        nIdWorkflow - the workflow id
        nIdExternalParentId - the external parent id
        Returns:
        the state of a given document
      • executeActionAutomatic

        @Deprecated
        public void executeActionAutomatic​(int nIdResource,
                                           java.lang.String strResourceType,
                                           int nIdWorkflow,
                                           java.lang.Integer nExternalParentId)
        Deprecated.
        use executeActionAutomatic( int, String, int, Integer, User )
        Execute action automatic
        Parameters:
        nIdResource - the document id
        strResourceType - the document type
        nIdWorkflow - the workflow id
        nExternalParentId - the external parent id
      • executeActionAutomatic

        public void executeActionAutomatic​(int nIdResource,
                                           java.lang.String strResourceType,
                                           int nIdWorkflow,
                                           java.lang.Integer nExternalParentId,
                                           fr.paris.lutece.api.user.User user)
        Execute action automatic
        Parameters:
        nIdResource - the document id
        strResourceType - the document type
        nIdWorkflow - the workflow id
        nExternalParentId - the external parent id
        user - the user
      • getMassActions

        public java.util.List<fr.paris.lutece.plugins.workflowcore.business.action.Action> getMassActions​(int nIdWorkflow)
        Get the list of mass actions from a given id workflow
        Parameters:
        nIdWorkflow - the id workflow
        Returns:
        the list of mass actions
      • getMassActions

        public java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> getMassActions​(int nIdWorkflow,
                                                                                                                int nIdState,
                                                                                                                fr.paris.lutece.api.user.User user)
        Get the list of mass actions from a given id workflow
        Parameters:
        nIdWorkflow - the id workflow
        nIdState -
        user -
        Returns:
        the list of mass actions
      • canProcessAction

        @Deprecated
        public boolean canProcessAction​(int nIdResource,
                                        java.lang.String strResourceType,
                                        int nIdAction,
                                        java.lang.Integer nExternalParentId,
                                        javax.servlet.http.HttpServletRequest request,
                                        boolean bIsAutomatic)
        Deprecated.
        use canProcessAction( int, String, int, Integer, HttpServletRequest, User )
        Check if the action can be proceed for the given resource
        Parameters:
        nIdResource - the id resource
        strResourceType - the resource type
        nIdAction - the id action
        nExternalParentId - the external parent id
        request - the HTTP request
        bIsAutomatic - is automatic action
        Returns:
        true if the action can proceed, false otherwise
      • canProcessAction

        public boolean canProcessAction​(int nIdResource,
                                        java.lang.String strResourceType,
                                        int nIdAction,
                                        java.lang.Integer nExternalParentId,
                                        javax.servlet.http.HttpServletRequest request,
                                        boolean bIsAutomatic,
                                        fr.paris.lutece.api.user.User user)
        Check if the action can be proceed for the given resource
        Parameters:
        nIdResource - the id resource
        strResourceType - the resource type
        nIdAction - the id action
        nExternalParentId - the external parent id
        request - the HTTP request
        bIsAutomatic - is automatic action
        user - the RBACUser
        Returns:
        true if the action can proceed, false otherwise
      • doProcessAutomaticReflexiveActions

        @Deprecated
        public void doProcessAutomaticReflexiveActions​(int nIdResource,
                                                       java.lang.String strResourceType,
                                                       int nIdState,
                                                       java.lang.Integer nIdExternalParent,
                                                       java.util.Locale locale)
        Deprecated.
        use doProcessAutomaticReflexiveActions( int, String, int, Integer, Locale, User )
        Proceed automatic reflexive actions of state given in parameter. This method should be called anytime a service changed the state of a resource without proceeding a workflow action
        Parameters:
        nIdResource - the resource id
        strResourceType - the resource type
        nIdState - the state of the resource id
        nIdExternalParent - the external parent id*
        locale - locale
      • doProcessAutomaticReflexiveActions

        public void doProcessAutomaticReflexiveActions​(int nIdResource,
                                                       java.lang.String strResourceType,
                                                       int nIdState,
                                                       java.lang.Integer nIdExternalParent,
                                                       java.util.Locale locale,
                                                       fr.paris.lutece.api.user.User user)
        Proceed automatic reflexive actions of state given in parameter. This method should be called anytime a service changed the state of a resource without proceeding a workflow action
        Parameters:
        nIdResource - the resource id
        strResourceType - the resource type
        nIdState - the state of the resource id
        nIdExternalParent - the external parent id*
        locale - locale
        user - the user