Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.wli.worklist.portal
Class TaskUIPageFlowController

    java.lang.Object
      org.apache.beehive.netui.pageflow.PageFlowManagedObject
          org.apache.beehive.netui.pageflow.FlowController
              org.apache.beehive.netui.pageflow.PageFlowController
                  com.bea.wli.worklist.portal.TaskUIPageFlowController

All Implemented Interfaces:
  Serializable, EventListener, HttpSessionBindingListener, ActionResolver, org.apache.beehive.netui.pageflow.internal.InternalConstants, PageFlowConstants

    public abstract class TaskUIPageFlowController

extends PageFlowController

Base class for custom task UI page flows. This controller maintains a 'context' task and information about that task. This makes it easier for custom task UI controllers to focus on their value-added logic and not just maintaining context information about the task they are editing.

This base class defines a number of 'action helper' methods that are intended to be called from action methods on a custom task UI controller. These methods are named according to the convention '<action name>ActionHelper'. You should call these methods early in the action method for which they are named. These helpers keep the state for the 'context' task in sync.

In particular, this controller defines a number of action helpers for taking actions on the context task. These actions simplify the process of displaying a page to accept action property values, and then to actually take the action on the context task.

1. showStepActionActionHelper - prepare to take an action
2. (optional)property edit helpers
3. takeStepActionActionHelper - take the action

Additionally, this controller defines a number of action helpers for editing user-define properties on a task using the Worklist property editor tag and the built-in property editors for JavaBean/XMLBean/Text properties. These helpers greatly simplify the editing of these types of user-defined properties.

1. editPropActionHelper - starts the edit of a given property
2. cancelPropActionHelper - cancels the edit of a given property
3. okPropActionHelper - completes the edit of a given property

Simple Actions:

- doneAction - Required exit point that will branch the UI flow back to the calling page flow.
- stepDoneAction - Required exit point that will branch the UI flow back to the calling page flow just long enough to redisplay the current task with the proper UI for the next/new step.

See Also:
  Serialized Form

Field Summary
`protected SimpleDateFormat` | `_dateFormat` SimpleDateFormat instance to be used as the format for obtaining date/time instances as values for system properties.
`protected TakeStepActionActionForm` | `_takeStepActionActionForm` The TakeStepActionActionForm instance representing the properties and other data needed to take an action on the context task.
`protected TaskData` | `_taskDataHistory` TaskData for the 'context' task at some date in the past.
`protected TaskEventHistory[]` | `_taskHistoryRecords` Current Task's History.
`protected UpdateActionForm` | `_updateActionForm` The UpdateActionForm containing the up-to-date and editable form of the data for the 'context' task.

Fields inherited from class org.apache.beehive.netui.pageflow.FlowController
`defaultLocale`

Fields inherited from interface org.apache.beehive.netui.pageflow.internal.InternalConstants
`ACTION_EXTENSION_LEN, ACTION_OVERRIDE_PREFIX, ANNOTATION_QUALIFIER, ATTR_PREFIX, BACKING_CLASS_IMPLICIT_OBJECT, BEGIN_ACTION_PATH, CURRENT_JPF_ATTR, CURRENT_LONGLIVED_ATTR, FACES_BACKING_ATTR, FACES_BACKING_EXTENSION, FACES_EXTENSION, FACES_EXTENSION_DOT, GLOBALAPP_CLASSNAME, GLOBALAPP_MEMBER_NAME, GLOBALAPP_MODULE_CONTEXT_PATH, INTERNAL_VAR_PREFIX, JSF_EXTENSION, JSF_EXTENSION_DOT, MESSAGE_IS_EXPRESSION_PREFIX, MESSAGE_IS_EXPRESSION_PREFIX_LENGTH, NETUI_CONFIG_PATH, RETURN_ACTION_VIEW_RENDERER_PARAM, RETURNING_FORM_ATTR, RETURNING_FROM_NESTING_ATTR, SHARED_FLOW_ATTR_PREFIX, SHARED_FLOW_EXTENSION, SHARED_FLOW_MODULE_PREFIX, SHARED_FLOW_MODULE_PREFIX_LEN, SHARED_FLOW_ROOT_MODULE, WEBINF_DIR`

Fields inherited from interface org.apache.beehive.netui.pageflow.PageFlowConstants
`ACTION_EXTENSION, ACTION_OVERRIDE, AUTO_VIEW_RENDER_FORWARD_NAME, BEGIN_ACTION_NAME, DEFAULT_FORWARD_OVERFLOW_COUNT, DEFAULT_NESTING_OVERFLOW_COUNT, DEFAULT_VIEW_RENDERING_EXTENSION, FORWARD_OVERFLOW_COUNT_PARAM, GLOBALAPP_CLASSNAME, GLOBALAPP_SOURCEFILE_NAME, JPF_EXTENSION, JPF_MODULE_CONFIG_EXTENSION, JPF_MODULE_CONFIG_GEN_DIR, JPF_MODULE_CONFIG_PREFIX, NESTING_OVERFLOW_COUNT_PARAM, PAGEFLOW_EXTENSION, PAGEFLOW_MODULE_CONFIG_EXTENSION, PAGEFLOW_MODULE_CONFIG_GEN_DIR, PAGEFLOW_MODULE_CONFIG_PREFIX, SECURE_FORWARDS_PARAM, VIEW_RENDERER_ATTRIBUTE_NAME, VIEW_RENDERER_URI_COMMAND, VIEW_RENDERING_EXTENSION_PARAM`

Constructor Summary
`protected` | `TaskUIPageFlowController()`

Method Summary
`String` | `assigneeListToString(Assignee assignee)` Get a formatted string value for the given Assignee object.
`protected abstract Forward` | `begin()` The begin action for this controller.
`protected void` | `beginActionHelper()` Initializes the TaskUIContextInfo maintained by this controller (and is accessed via several of the getters and helpers on this controller).
`protected void` | `cancelPropActionHelper()` Cancels the editing session for the 'active' property set in a call to editPropActionHelper, and discards an value that may have existed in the stand-alone editor.
`protected void` | `cancelStepActionActionHelper()` Cancel any pending step action you prepared for with a call to showStepActionActionHelper().
`protected void` | `cancelUpdateActionHelper()` Helper method used to step down from a proposed update to a task started with updateActionHelper.
`boolean` | `canClaimTask(TaskData data)` Returns true if the current user is not the current claimant of the task and is an assignee.
`boolean` | `canUpdate(TaskData data, com.bea.wli.worklist.userportal.TaskField name)` Check low-level (specific) rights to update a particular field based on current users affinity.
`boolean` | `canUserUpdateTask(TaskData data)` Check at high-level if the task is update-able and the current user can update it.
`boolean` | `canWorkOnTask(TaskData data)` Returns true if the current user is allowed to work on the task.
`protected TakeStepActionActionForm` | `createTakeStepActionActionForm()` Factory method that can be overridden to create a subclass of TakeStepActionActionForm.
`protected UpdateActionForm` | `createUpdateActionForm()` Factory method that can be overridden to create a subclass of UpdateActionForm.
`protected void` | `doPostPrepareRequestAttributes()` Set any final attributes required in the HttpRequest to properly render the task and/or step pages for this task.
`protected void` | `doPostRefreshTask()` Extensibility method that is called at the end of refreshTask, allowing subclasses to do any work needed on the newly refreshed task state.
`protected void` | `doPostShowTakeStepActionAction()` Utility method called at the end of showTakeStepActionActionHelper.
`protected Forward` | `editPropActionHelper(PropertyInstanceHolder[] properties)` This method is used to begin a session of editing property values using a PropertyEditorHelper embedded in this controller.
`protected TaskUIContextInfo` | `getContextInfo()` Get the context this task UI is operating in.
`protected Step` | `getCurrentStep()` Get the current step for the context task.
`StepDisplayInfo` | `getCurrentStepDisplayInfo()` Get the StepDisplayInfo for the 'context' task.
`DateFormat` | `getDateFormat()` Get the DateFormat that defines the format for date/time values used in system properties for the context task.
`String` | `getDateFormatLocalizedPattern()` Get a localized date example using the DateFormat given by getDateFormat().
`String` | `getDoneActionContext()`
`String` | `getDoneActionLabel()`
`Map<String,PropertyInstance>` | `getMandatoryTaskProperties(Step step, StepAction stepAction)` Get a map of the required properties for the given action on the context task.
`protected PropertyEditorHelper` | `getPropertyEditorHelper()` Get a PropertyEditorHelper to assist you in editing task properties in a web UI.
`protected PropertyInstanceHolder` | `getPropertyInstanceHolder(PropertyRef ref, PropertyInstanceHolder[] props)` Get a PropertyInstanceHolder instance, from the given array, that matches the property indicated in the given PropertyRef.
`protected PropertyInstanceHolder` | `getPropertyInstanceHolder(String name)` Gets a named PropertyInstanceHolder from the update action form populated on the last call to refreshTask.
`StepActionDisplayInfo[]` | `getStepActions()` Get the StepActionDisplayInfo objects for all actions available on the current step for the 'context' task.
`protected TakeStepActionActionForm` | `getTakeStepActionActionForm()`
`String` | `getTaskAdminStateStr()` Get a string representation of the admin state for the 'context' task.
`TaskData` | `getTaskData()` Get the TaskData instance for the 'context' task.
`TaskData` | `getTaskDataHistory()` Get the TaskData for the 'context' task at a pre-determined time in the past.
`Map<String,PropertyInstanceHolder>` | `getTaskEditablePropertiesMap()` Return a map of all the editable properties on the context task (keyed by the property name).
`TaskEventHistory[]` | `getTaskHistory()` Get an array of TaskEventHistory objects representing the historical events that have been tracked for the 'context' task on this controller.
`String` | `getTaskHistoryAssigneeListAsString()` Get the assignee list on the 'context' task at a pre-determined date in the past.
`StepDisplayInfo` | `getTaskHistoryStepDisplayInfo()` Get the StepDisplayInfo for the current step as indicated by the getTaskDataHistory() method.
`List<PropertyInstance>` | `getTaskHistoryUserPropertiesList()` Return a list of user-defined properties for the context task at a pre-determined date in the past.
`TaskListViewInfo[]` | `getTaskListViews()`
`protected TaskPlan` | `getTaskPlan()` Get the TaskPlan for the 'context' task for this controller.
`TaskPlanDisplayInfo` | `getTaskPlanDisplayInfo()` Get the TaskPlanDisplayInfo for the 'context' task.
`Map<String,PropertyInstance>` | `getTaskPropertiesMap()` Return a map of all the properties on the context task (keyed by the property name).
`List<PropertyInstance>` | `getTaskUserPropertiesList()` Return a list of user-defined properties for the context task.
`String` | `getTaskWorkingStateStr()` Get a string representation of the working state for the 'context' task.
`protected WorklistUIContextHelper` | `getUIContextHelper()` Get a helper object for fetching properties out of the session context.
`protected UpdateActionForm` | `getUpdateActionForm()`
`String` | `getUserName()`
`protected WorklistTaskAdmin` | `getWorklistTaskAdmin()` Get a WorklistTaskAdmin instance that can be used to perform admin-level actions against the 'context' task for this controller.
`protected WorklistTaskUser` | `getWorklistTaskUser()` Get a WorklistTaskUser instance that can be used to perform user-level actions against the 'context' task for this controller.
`protected boolean` | `isPostActionInteractiveAssignment(String actionName)` Called before taking an action on a task to determine if interactive assignment should be invoked based on the target step for the action.
`boolean` | `isTaskClaimed(TaskData data)` Is the given task in the claimed working state.
`boolean` | `isTaskClaimedByCurrentUser(TaskData data)` Is the given task claimed by the user given by the getUserName() method?
`boolean` | `isTaskEditable(TaskData data)` Is the given task in an editable admin state?.
`boolean` | `isTaskHistoryEnabled(TaskData taskData)` Indicates whether there is a TaskHistoryProvider available for the current Worklist system instance.
`boolean` | `isTaskPlan81x(TaskData taskData)` Deprecated. Will be removed when other 8.1.x compatibility features are removed.
`boolean` | `isUserAdmin(TaskData data)` Returns true if the current user is an assignee for the task.
`boolean` | `isUserAssignee(TaskData data)` Returns true if the current user is an assignee for the task.
`boolean` | `isUserOwner(TaskData data)` Returns true if the current user is an assignee for the task.
`protected void` | `okPropActionHelper(EditorValueHolder value)` Completes the editing session for the 'active' property set in a call to editPropActionHelper, and applies the given EditorValueHolder's value back to the active property.
`protected void` | `prepareRequestAttributes()` Loads the request with a number of state attributes indicating what general-purpose actions are allowed.
`protected Forward` | `refreshAction()` Called to verify the state of the task UI matches the requested task id.
`protected void` | `refreshTask()` Refreshes the information for the context task, and load it into the UpdateActionForm property for this controller.
`protected void` | `setTakeStepActionActionForm(TakeStepActionActionForm form)`
`protected void` | `setUpdateActionForm(UpdateActionForm form)`
`protected void` | `showStepActionActionHelper(StepAction action)` Helper method that can be called from an action that is used to show a page for collecting properties needed to take an action.
`protected Forward` | `showTaskListAction()` Optional exit point that will branch the UI flow back to the calling page flow and display the task list view indicated by the view HTTP request parameter.
`protected void` | `takeStepAction(String stepName, String actionName, Map<String,String> propMap)` A simple method to take an action on a task, given the step, action name, and properties for the action.
`protected void` | `takeStepActionActionHelper(TakeStepActionActionForm form)` Helper that takes an action at the current step given the information in a TakeStepActionActionForm instance.
`protected void` | `takeStepActionAndClaim(String stepName, String actionName, Map<String,String> propMap, String postActionClaimant)` A simple method to take an action on a task, given the step, action name, properties for the action, and the name of the user that should be made the claimant of this task after the action has been performed.
`protected void` | `takeStepActionAndClaimActionHelper(TakeStepActionActionForm form, String postActionClaimant)` Helper that takes an action at the current step given the information in a TakeStepActionActionForm instance and the name of the user that should be made the claimant of the task following the action.
`protected void` | `updateActionHelper(UpdateActionForm form)` Helper method to assist subclasses in updating a task based on information collected in the UpdateActionForm.

Methods inherited from class org.apache.beehive.netui.pageflow.PageFlowController
`create, ensureFailover, exitNesting, getCurrentForwardPath, getCurrentPageInfo, getDisplayName, getModulePath, getPreviousActionInfo, getPreviousActionURI, getPreviousForm, getPreviousFormBean, getPreviousForwardPath, getPreviousPageInfo, getPreviousPageInfoLegacy, getSharedFlow, getSharedFlows, getTaxonomy, getURI, internalExecute, isLongLived, isNestable, isPageFlow, isPreviousActionInfoDisabled, isPreviousPageInfoDisabled, onExitNesting, persistInSession, removeFromSession, removeSharedFlow, savePreviousPageInfo, theCurrentPageInfo, thePreviousActionInfo, thePreviousPageInfo, theSharedFlows, valueUnbound`

Methods inherited from class org.apache.beehive.netui.pageflow.FlowController
`addActionError, addActionErrorExpression, addValidationError, addValidationError, afterAction, alwaysTrackPreviousAction, alwaysTrackPreviousPage, beforeAction, execute, generateToken, generateToken, getActionMapping, getActionMethod, getActions, getActionURI, getCurrentActionName, getDataSource, getDataSource, getDefaultLocale, getFormBean, getLocale, getLocale, getMapping, getMessageResources, getMessageResources, getModuleConfig, getModuleConfig, getRequest, getResources, getResources, getResources, getResponse, getRewrittenActionURI, getServlet, getSession, getUserPrincipal, handleException, invokeActionMethod, invokeExceptionHandler, isAction, isCancelled, isTokenValid, isTokenValid, isTokenValid, isTokenValid, isUserInRole, login, logout, lookup, lookup, onCreate, onDestroy, onDestroy, onRefresh, refresh, reinitialize, remove, resetToken, resetToken, resolveAction, resolveAction, retrieveUserLocale, saveActionErrors, saveErrors, saveMessages, saveToken, sendError, sendError, setLocale, setLocale, theModuleConfig`

Methods inherited from class org.apache.beehive.netui.pageflow.PageFlowManagedObject
`fieldIsUninitialized, getCreateTime, getServletContext, initializeField, valueBound`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _dateFormat

    protected SimpleDateFormat _dateFormat

  SimpleDateFormat instance to be used as the format for obtaining date/time instances as values for system properties. This may be set by subclasses and is accessed via getDateFormat().

  See Also:
    `getDateFormat()`

### _updateActionForm

    protected UpdateActionForm _updateActionForm

  The UpdateActionForm containing the up-to-date and editable form of the data for the 'context' task. This member may be set and manipulated by subclasses and is accessed via getUpdateActionForm().

  See Also:
    `getUpdateActionForm()`

### _takeStepActionActionForm

    protected TakeStepActionActionForm _takeStepActionActionForm

  The TakeStepActionActionForm instance representing the properties and other data needed to take an action on the context task. This form is initialized and maintained as part of the action helper sequence initiated using the showStepActionActionHelper() method. Subclasses may set and manipulate this member as they see fit. It is accessed via getStepActionActionForm().

  See Also:
    `showStepActionActionHelper(com.bea.wli.worklist.api.taskplan.StepAction)`, `getTakeStepActionActionForm()`

### _taskHistoryRecords

    protected TaskEventHistory[] _taskHistoryRecords

  Current Task's History. Maintained by subclasses only.

  See Also:
    `getTaskHistory()`

### _taskDataHistory

    protected TaskData _taskDataHistory

  TaskData for the 'context' task at some date in the past. This member is maintained by subclasses and stored here for convenience.

  See Also:
    `getTaskDataHistory()`

Constructor Detail

### TaskUIPageFlowController

    protected TaskUIPageFlowController()

Method Detail

### getUpdateActionForm

    protected UpdateActionForm getUpdateActionForm()

### setUpdateActionForm

    protected void setUpdateActionForm(UpdateActionForm form)

### getTakeStepActionActionForm

    protected TakeStepActionActionForm getTakeStepActionActionForm()

### setTakeStepActionActionForm

    protected void setTakeStepActionActionForm(TakeStepActionActionForm form)

### getDoneActionContext

    public String getDoneActionContext()

### getDoneActionLabel

    public String getDoneActionLabel()

### getUserName

    public String getUserName()

### getTaskListViews

    public TaskListViewInfo[] getTaskListViews()

### getDateFormat

    public DateFormat getDateFormat()

  Get the DateFormat that defines the format for date/time values used in system properties for the context task. This is initialized via DateTimeFormat.getDateTimeInstance(), but subclasses may set this value directly by setting the _dateFormat member.

### getDateFormatLocalizedPattern

    public String getDateFormatLocalizedPattern()

  Get a localized date example using the DateFormat given by getDateFormat(). This method simply takes the current date and formats it using the DateFormat.

  See Also:
    `getDateFormat()`

### getTaskData

    public TaskData getTaskData()

  Get the TaskData instance for the 'context' task.

### getTaskAdminStateStr

    public String getTaskAdminStateStr()

  Get a string representation of the admin state for the 'context' task.

### getTaskWorkingStateStr

    public String getTaskWorkingStateStr()

  Get a string representation of the working state for the 'context' task.

### getTaskPlanDisplayInfo

    public TaskPlanDisplayInfo getTaskPlanDisplayInfo()
                                               throws ManagementException

  Get the TaskPlanDisplayInfo for the 'context' task.

  Throws:
    `ManagementException` - If any error occurs retrieving the task plan for the context task.

### getCurrentStepDisplayInfo

    public StepDisplayInfo getCurrentStepDisplayInfo()
                                              throws ManagementException

  Get the StepDisplayInfo for the 'context' task.

  Throws:
    `ManagementException` - If any error occurs retrieving the task plan for the context task.

### getStepActions

    public StepActionDisplayInfo[] getStepActions()
                                           throws ManagementException

  Get the StepActionDisplayInfo objects for all actions available on the current step for the 'context' task.

  Throws:
    `ManagementException` - If any error occurs retrieving the task plan for the context task.

### getTaskPropertiesMap

    public Map<String,PropertyInstance> getTaskPropertiesMap()
                                                      throws ManagementException

  Return a map of all the properties on the context task (keyed by the property name). This map returns both user-defined and built-in properties.

  Throws:
    `ManagementException`

### getTaskEditablePropertiesMap

    public Map<String,PropertyInstanceHolder> getTaskEditablePropertiesMap()

  Return a map of all the editable properties on the context task (keyed by the property name). This map returns both user-defined and built-in properties as PropertyInstanceHolders, allowing their values to be updated easily from the UI using PropertyEditorHelper.

### getTaskUserPropertiesList

    public List<PropertyInstance> getTaskUserPropertiesList()
                                                     throws ManagementException

  Return a list of user-defined properties for the context task.

  Throws:
    `ManagementException`

### getMandatoryTaskProperties

    public Map<String,PropertyInstance> getMandatoryTaskProperties(Step step,
                                                                   StepAction stepAction)
                                                            throws ManagementException

  Get a map of the required properties for the given action on the context task.

  Parameters:
    `step` - The step for which the action applies
    `stepAction` - The action for which required properties are being requested.
  Throws:
    `ManagementException`

### assigneeListToString

    public String assigneeListToString(Assignee assignee)

  Get a formatted string value for the given Assignee object.

### isTaskEditable

    public boolean isTaskEditable(TaskData data)

  Is the given task in an editable admin state?.

### isTaskClaimed

    public boolean isTaskClaimed(TaskData data)

  Is the given task in the claimed working state.

### isTaskClaimedByCurrentUser

    public boolean isTaskClaimedByCurrentUser(TaskData data)

  Is the given task claimed by the user given by the getUserName() method?

### canWorkOnTask

    public boolean canWorkOnTask(TaskData data)
                          throws ManagementException

  Returns true if the current user is allowed to work on the task. This generally is true if the use is the Owner or Claimant of the task.

  Throws:
    `ManagementException`

### canClaimTask

    public boolean canClaimTask(TaskData data)
                         throws ManagementException

  Returns true if the current user is not the current claimant of the task and is an assignee.

  Throws:
    `ManagementException`

### isUserAssignee

    public boolean isUserAssignee(TaskData data)
                           throws ManagementException

  Returns true if the current user is an assignee for the task.

  Throws:
    `ManagementException`

### isUserOwner

    public boolean isUserOwner(TaskData data)
                        throws ManagementException

  Returns true if the current user is an assignee for the task.

  Throws:
    `ManagementException`

### isUserAdmin

    public boolean isUserAdmin(TaskData data)
                        throws ManagementException

  Returns true if the current user is an assignee for the task.

  Throws:
    `ManagementException`

### canUserUpdateTask

    public boolean canUserUpdateTask(TaskData data)
                              throws ManagementException

  Check at high-level if the task is update-able and the current user can update it. After this check one should check for rights on specific fields. The low-level field-based rights are dependent of current user affinity.

  Parameters:
    `data` -
  Returns:
  Throws:
    `ManagementException`

### canUpdate

    public boolean canUpdate(TaskData data,
                             com.bea.wli.worklist.userportal.TaskField name)
                      throws ManagementException

  Check low-level (specific) rights to update a particular field based on current users affinity.

  Parameters:
    `data` -
    `name` -
  Returns:
  Throws:
    `ManagementException`

### isTaskHistoryEnabled

    public boolean isTaskHistoryEnabled(TaskData taskData)
                                 throws ManagementException,
                                        RemoteException

  Indicates whether there is a TaskHistoryProvider available for the current Worklist system instance. If true, the task UI controller may choose to provide screens that display this task history (optional).

  Parameters:
    `taskData` - The TaskData from a task that will be used to identify the Worklist system instance to be checked for task history providers.
  Throws:
    `ManagementException` - If any error occurs accessing the task plan for the task or provider information.
    `RemoteException` - If a communication error occurs.

### isTaskPlan81x

    @Deprecated
    public boolean isTaskPlan81x(TaskData taskData)
                          throws ManagementException,
                                 RemoteException

  Deprecated. Will be removed when other 8.1.x compatibility features are removed.

  Indicates if the current task is based on the Compatibility 8.1.x task plan. This method is deprecated to coincide with the fact that the Compatibility 8.1.x task plan is itself deprecated.

  Parameters:
    `taskData` - The TaskData for the task that is being checked.
  Throws:
    `ManagementException`
    `RemoteException`

### getTaskHistory

    public TaskEventHistory[] getTaskHistory()

  Get an array of TaskEventHistory objects representing the historical events that have been tracked for the 'context' task on this controller. Note, this task history is maintained by subclasses, and is stored here for convenience only.

### getTaskDataHistory

    public TaskData getTaskDataHistory()

  Get the TaskData for the 'context' task at a pre-determined time in the past. Note, this pre-determined date is determined by subclasses, and not directly by this abstract base controller. Subclasses will set the _taskDataHistory member.

### getTaskHistoryStepDisplayInfo

    public StepDisplayInfo getTaskHistoryStepDisplayInfo()
                                                  throws ManagementException

  Get the StepDisplayInfo for the current step as indicated by the getTaskDataHistory() method. Note the TaskData in the _taskDataHistory member is used, and is set by subclasses (not directly via this abstract controller).

  Throws:
    `ManagementException` - If any error occurs retrieving the task plan for this task.

### getTaskHistoryUserPropertiesList

    public List<PropertyInstance> getTaskHistoryUserPropertiesList()
                                                            throws ManagementException

  Return a list of user-defined properties for the context task at a pre-determined date in the past. Note the TaskData in the _taskDataHistory member is used, and is set by subclasses (not directly via this abstract controller).

  Throws:
    `ManagementException` - If any error occurs retrieving the task plan for this task.

### getTaskHistoryAssigneeListAsString

    public String getTaskHistoryAssigneeListAsString()

  Get the assignee list on the 'context' task at a pre-determined date in the past. Note the TaskData in the _taskDataHistory member is used, and is set by subclasses (not directly via this abstract controller).

### getUIContextHelper

    protected WorklistUIContextHelper getUIContextHelper()

  Get a helper object for fetching properties out of the session context.

### getContextInfo

    protected TaskUIContextInfo getContextInfo()

  Get the context this task UI is operating in. This is one of the key methods of the TaskUIPageFlowController and provides access to the context task and the WorklistSystem instance needed to manipulate it.

### getWorklistTaskUser

    protected WorklistTaskUser getWorklistTaskUser()
                                            throws ManagementException,
                                                   RemoteException

  Get a WorklistTaskUser instance that can be used to perform user-level actions against the 'context' task for this controller.

  Throws:
    `ManagementException`
    `RemoteException`

### getWorklistTaskAdmin

    protected WorklistTaskAdmin getWorklistTaskAdmin()
                                              throws ManagementException,
                                                     RemoteException

  Get a WorklistTaskAdmin instance that can be used to perform admin-level actions against the 'context' task for this controller.

  Throws:
    `ManagementException`
    `RemoteException`

### getTaskPlan

    protected TaskPlan getTaskPlan()
                            throws ManagementException

  Get the TaskPlan for the 'context' task for this controller.

  Throws:
    `ManagementException`

### createUpdateActionForm

    protected UpdateActionForm createUpdateActionForm()

  Factory method that can be overridden to create a subclass of UpdateActionForm. This method is called whenever a new instance of UpdateActionForm is needed (e.g. refreshTask).

  See Also:
    `refreshTask()`

### refreshTask

    protected void refreshTask()
                        throws ManagementException

  Refreshes the information for the context task, and load it into the UpdateActionForm property for this controller. This method calls the protected doPostPrepareRequestAttributes() and doPostRefreshTask() methods, in that order at the end of this method, to allow subclasses to extend the work this method does.

  Throws:
    `ManagementException`
  See Also:
    `doPostPrepareRequestAttributes()`, `doPostRefreshTask()`

### doPostRefreshTask

    protected void doPostRefreshTask()
                              throws ManagementException

  Extensibility method that is called at the end of refreshTask, allowing subclasses to do any work needed on the newly refreshed task state. The default implementation of this method does nothing.

  Throws:
    `ManagementException`

### getPropertyInstanceHolder

    protected PropertyInstanceHolder getPropertyInstanceHolder(PropertyRef ref,
                                                               PropertyInstanceHolder[] props)

  Get a PropertyInstanceHolder instance, from the given array, that matches the property indicated in the given PropertyRef.

### getPropertyInstanceHolder

    protected PropertyInstanceHolder getPropertyInstanceHolder(String name)

  Gets a named PropertyInstanceHolder from the update action form populated on the last call to refreshTask.

  Parameters:
    `name` - Name of the property to return.
  Returns:
    A PropertyInstanceHolder for the given name
  Throws:
    `IllegalStateException` - if the property is not found.

### prepareRequestAttributes

    protected void prepareRequestAttributes()

  Loads the request with a number of state attributes indicating what general-purpose actions are allowed. This method is called at key times in the task UI lifecycle (refreshTask, okPropActionHelper, cancelPropActionHelper) to keep the request attrs in sync. This method calls postPrepareRequestAttributes to allow subclasses to extend what attrs are kept in sync.

### doPostPrepareRequestAttributes

    protected void doPostPrepareRequestAttributes()

  Set any final attributes required in the HttpRequest to properly render the task and/or step pages for this task. Subclasses can override this method to do any work they may need. The default implementation of this method does nothing.

### getCurrentStep

    protected Step getCurrentStep()
                           throws ManagementException

  Get the current step for the context task.

  Throws:
    `ManagementException` - If any error occurs retrieving the task plan for the context task.

### getPropertyEditorHelper

    protected PropertyEditorHelper getPropertyEditorHelper()

  Get a PropertyEditorHelper to assist you in editing task properties in a web UI.

### begin

    protected abstract Forward begin()
                              throws Exception

  The begin action for this controller. You must implement this to initialize your controller. Note, subclasses should call the beginActionHelper method as part of the begin method's logic.

  Throws:
    `Exception`

### beginActionHelper

    protected void beginActionHelper()
                              throws ManagementException

  Initializes the TaskUIContextInfo maintained by this controller (and is accessed via several of the getters and helpers on this controller). You should call this method from your begin action method, generally as one of the first things done in that method.

  Throws:
    `ManagementException`

### refreshAction

    protected Forward refreshAction()

  Called to verify the state of the task UI matches the requested task id. If it does, the begin action is called and the task UI should proceed normally. If it does not match, this nested page flow returns via the calling page flow begin action.

  Returns:

### editPropActionHelper

    protected Forward editPropActionHelper(PropertyInstanceHolder[] properties)
                                    throws ManagementException,
                                           DataTypeException

  This method is used to begin a session of editing property values using a PropertyEditorHelper embedded in this controller. The actual property that will be edited is determined from the current HttpServletRequest. You should call this method before you attempt to edit the value of a property and in the scope of a servlet request. This edit can be in support of updating properties directly on the task, or taking an action from a step (and specifying the properties required by the task).

  Parameters:
    `properties` - The PropertyInstanceHolders the current operation is managing. This can be all the properties on the task, or just the properties needed for an action.
  Returns:
    A forward object that indicates the URI of the stand-alone editor that will handle editing the new value for the active property.
  Throws:
    `ManagementException`
    `DataTypeException`
  See Also:
    `UpdateActionForm.getProperties()`, `TakeStepActionActionForm.getProperties()`

### okPropActionHelper

    protected void okPropActionHelper(EditorValueHolder value)
                               throws DataTypeException

  Completes the editing session for the 'active' property set in a call to editPropActionHelper, and applies the given EditorValueHolder's value back to the active property. This helper should be called from a method named okPropAction(EditorValueHolder) in your subclass. This action method is called by the stand-aloned editors when the user clicks Ok in the editor to apply the edited value to the property being edited. Your action method can have forwards on it to forward the user to appropriate pages after the ok. For example, you might have saved the original page from which the editor was invoked (hostPage attr of the propertyEditor tag for Worklist). Your action method may forward back to that host page on ok.

  Parameters:
    `value` - The newly edited/accepted value
  Throws:
    `DataTypeException`

### cancelPropActionHelper

    protected void cancelPropActionHelper()

  Cancels the editing session for the 'active' property set in a call to editPropActionHelper, and discards an value that may have existed in the stand-alone editor. This helper should be called from a method named cancelPropAction() in your subclass. This action method is called by the stand-aloned editors when the user clicks Cancel in the editor to discard the edited value. Your action method can have forwards on it to forward the user to appropriate pages after the cancel. For example, you might have saved the original page from which the editor was invoked (hostPage attr of the propertyEditor tag for Worklist). Your action method may forward back to that host page on cancel.

### createTakeStepActionActionForm

    protected TakeStepActionActionForm createTakeStepActionActionForm()

  Factory method that can be overridden to create a subclass of TakeStepActionActionForm. This method is called whenever a new instance of TakeStepActionActionForm is needed (e.g. showStepActionActionHelper).

  See Also:
    `showStepActionActionHelper(com.bea.wli.worklist.api.taskplan.StepAction)`

### showStepActionActionHelper

    protected void showStepActionActionHelper(StepAction action)
                                       throws ManagementException,
                                              DataTypeException

  Helper method that can be called from an action that is used to show a page for collecting properties needed to take an action. This helper method creates a TakeStepActionActionForm and populates it with the editable properties required for this action. After this method returns you'll be ready to use the Worklist propertyEditor tag on the target page to edit your property values and apply them by taking an action that calls the takeStepActionActionHelper() method (with the TakeStepActionActionForm we created here returned by getTakeStepActionActionForm()).

  This method calls doPostShowTakeStepActionAction() at its end to allow subclasses to do extra work in this method without overriding it.

  Throws:
    `ManagementException`
    `DataTypeException`
  See Also:
    `takeStepActionActionHelper(TakeStepActionActionForm)`, `getTakeStepActionActionForm()`

### doPostShowTakeStepActionAction

    protected void doPostShowTakeStepActionAction()
                                           throws ManagementException

  Utility method called at the end of showTakeStepActionActionHelper. The default implementation of this method does nothing.

  Throws:
    `ManagementException`

### takeStepActionActionHelper

    protected void takeStepActionActionHelper(TakeStepActionActionForm form)
                                       throws ManagementException,
                                              AssignmentException

  Helper that takes an action at the current step given the information in a TakeStepActionActionForm instance. This is a more 'advanced' way to take an action. This method allows you to use the TakeStepActionActionForm class as the form bean for a custom action form, and then simply submit the form to this method to take the action. For a simpler method taking only atomic arguments and property values, see the takeAction() method. If you called showStepActionActionHelper before this call, you can obtain the form bean with a call to getTakeStepActionActionForm().

  Throws:
    `ManagementException`
    `AssignmentException`
  See Also:
    `takeStepAction(java.lang.String, java.lang.String, java.util.Map)`

### takeStepActionAndClaimActionHelper

    protected void takeStepActionAndClaimActionHelper(TakeStepActionActionForm form,
                                                      String postActionClaimant)
                                               throws ManagementException,
                                                      AssignmentException

  Helper that takes an action at the current step given the information in a TakeStepActionActionForm instance and the name of the user that should be made the claimant of the task following the action. This method is used to support interactive assignment in a task UI. It is assumed the UI will have allowed the user to pick the claimant prior to making this call.

  Throws:
    `ManagementException`
    `AssignmentException`

### takeStepAction

    protected void takeStepAction(String stepName,
                                  String actionName,
                                  Map<String,String> propMap)
                           throws DataTypeException,
                                  ManagementException,
                                  AssignmentException

  A simple method to take an action on a task, given the step, action name, and properties for the action.

  Throws:
    `DataTypeException`
    `ManagementException`
    `AssignmentException`

### takeStepActionAndClaim

    protected void takeStepActionAndClaim(String stepName,
                                          String actionName,
                                          Map<String,String> propMap,
                                          String postActionClaimant)
                                   throws DataTypeException,
                                          ManagementException,
                                          AssignmentException

  A simple method to take an action on a task, given the step, action name, properties for the action, and the name of the user that should be made the claimant of this task after the action has been performed. This method is intended to assist user interfaces that support interactive assignment by looking at the candidate list handling on the target step.

  Throws:
    `DataTypeException`
    `ManagementException`
    `AssignmentException`

### isPostActionInteractiveAssignment

    protected boolean isPostActionInteractiveAssignment(String actionName)
                                                 throws ManagementException

  Called before taking an action on a task to determine if interactive assignment should be invoked based on the target step for the action. If true is returned subclasses may choose to ignore interactive assignment, use the provided Assignment nested page flow provided by worklist, or provide their own interactive assignment handling. The claimant chosen by any of these means should be passed to the takeActionOnTaskAndClaim method.

  Returns:
  Throws:
    `ManagementException`

### cancelStepActionActionHelper

    protected void cancelStepActionActionHelper()
                                         throws ManagementException

  Cancel any pending step action you prepared for with a call to showStepActionActionHelper().

  Throws:
    `ManagementException`

### updateActionHelper

    protected void updateActionHelper(UpdateActionForm form)
                               throws ParseException,
                                      ManagementException,
                                      DataTypeException

  Helper method to assist subclasses in updating a task based on information collected in the UpdateActionForm.

  Throws:
    `ParseException`
    `ManagementException`
    `DataTypeException`

### cancelUpdateActionHelper

    protected void cancelUpdateActionHelper()

  Helper method used to step down from a proposed update to a task started with updateActionHelper.

### showTaskListAction

    protected Forward showTaskListAction()

  Optional exit point that will branch the UI flow back to the calling page flow and display the task list view indicated by the view HTTP request parameter.

  Returns:

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD