fr.paris.lutece.portal.service.workflow
Interface IWorkflowProvider


public interface IWorkflowProvider

IWorkflowProvider.


Method Summary
 boolean canProcessAction(int nIdAction, javax.servlet.http.HttpServletRequest request)
          Check if the action can be proceed for the given resource.
 void doSaveTasksForm(int nIdResource, String strResourceType, int nIdAction, Integer nExternalParentId, javax.servlet.http.HttpServletRequest request, Locale locale, String strUserAccessCode)
          Perform the information on the various tasks associated with the given action specified in parameter.
 String doValidateTasksForm(int nIdResource, String strResourceType, int nIdAction, javax.servlet.http.HttpServletRequest request, Locale locale)
          Test if the information relating to various tasks associated with action are validated.
 Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> getActions(Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> listActions, AdminUser 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(Map<Integer,List<fr.paris.lutece.plugins.workflowcore.business.action.Action>> mapActions, AdminUser 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, AdminUser user)
          returns all state of a given workflow.
 List<Integer> getAuthorizedResourceList(String strResourceType, int nIdWorkflow, int nIdWorkflowState, Integer nExternalParentId, AdminUser user)
          Get all authorized resource Id.
 List<Integer> getAuthorizedResourceList(String strResourceType, int nIdWorkflow, List<Integer> lListIdWorkflowState, Integer nExternalParentId, AdminUser user)
          Get all authorized resource Id.
 String getDisplayDocumentHistory(int nIdResource, String strResourceType, int nIdWorkflow, javax.servlet.http.HttpServletRequest request, Locale locale)
          returns the actions history performed on a resource.
 String getDisplayTasksForm(int nIdResource, String strResourceType, int nIdAction, javax.servlet.http.HttpServletRequest request, Locale locale)
          returns the tasks form.
 String getDocumentHistoryXml(int nIdResource, String strResourceType, int nIdWorkflow, javax.servlet.http.HttpServletRequest request, Locale locale)
          returns a xml wich contains the actions history performed on a resource.
 String getUserAccessCode(javax.servlet.http.HttpServletRequest request)
          The user access code.
 ReferenceList getWorkflowsEnabled(AdminUser user, Locale locale)
          return a referencelist wich contains a list enabled workflow.
 boolean isAuthorized(int nIdResource, String strResourceType, int nIdWorkflow, AdminUser user)
          Check that a given user is allowed to view a resource depending the state of the resource.
 

Method Detail

getActions

Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> getActions(Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> listActions,
                                                                                   AdminUser 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:
listActions - the list actions
user - the adminUser
Returns:
a list of Action

getActions

Map<Integer,List<fr.paris.lutece.plugins.workflowcore.business.action.Action>> getActions(Map<Integer,List<fr.paris.lutece.plugins.workflowcore.business.action.Action>> mapActions,
                                                                                          AdminUser 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:
mapActions - the map actions
user - the adminUser
Returns:
a list of Action

getDisplayDocumentHistory

String getDisplayDocumentHistory(int nIdResource,
                                 String strResourceType,
                                 int nIdWorkflow,
                                 javax.servlet.http.HttpServletRequest request,
                                 Locale locale)
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
Returns:
the history of actions performed on a resource

getDocumentHistoryXml

String getDocumentHistoryXml(int nIdResource,
                             String strResourceType,
                             int nIdWorkflow,
                             javax.servlet.http.HttpServletRequest request,
                             Locale locale)
returns a xml wich contains 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
Returns:
a xml wich contains the history of actions performed on a resource

getDisplayTasksForm

String getDisplayTasksForm(int nIdResource,
                           String strResourceType,
                           int nIdAction,
                           javax.servlet.http.HttpServletRequest request,
                           Locale locale)
returns the tasks form.

Parameters:
nIdResource - the resource id
strResourceType - the resource type
nIdAction - the action id
request - the request
locale - the locale
Returns:
the tasks form associated to the action

getAuthorizedResourceList

List<Integer> getAuthorizedResourceList(String strResourceType,
                                        int nIdWorkflow,
                                        int nIdWorkflowState,
                                        Integer nExternalParentId,
                                        AdminUser 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 AdminUser
Returns:
The list

getAuthorizedResourceList

List<Integer> getAuthorizedResourceList(String strResourceType,
                                        int nIdWorkflow,
                                        List<Integer> lListIdWorkflowState,
                                        Integer nExternalParentId,
                                        AdminUser 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 AdminUser
Returns:
The list

getWorkflowsEnabled

ReferenceList getWorkflowsEnabled(AdminUser user,
                                  Locale locale)
return a referencelist wich contains a list enabled workflow.

Parameters:
user - the AdminUser
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,
                                                                                            AdminUser user)
returns all state of a given workflow.

Parameters:
listStates - the list states
user - the adminUser
Returns:
the state of a given document

getUserAccessCode

String getUserAccessCode(javax.servlet.http.HttpServletRequest request)
The user access code.

Parameters:
request - the HTTP request
Returns:
the user access code

isAuthorized

boolean isAuthorized(int nIdResource,
                     String strResourceType,
                     int nIdWorkflow,
                     AdminUser 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 nIdAction,
                         javax.servlet.http.HttpServletRequest request)
Check if the action can be proceed for the given resource.

Parameters:
nIdAction - the id action
request - the HTTP request
Returns:
true if the action can proceed, false otherwise

doValidateTasksForm

String doValidateTasksForm(int nIdResource,
                           String strResourceType,
                           int nIdAction,
                           javax.servlet.http.HttpServletRequest request,
                           Locale locale)
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
Returns:
null if there is no error in the tasks form, return the error message otherwise

doSaveTasksForm

void doSaveTasksForm(int nIdResource,
                     String strResourceType,
                     int nIdAction,
                     Integer nExternalParentId,
                     javax.servlet.http.HttpServletRequest request,
                     Locale locale,
                     String strUserAccessCode)
Perform the information on the various tasks associated with the given action specified in parameter.

Parameters:
nIdResource - the resource id
strResourceType - the resource type
nIdAction - the action id
nExternalParentId - the external parent id
request - the request
locale - the locale
strUserAccessCode - the user access code


Copyright © 2014 Mairie de Paris. All Rights Reserved.