Interface IWorkflowProvider
public interface IWorkflowProvider
IWorkflowProvider.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanProcessAction(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.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 listgetAuthorizedResourceList(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.booleanisAuthorized(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 documentstrResourceType- the type of the documentlistActions- the list actionsuser- 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 documentmapActions- the map actionsuser- 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 idstrResourceType- the resource typenIdWorkflow- the workflow idrequest- the requestlocale- the localeuser- 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 idstrResourceType- the resource typenIdWorkflow- the workflow idrequest- the requestlocale- the localemodel- The model to add to the default modelstrTemplate- The templateuser- 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 idstrResourceType- the resource typenIdAction- the action idrequest- the requestlocale- the localeuser- 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 typenIdWorkflow- the workflow idnIdWorkflowState- The workflow state idnExternalParentId- The external parent iduser- 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 typenIdWorkflow- the workflow idlListIdWorkflowState- The list workflow state idnExternalParentId- he external parent iduser- the User- Returns:
- The list
-
getWorkflowsEnabled
return a referencelist wich contains a list enabled workflow.- Parameters:
user- the Userlocale- 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 statesuser- 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 requestuser- 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 idstrResourceType- the document typenIdWorkflow- 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 resourcestrResourceType- the type of the resourcenIdAction- the id actionrequest- the HTTP requestuser- 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 idstrResourceType- the resource typenIdAction- the action idrequest- the requestlocale- the localeuser- the user- Returns:
- null if there is no error in the tasks form, return the error message otherwise
-