Interface IWorkflowProvider
-
public interface IWorkflowProviderIWorkflowProvider.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanProcessAction(int nIdResource, java.lang.String strResourceType, int nIdAction, javax.servlet.http.HttpServletRequest request, fr.paris.lutece.api.user.User user)Check if the action can be proceed for the given resource.java.lang.StringdoValidateTasksForm(int nIdResource, java.lang.String strResourceType, int nIdAction, javax.servlet.http.HttpServletRequest request, java.util.Locale locale, fr.paris.lutece.api.user.User user)Test if the information relating to various tasks associated with action are validated.java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action>getActions(int nIdResource, java.lang.String strResourceType, java.util.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.java.util.Map<java.lang.Integer,java.util.List<fr.paris.lutece.plugins.workflowcore.business.action.Action>>getActions(java.lang.String strResourceType, java.util.Map<java.lang.Integer,java.util.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.java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.state.State>getAllStateByWorkflow(java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.state.State> listStates, fr.paris.lutece.api.user.User user)returns all state of a given workflow.java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action>getAuthorizedActions(java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> listActions, fr.paris.lutece.api.user.User user)Returns authorized action listjava.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, java.util.List<java.lang.Integer> lListIdWorkflowState, java.lang.Integer nExternalParentId, fr.paris.lutece.api.user.User user)Get all authorized resource Id.java.lang.StringgetDisplayDocumentHistory(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.StringgetDisplayDocumentHistory(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.StringgetDisplayTasksForm(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.java.lang.StringgetUserAccessCode(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.api.user.User user)The user access code.ReferenceListgetWorkflowsEnabled(fr.paris.lutece.api.user.User user, java.util.Locale locale)return a referencelist wich contains a list enabled workflow.booleanisAuthorized(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.
-
-
-
Method Detail
-
getActions
java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> getActions(int nIdResource, java.lang.String strResourceType, java.util.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
java.util.Map<java.lang.Integer,java.util.List<fr.paris.lutece.plugins.workflowcore.business.action.Action>> getActions(java.lang.String strResourceType, java.util.Map<java.lang.Integer,java.util.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
java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> getAuthorizedActions(java.util.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
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 idstrResourceType- the resource typenIdWorkflow- the workflow idrequest- the requestlocale- the localeuser- the User- Returns:
- the history of actions performed on a resource
-
getDisplayDocumentHistory
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 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
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 resource idstrResourceType- the resource typenIdAction- the action idrequest- the requestlocale- the localeuser- the User- Returns:
- the tasks form associated to the action
-
getAuthorizedResourceList
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 typenIdWorkflow- the workflow idnIdWorkflowState- The workflow state idnExternalParentId- The external parent iduser- the User- Returns:
- The list
-
getAuthorizedResourceList
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.- Parameters:
strResourceType- the resource typenIdWorkflow- the workflow idlListIdWorkflowState- The list workflow state idnExternalParentId- he external parent iduser- the User- Returns:
- The list
-
getWorkflowsEnabled
ReferenceList getWorkflowsEnabled(fr.paris.lutece.api.user.User user, java.util.Locale locale)
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
java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.state.State> getAllStateByWorkflow(java.util.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
java.lang.String getUserAccessCode(javax.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, 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 idstrResourceType- the document typenIdWorkflow- the workflow id*user- the user- Returns:
- a list of Action
-
canProcessAction
boolean canProcessAction(int nIdResource, java.lang.String strResourceType, int nIdAction, javax.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
java.lang.String doValidateTasksForm(int nIdResource, java.lang.String strResourceType, int nIdAction, javax.servlet.http.HttpServletRequest request, java.util.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
-
-