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.api
Interface WorklistTaskQuery

    public interface WorklistTaskQuery

Functions for querying lists of worklist tasks

Since:
  9.2

Method Summary
`int` | `getTaskCount(TaskQuery query)` Get an integer count of tasks matching the criteria in taskQuery.
`TaskDataCursor` | `getTaskDataCursor(TaskQuery query, int resultSize)` Return a cursor with the specified size.
`TaskDataCursor` | `getTaskDataCursorWithAffinity(TaskQuery query, int resultSize)` Return a cursor with the specified size, granting access based on the current user's affinity to the queried tasks.
`String[]` | `getTaskIds(TaskQuery query)` Get a String array of taskIds of all the queried tasks
`String[]` | `getTaskIdsWithAffinity(TaskQuery query)` Get a String array of taskIds of all the queried tasks, granting access based on the current user's affinity to the queried tasks.
`TaskData[]` | `getTasks(TaskQuery query)` Get a task data array of all the queried tasks.
`TaskData[]` | `getTasksWithAffinity(TaskQuery query)` Get a task data array of all the queried tasks, granting access based on the current user's affinity to the queried tasks.
`TaskDataCursor` | `moveCursorBackward(TaskDataCursor taskDataCursor)` Move the cursor backward.
`TaskDataCursor` | `moveCursorForward(TaskDataCursor taskDataCursor)` Move the cursor forward to the next position.
`TaskDataCursor` | `refreshCursor(TaskDataCursor taskDataCursor)` Refresh the cursor at the current position.
`TaskDataCursor` | `resetCursor(TaskDataCursor taskDataCursor)` Reset the cursor to a position before the first task such that isBeforeFirst() returns true.

Method Detail

### getTaskIds

    String[] getTaskIds(TaskQuery query)
                        throws ManagementException,
                               RemoteException

  Get a String array of taskIds of all the queried tasks

  Parameters:
    `query` -
  Returns:
  Throws:
    `ManagementException`
    `RemoteException`

### getTasks

    TaskData[] getTasks(TaskQuery query)
                        throws ManagementException,
                               RemoteException

  Get a task data array of all the queried tasks.

  Parameters:
    `query` -
  Returns:
  Throws:
    `ManagementException`
    `RemoteException`

### getTaskDataCursor

    TaskDataCursor getTaskDataCursor(TaskQuery query,
                                     int resultSize)
                                     throws ManagementException,
                                            RemoteException

  Return a cursor with the specified size. The cursor is positioned before the first element when created.

  Parameters:
    `query` - the task query
    `resultSize` - the size of the cursor
  Returns:
    a task data cursor
  Throws:
    `ManagementException` - if the operation failed
    `RemoteException`

### getTaskCount

    int getTaskCount(TaskQuery query)
                     throws ManagementException,
                            RemoteException

  Get an integer count of tasks matching the criteria in taskQuery. Note, the value returned from this method should be treated as the upper bound to the number of tasks (or task ids) that can be returned from the getTasks() (or getTaskIds()) methods. This is because no access check is made for query access on the tasks that are counted by this query. Thus, you can get a larger count from this method than the number of tasks returned from the getTasks(), etc. methods. The access check is bypassed because no individual task ids are returned, and thus no data from an individual task is exposed via this method. If you want to get an accurate count of how many tasks a user can actually view you should use getTaskIdsWithAffinity().length instead.

  Parameters:
    `query` - The task query
  Throws:
    `ManagementException` - if the operation fails
    `RemoteException`

### getTaskIdsWithAffinity

    String[] getTaskIdsWithAffinity(TaskQuery query)
                                    throws ManagementException,
                                           RemoteException

  Get a String array of taskIds of all the queried tasks, granting access based on the current user's affinity to the queried tasks. This method is more expensive than the non-affinity equivalent because it must check each task for affinity to the current user before adding it to the return value. However, this method is needed in cases where the current user is not granted one of the roles listed in the query policy for the task plan associated with the task plan, but still requires access to the task's info.

  Parameters:
    `query` - the task query
  Returns:
    An array of task ids representing the tasks that have been queried.
  Throws:
    `ManagementException` - If any error occurs querying tasks.
    `RemoteException`

### getTasksWithAffinity

    TaskData[] getTasksWithAffinity(TaskQuery query)
                                    throws ManagementException,
                                           RemoteException

  Get a task data array of all the queried tasks, granting access based on the current user's affinity to the queried tasks. This method is more expensive than the non-affinity equivalent because it must check each task for affinity to the current user before adding it to the return value. However, this method is needed in cases where the current user is not granted one of the roles listed in the query policy for the task plan associated with the task plan, but still requires access to the task's info.

  Parameters:
    `query` - the task query
  Returns:
    An array of TaskDatas representing the tasks that have been queried.
  Throws:
    `ManagementException` - If any error occurs querying tasks.
    `RemoteException`

### getTaskDataCursorWithAffinity

    TaskDataCursor getTaskDataCursorWithAffinity(TaskQuery query,
                                                 int resultSize)
                                                 throws ManagementException,
                                                        RemoteException

  Return a cursor with the specified size, granting access based on the current user's affinity to the queried tasks. This method is more expensive than the non-affinity equivalent because it must check each task for affinity to the current user before adding it to the return value. However, this method is needed in cases where the current user is not granted one of the roles listed in the query policy for the task plan associated with the task plan, but still requires access to the task's data. The cursor is positioned before the first element when created.

  Parameters:
    `query` - the task query
    `resultSize` - the size of the cursor
  Returns:
    a task data cursor
  Throws:
    `ManagementException` - if the operation failed
    `RemoteException`

### moveCursorForward

    TaskDataCursor moveCursorForward(TaskDataCursor taskDataCursor)
                                     throws ManagementException,
                                            RemoteException

  Move the cursor forward to the next position. Note that any tasks that have been deleted since the query was created will be seamlessly dropped from the list of tasks represented by this cursor. Thus, given a set of tasks (returned from getTasks()) may not match the tasks returned from getTasks() after subsequent calls to moveCursorForward() and moveCursorBackward(). This cursor attempts to deliver a full 'page' of tasks (with the page size given at cursor creation time) each time it is moved forward, backward or refreshed. Thus, tasks on a given 'page' may be returned in an earlier page when the cursor is moved or refreshed if tasks have been deleted after cursor creation.

  Parameters:
    `taskDataCursor` - the current cursor
  Returns:
    The cursor with a new 'page' of TaskData objects.
  Throws:
    `ManagementException`
    `RemoteException`

### moveCursorBackward

    TaskDataCursor moveCursorBackward(TaskDataCursor taskDataCursor)
                                      throws ManagementException,
                                             RemoteException

  Move the cursor backward. Note that any tasks that have been deleted since the query was created will be seamlessly dropped from the list of tasks represented by this cursor. Thus, given a set of tasks (returned from getTasks()) may not match the tasks returned from getTasks() after subsequent calls to moveCursorBackward() and moveCursorForward(). This cursor attempts to deliver a full 'page' of tasks (with the page size given at cursor creation time) each time it is moved forward, backward or refreshed. Thus, tasks on a given 'page' may be returned in an earlier page when the cursor is moved or refreshed if tasks have been deleted after cursor creation.

  Parameters:
    `taskDataCursor` - The current cursor
  Returns:
    The cursor with a new 'page' of TaskData objects.
  Throws:
    `ManagementException`
    `RemoteException`

### refreshCursor

    TaskDataCursor refreshCursor(TaskDataCursor taskDataCursor)
                                 throws ManagementException,
                                        RemoteException

  Refresh the cursor at the current position. This involves validating that all the tasks on the current 'page' of the cursor still exist, and then refreshing the data for them. This cursor attempts to deliver a full 'page' of tasks (with the page size given at cursor creation time) each time it is moved forward, backward or refreshed. Thus, tasks on a given 'page' may be returned in an earlier page when the cursor is moved or refreshed if tasks have been deleted after cursor creation.

  Parameters:
    `taskDataCursor` - The current cursor.
  Returns:
    The cursor with the refreshed 'page' of TaskData objects.
  Throws:
    `ManagementException`
    `RemoteException`

### resetCursor

    TaskDataCursor resetCursor(TaskDataCursor taskDataCursor)
                               throws ManagementException,
                                      RemoteException

  Reset the cursor to a position before the first task such that isBeforeFirst() returns true. This method does not refresh the tasks on the new current page. You should call refreshCursor to do that if desired.

  Parameters:
    `taskDataCursor` -
  Returns:
  Throws:
    `ManagementException`
    `RemoteException`

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