|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.portal.service.workflow.WorkflowService
public final class WorkflowService
WorkflowService
Method Summary | |
---|---|
boolean |
canProcessAction(int nIdResource,
java.lang.String strResourceType,
int nIdAction,
java.lang.Integer nExternalParentId,
javax.servlet.http.HttpServletRequest request,
boolean bIsAutomatic)
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)
Proceed action given in parameter |
void |
doRemoveWorkFlowResource(int nIdResource,
java.lang.String strResourceType)
Remove in all 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)
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)
Execute action automatic |
java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.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.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)
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(int nIdWorkflow,
AdminUser user)
returns all state of a given workflow |
java.util.List<java.lang.Integer> |
getAuthorizedResourceList(java.lang.String strResourceType,
int nIdWorkflow,
int nIdWorkflowState,
java.lang.Integer nExternalParentId,
AdminUser 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,
AdminUser user)
Get all authorized resource Id by list of state |
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 |
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 |
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(AdminUser user,
java.util.Locale locale)
return a reference list which 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 |
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static WorkflowService getInstance()
public boolean isAvailable()
public java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> getActions(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, AdminUser user)
nIdResource
- the document idstrResourceType
- the document typeuser
- the adminUsernIdWorkflow
- the workflow id
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)
listIdResource
- the list of resource idstrResourceType
- the document typenIdExternalParentId
- the external parent identifiernIdWorkflow
- the workflow iduser
- the adminUser
public boolean isDisplayTasksForm(int nIdAction, java.util.Locale locale)
nIdAction
- the action idlocale
- the loacle
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)
nIdResource
- the resource idstrResourceType
- the resource typenIdAction
- the action idnExternalParentId
- the external parent idrequest
- the requestlocale
- localebIsAutomatic
- Is automaticpublic java.lang.String getDisplayDocumentHistory(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, javax.servlet.http.HttpServletRequest request, java.util.Locale locale)
nIdResource
- the resource idstrResourceType
- the resource typerequest
- the requestnIdWorkflow
- the workflow idlocale
- the locale
public java.lang.String getDocumentHistoryXml(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, javax.servlet.http.HttpServletRequest request, java.util.Locale locale)
nIdResource
- the resource idstrResourceType
- the resource typerequest
- the requestnIdWorkflow
- the workflow idlocale
- the locale
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)
nIdResource
- the resource idstrResourceType
- the resource typenExternalParentId
- the external parent idrequest
- the requestnIdAction
- the action idlocale
- the locale
public void doRemoveWorkFlowResource(int nIdResource, java.lang.String strResourceType)
nIdResource
- the resource idstrResourceType
- the resource typepublic void doRemoveWorkFlowResourceByListId(java.util.List<java.lang.Integer> lListIdResource, java.lang.String strResourceType, java.lang.Integer nIdWorflow)
lListIdResource
- list of id resourcestrResourceType
- the ressource typenIdWorflow
- the workflow idpublic java.lang.String getDisplayTasksForm(int nIdResource, java.lang.String strResourceType, int nIdAction, javax.servlet.http.HttpServletRequest request, java.util.Locale locale)
nIdResource
- the document idstrResourceType
- the document typerequest
- the requestnIdAction
- the action idlocale
- the locale
public boolean isAuthorized(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, AdminUser user)
nIdResource
- the document idstrResourceType
- the document typeuser
- the AdminUsernIdWorkflow
- the workflow id
public java.util.List<java.lang.Integer> getAuthorizedResourceList(java.lang.String strResourceType, int nIdWorkflow, int nIdWorkflowState, java.lang.Integer nExternalParentId, AdminUser user)
strResourceType
- the resource typenIdWorkflow
- the workflow idnIdWorkflowState
- The workflow state id or -1 for all workflow statesnExternalParentId
- The external parent iduser
- the AdminUser
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)
strResourceType
- the resource typenIdWorkflow
- the workflow idlListIdWorkflowState
- The workflow state id or null for all workflow statesnExternalParentId
- the externbal parent identifieruser
- the AdminUser
public ReferenceList getWorkflowsEnabled(AdminUser user, java.util.Locale locale)
user
- the AdminUserlocale
- the locale
public java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.state.State> getAllStateByWorkflow(int nIdWorkflow, AdminUser user)
user
- the adminUsernIdWorkflow
- the workflow id
public fr.paris.lutece.plugins.workflowcore.business.state.State getState(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, java.lang.Integer nIdExternalParentId)
nIdResource
- the document idstrResourceType
- the document typenIdWorkflow
- the workflow idnIdExternalParentId
- the external parent id
public void executeActionAutomatic(int nIdResource, java.lang.String strResourceType, int nIdWorkflow, java.lang.Integer nExternalParentId)
nIdResource
- the document idstrResourceType
- the document typenIdWorkflow
- the workflow idnExternalParentId
- the external parent idpublic java.util.List<fr.paris.lutece.plugins.workflowcore.business.action.Action> getMassActions(int nIdWorkflow)
nIdWorkflow
- the id workflow
public boolean canProcessAction(int nIdResource, java.lang.String strResourceType, int nIdAction, java.lang.Integer nExternalParentId, javax.servlet.http.HttpServletRequest request, boolean bIsAutomatic)
nIdResource
- the id resourcestrResourceType
- the resource typenIdAction
- the id actionnExternalParentId
- the external parent idrequest
- the HTTP requestbIsAutomatic
- is automatic action
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |