com.bea.wli.worklist.api.ui
Class TaskListViewInfo

java.lang.Object
  extended by com.bea.wli.worklist.api.ui.TaskListViewInfo
All Implemented Interfaces:
Serializable

public abstract class TaskListViewInfo
extends Object
implements Serializable

Utility class describing a unique view of tasks available in the worklist system. Each instance of this class has a display label, and a key representing a unique identifier for the view. This key should be passed to the calling page flow taskUIShowTaskListAction(String view) action method.

See Also:
Serialized Form

Field Summary
static int DEFAULT_MAX_TASKS
           
static int DEFAULT_MAX_TASKS_PER_PAGE
           
 
Constructor Summary
TaskListViewInfo()
           
TaskListViewInfo(String key, String label)
           
 
Method Summary
protected  String formatDate(Date date)
           
 int getCursorBatchSize()
           
 TaskListCustomParams getCustomCriteria()
           
 DateFormat getDateFormat()
           
 String getKey()
          The key to identify in the view map.
 String getLabel()
          Label to be shown on the task list page.
 int getMaxTasks()
          Get a hint for how many tasks should be returned by this view.
protected  TaskListCustomParams getOrCreateCustomCriteria()
           
 String getSampleDateStr()
           
abstract  TaskDataCursor getTasksInView(String userName, TaskQuery query, WorklistContext context)
          Get a cursor over tasks in this view.
 TaskDataCursor getTasksInView(String userName, TaskQuery query, WorklistContext context, TaskListCustomParams customCriteria)
          Get a cursor over tasks in this view using custom parameters in the customCriteria parameter.
 boolean isPredefined()
          Return true for those task list view infos that are predefined and auto-created added by worklist system, like
 boolean isShowOnTaskListPage()
          If set to true the task list page will have an option to view this task list view.
protected  Date parseDate(String dateStr)
           
protected  String replaceAsteriskWithPercent(String searchByOrg)
           
 void setCursorBatchSize(int cursorBatchSize)
           
 void setCustomCriteria(TaskListCustomParams customCriteria)
           
 void setDateFormat(DateFormat dateFormat)
           
 void setIsPredefined(boolean predefined)
           
 void setKey(String key)
           
 void setLabel(String label)
           
 void setMaxTasks(int maxTasks)
          Set a hint for how many tasks should be returned by this view.
 void setMaxTasks(int maxTasks, boolean preserve)
          Set a hint for how many tasks should be returned by this view.
 void setShowOnTaskListPage(boolean showOnTaskListPage)
           
protected  TaskQuery updateQuery(TaskListCustomParams customCriteria, TaskQuery query)
          Helper class to extended the task view query with the custom criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_TASKS

public static final int DEFAULT_MAX_TASKS
See Also:
Constant Field Values

DEFAULT_MAX_TASKS_PER_PAGE

public static final int DEFAULT_MAX_TASKS_PER_PAGE
See Also:
Constant Field Values
Constructor Detail

TaskListViewInfo

public TaskListViewInfo()

TaskListViewInfo

public TaskListViewInfo(String key,
                        String label)
Method Detail

getKey

public String getKey()
The key to identify in the view map.

Returns:

setKey

public void setKey(String key)

getLabel

public String getLabel()
Label to be shown on the task list page.

Returns:

setLabel

public void setLabel(String label)

isShowOnTaskListPage

public boolean isShowOnTaskListPage()
If set to true the task list page will have an option to view this task list view. By default all task list views are shown on the task list page.

Returns:

setShowOnTaskListPage

public void setShowOnTaskListPage(boolean showOnTaskListPage)

getMaxTasks

public int getMaxTasks()
Get a hint for how many tasks should be returned by this view. This hint may be ignored in some presentations of the tasks represented by this view. A negative number indicates that any number of tasks is allowed.


setMaxTasks

public void setMaxTasks(int maxTasks)
Set a hint for how many tasks should be returned by this view. This hint may be ignored in some presentations of the tasks represented by this view. A negative number indicates that any number of tasks is allowed.


setMaxTasks

public void setMaxTasks(int maxTasks,
                        boolean preserve)
Set a hint for how many tasks should be returned by this view. This hint may be ignored in some presentations of the tasks represented by this view. A negative number indicates that any number of tasks is allowed.


getCursorBatchSize

public int getCursorBatchSize()

setCursorBatchSize

public void setCursorBatchSize(int cursorBatchSize)

isPredefined

public boolean isPredefined()
Return true for those task list view infos that are predefined and auto-created added by worklist system, like

Returns:

setIsPredefined

public void setIsPredefined(boolean predefined)

getCustomCriteria

public TaskListCustomParams getCustomCriteria()

setCustomCriteria

public void setCustomCriteria(TaskListCustomParams customCriteria)

getOrCreateCustomCriteria

protected TaskListCustomParams getOrCreateCustomCriteria()

getDateFormat

public DateFormat getDateFormat()

setDateFormat

public void setDateFormat(DateFormat dateFormat)

parseDate

protected Date parseDate(String dateStr)
                  throws ParseException
Throws:
ParseException

formatDate

protected String formatDate(Date date)

getSampleDateStr

public String getSampleDateStr()

getTasksInView

public abstract TaskDataCursor getTasksInView(String userName,
                                              TaskQuery query,
                                              WorklistContext context)
                                       throws Exception
Get a cursor over tasks in this view. The view is relative to the given user, and is based on information given in the provided TaskQuery. Abstract method. To be implemented by the sub-class.

Parameters:
userName -
query -
context -
Returns:
The cursor of tasks that are in this view, or null if the given args cannot yield a view of these tasks.
Throws:
Exception

getTasksInView

public TaskDataCursor getTasksInView(String userName,
                                     TaskQuery query,
                                     WorklistContext context,
                                     TaskListCustomParams customCriteria)
                              throws Exception
Get a cursor over tasks in this view using custom parameters in the customCriteria parameter. The view is relative to the given user, and is based on information given in the provided TaskQuery.

Parameters:
userName -
query -
context -
customCriteria -
Returns:
The cursor of tasks that are in this view, or null if the given args cannot yield a view of these tasks.
Throws:
Exception

updateQuery

protected TaskQuery updateQuery(TaskListCustomParams customCriteria,
                                TaskQuery query)
Helper class to extended the task view query with the custom criteria.

Parameters:
customCriteria -
query -
Returns:

replaceAsteriskWithPercent

protected String replaceAsteriskWithPercent(String searchByOrg)