Class WorkflowBeanService<T>
java.lang.Object
fr.paris.lutece.plugins.identityimport.wf.WorkflowBeanService<T>
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHistory(WorkflowBean<T> wfBean, javax.servlet.http.HttpServletRequest request, Locale locale) refresh workflow historyvoidaddSubResourceStates(WorkflowBean<T> wfBean) voidcountSubResources(WorkflowBean<T> wfBean) Count bean sub resources if anycreateWorkflowBean(T resource, int nResourceId, int nExternalParentId, fr.paris.lutece.api.user.User user) Create a WorkflowBean and initialize itcreateWorkflowBean(T resource, int nResourceId, fr.paris.lutece.api.user.User user) Create a WorkflowBean and initialize itbooleanexistsTaskForm(int nAction, Locale locale) Check if the action contains a task that needs to display and submit a formget workflow resource typegetTaskForm(WorkflowBean<T> wfBean, int nAction, javax.servlet.http.HttpServletRequest request, Locale locale, String strTargetJsp, String strWorkflowAction) get task form HTMLintget workflow keyvoidprocessAction(WorkflowBean<T> wfBean, int nAction, javax.servlet.http.HttpServletRequest request, Locale locale) process actionvoidprocessActionNoUser(WorkflowBean<T> wfBean, int nAction, javax.servlet.http.HttpServletRequest request, Locale locale) process actionvoidprocessAutomaticAction(WorkflowBean<T> wfBean, int nAction, javax.servlet.http.HttpServletRequest request, Locale locale) process automatic actionrefresh(WorkflowBean<T> wfBean) Refresh (or initialize) the state of the resource and the available actionsvalidateTaskForm(WorkflowBean<T> wfBean, int nAction, javax.servlet.http.HttpServletRequest request, Locale locale) validate Task form (and process the action if there is no error)
-
Field Details
-
PARAMETER_SUBMITTED_TASK_FORM
- See Also:
-
PARAMETER_RESOURCE_ID
- See Also:
-
PARAMETER_RESOURCE_TYPE_ID
- See Also:
-
PARAMETER_ACTION_ID
- See Also:
-
PARAMETER_ID_PARAMETER
- See Also:
-
CONSTANT_PROCESS_WORKFLOW_ACTION
- See Also:
-
-
Constructor Details
-
WorkflowBeanService
constructor- Parameters:
strResourceType-nWorkflowKey-
-
-
Method Details
-
createWorkflowBean
public WorkflowBean<T> createWorkflowBean(T resource, int nResourceId, fr.paris.lutece.api.user.User user) Create a WorkflowBean and initialize it- Parameters:
resource-nResourceId-user-- Returns:
- the WorkflowBean
-
createWorkflowBean
public WorkflowBean<T> createWorkflowBean(T resource, int nResourceId, int nExternalParentId, fr.paris.lutece.api.user.User user) Create a WorkflowBean and initialize it- Parameters:
resource-nResourceId-nExternalParentId-user-- Returns:
- the workflow bean
-
getResourceType
get workflow resource type- Returns:
- the type
-
getWorkflowKey
public int getWorkflowKey()get workflow key- Returns:
- the key
-
refresh
Refresh (or initialize) the state of the resource and the available actions- Returns:
- the workflow resource
-
processAction
public void processAction(WorkflowBean<T> wfBean, int nAction, javax.servlet.http.HttpServletRequest request, Locale locale) process action- Parameters:
wfBean-nAction-request-locale-
-
processActionNoUser
public void processActionNoUser(WorkflowBean<T> wfBean, int nAction, javax.servlet.http.HttpServletRequest request, Locale locale) process action- Parameters:
wfBean-nAction-request-locale-
-
getTaskForm
public String getTaskForm(WorkflowBean<T> wfBean, int nAction, javax.servlet.http.HttpServletRequest request, Locale locale, String strTargetJsp, String strWorkflowAction) get task form HTML- Parameters:
wfBean-nAction-request-locale-strTargetJsp-- Returns:
- the HTML
-
validateTaskForm
public String validateTaskForm(WorkflowBean<T> wfBean, int nAction, javax.servlet.http.HttpServletRequest request, Locale locale) validate Task form (and process the action if there is no error)- Parameters:
wfBean-nAction-request-locale-- Returns:
- the error message url, null orherwise
-
existsTaskForm
Check if the action contains a task that needs to display and submit a form- Parameters:
nAction-locale-- Returns:
- true if a task require a form
-
processAutomaticAction
public void processAutomaticAction(WorkflowBean<T> wfBean, int nAction, javax.servlet.http.HttpServletRequest request, Locale locale) process automatic action- Parameters:
nAction-request-locale-nExternalParentId-
-
addHistory
public void addHistory(WorkflowBean<T> wfBean, javax.servlet.http.HttpServletRequest request, Locale locale) refresh workflow history- Parameters:
request-locale-
-
countSubResources
Count bean sub resources if any- Parameters:
wfBean-
-
addSubResourceStates
-