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


public interface IWorkflowService

WorkflowService


Method Summary
 void doProcessAction(int nIdResource, java.lang.String strResourceType, int nIdAction, javax.servlet.http.HttpServletRequest request, java.util.Locale locale)
          Proceed action given in parameter
 void doRemoveWorkFlowResource(int nIdResource, java.lang.String strResourceType)
          Remove in all workflows the resource specified in parameter
 java.lang.String doSaveTasksForm(int nIdResource, java.lang.String strResourceType, int nIdAction, javax.servlet.http.HttpServletRequest request, java.util.Locale locale)
          Perform the information on the various tasks associated with the given action specified in parameter
 java.util.Collection<Action> getActions(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, 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
 java.util.Collection<State> getAllStateByWorkflow(int nIdWorkflow, AdminUser user)
          returns all state of a given workflow
 java.lang.String getDisplayDocumentHistory(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, javax.servlet.http.HttpServletRequest request, java.util.Locale locale)
          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)
          returns the tasks form
 java.lang.String getDocumentHistoryXml(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, javax.servlet.http.HttpServletRequest request, java.util.Locale locale)
          returns a xml wich contains the actions history performed on a resource
 java.util.Collection<java.lang.Integer> getListIdRessourceByState(int nIdState, java.lang.String strResourceType, AdminUser user)
          return a list wich contains idRessource for a given state
 State getState(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, AdminUser user)
          returns the state of a given document of the document in the workflow and the user role
 ReferenceList getWorkflowsEnabled(AdminUser user, java.util.Locale locale)
          return a referencelist wich contains a list enabled workflow
 boolean isAuthorized(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, AdminUser user)
          Check that a given user is allowed to view a resource depending the state of the resource
 boolean isDisplayTasksForm(int nIdAction, java.util.Locale locale)
          return true if a form is associate to the action
 

Method Detail

getActions

java.util.Collection<Action> getActions(int nIdResource,
                                        java.lang.String strResourceType,
                                        int nIdWorkflow,
                                        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:
nIdResource - the document id
strResourceType - the document type
user - the adminUser
nIdWorkflow - the workflow id
Returns:
a list of Action

getState

State getState(int nIdResource,
               java.lang.String strResourceType,
               int nIdWorkflow,
               AdminUser user)
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
user - the adminUser
nIdWorkflow - the workflow id
Returns:
the state of a given document

isDisplayTasksForm

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

void doProcessAction(int nIdResource,
                     java.lang.String strResourceType,
                     int nIdAction,
                     javax.servlet.http.HttpServletRequest request,
                     java.util.Locale locale)
Proceed action given in parameter

Parameters:
nIdResource - the resource id
strResourceType - the resource type
request - the request
nIdAction - the action id
locale - locale

getDisplayDocumentHistory

java.lang.String getDisplayDocumentHistory(int nIdResource,
                                           java.lang.String strResourceType,
                                           int nIdWorkflow,
                                           javax.servlet.http.HttpServletRequest request,
                                           java.util.Locale locale)
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

getDocumentHistoryXml

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

doSaveTasksForm

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

Parameters:
nIdResource - the resource id
strResourceType - the resource type
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

doRemoveWorkFlowResource

void doRemoveWorkFlowResource(int nIdResource,
                              java.lang.String strResourceType)
Remove in all workflows the resource specified in parameter

Parameters:
nIdResource - the resource id
strResourceType - the resource type

getDisplayTasksForm

java.lang.String getDisplayTasksForm(int nIdResource,
                                     java.lang.String strResourceType,
                                     int nIdAction,
                                     javax.servlet.http.HttpServletRequest request,
                                     java.util.Locale locale)
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

isAuthorized

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

getWorkflowsEnabled

ReferenceList getWorkflowsEnabled(AdminUser user,
                                  java.util.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

java.util.Collection<State> getAllStateByWorkflow(int nIdWorkflow,
                                                  AdminUser user)
returns all state of a given workflow

Parameters:
user - the adminUser
nIdWorkflow - the workflow id
Returns:
the state of a given document

getListIdRessourceByState

java.util.Collection<java.lang.Integer> getListIdRessourceByState(int nIdState,
                                                                  java.lang.String strResourceType,
                                                                  AdminUser user)
return a list wich contains idRessource for a given state

Parameters:
nIdState - the id State
strResourceType - the resource type
user - the AdminUser
Returns:
a list wich contains idRessource


Copyright © 2009 Mairie de Paris. All Rights Reserved.