com.adobe.idp.taskmanager.dsc.client
Class TypedTaskManagerQueryService

java.lang.Object
  extended by com.adobe.idp.taskmanager.dsc.client.TypedTaskManagerQueryService
All Implemented Interfaces:
TaskManagerQueryService

public class TypedTaskManagerQueryService
extends java.lang.Object
implements TaskManagerQueryService


Field Summary
static java.util.logging.Logger logger
           
 
Constructor Summary
TypedTaskManagerQueryService(ServiceClientFactory aServiceClientFactory)
           
 
Method Summary
 ProcessInstanceRow getProcessInstanceById(long id)
          Retrieves a process instance according to the specified id
 java.util.List getProcessVariables(java.lang.String processName)
          Retrieves a java.util.List of process variable definitions.
 java.util.List getProcessVariables(java.lang.String processName, java.lang.Boolean includeCommonVariables, java.lang.Boolean includeSearchable)
          Retrieves a java.util.List of process variable definitions.
 java.util.List getProcessVariableValues(long taskId)
          Retrieves a java.util.List of process variable definitions and values.
 TaskFilter newTaskFilter()
          Creates a new TaskFilter object.
 java.util.List processInstanceList(java.lang.String processName, boolean returnVariables)
          Retrieves a java.util.List of those process instances in which the currently logged in user has participated, based on the specified process name.
 java.util.List processList()
          Retrieves a java.util.List of process names in which the logged-in user has participated.
 java.util.List processSearch(ProcessSearchFilter filter)
          Retrieves a java.util.List of process instances according to the specified search criteria set in the ProcessSearchFilter object.
 void setContext(Context aUser)
           
 void setServiceClientFactory(ServiceClientFactory aServiceClientFactory)
           
 java.util.List taskHistory(long taskId)
          Retrieves a list of Assignment objects, each representing a participant assigned to the task.
 java.util.List taskList(TaskFilter filter)
          Retrieves a java.util.List of tasks.
 java.util.List taskListUnsecure(TaskFilter filter)
          Retrieves a java.util.List of tasks without checking the user ACL.
 java.util.List taskSearch(TaskSearchFilter filter)
          Retrieves a java.util.List of task-related data.
 java.util.List userSearch(UserSearchFilter filter)
          A user search mechanism which will return taskmanager specific data about the end-user, like their OOO status
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static final java.util.logging.Logger logger
Constructor Detail

TypedTaskManagerQueryService

public TypedTaskManagerQueryService(ServiceClientFactory aServiceClientFactory)
Method Detail

setContext

public void setContext(Context aUser)

setServiceClientFactory

public void setServiceClientFactory(ServiceClientFactory aServiceClientFactory)

newTaskFilter

public TaskFilter newTaskFilter()
Description copied from interface: TaskManagerQueryService
Creates a new TaskFilter object.

Specified by:
newTaskFilter in interface TaskManagerQueryService
Returns:
The newly created TaskFilter object.

getProcessVariables

public java.util.List getProcessVariables(java.lang.String processName)
                                   throws TaskQueryServiceException
Description copied from interface: TaskManagerQueryService
Retrieves a java.util.List of process variable definitions.

This method is used to retrieve a list of visible or searchable process variables found in the specified process. If a variable is not set as visible or searchable when defined in the process designer, it will not be added to the result set generated by this method. The list returned is only a list of variable definitions without any values associated with them. The process specified as the parameter must be active in order to return any process variables.

Specified by:
getProcessVariables in interface TaskManagerQueryService
Parameters:
processName - The name of the process containing the process variables to be retrieved.
Returns:
A java.util.List of MultiTypeVariable objects that contain information about the process variable. null is returned if no results are found.

Only simple types of process variables are handled by query service methods. The supported process variables types are:

  • boolean
  • byte
  • date
  • date-time
  • decimal
  • double
  • float
  • int
  • long
  • short
  • string
Throws:
TaskQueryServiceException - if query exceptions occur.

getProcessVariables

public java.util.List getProcessVariables(java.lang.String processName,
                                          java.lang.Boolean includeCommonVariables,
                                          java.lang.Boolean includeSearchable)
                                   throws TaskQueryServiceException
Description copied from interface: TaskManagerQueryService
Retrieves a java.util.List of process variable definitions.

This method is used to retrieve a list of visible, or optionally searchable, process variables found in the specified process. If a variable is not set as visible and the includeSearchable parm is false, then the variable will not be returned. If a variable is not visable and the includeSearchable parm is true, then the variable will only be returned if it is set as searchable. The list returned is only a list of variable definitions without any values associated with them. The process specified as the parameter must be active in order to return any process variables.

Specified by:
getProcessVariables in interface TaskManagerQueryService
Parameters:
processName - The name of the process containing the process variables to be retrieved.
includeCommonVariables - Indicator to control the inclusion of the Common Process Variables in the results.
includeSearchable - Indicator to control the inclusion of searchable only variables in the results.
Returns:
A java.util.List of MultiTypeVariable objects that contain information about the process variable. null is returned if no results are found.

Only simple types of process variables are handled by query service methods. The supported process variables types are:

  • boolean
  • byte
  • date
  • date-time
  • decimal
  • double
  • float
  • int
  • long
  • short
  • string
Throws:
TaskQueryServiceException - if query exceptions occur.

getProcessVariableValues

public java.util.List getProcessVariableValues(long taskId)
                                        throws TaskQueryServiceException
Description copied from interface: TaskManagerQueryService
Retrieves a java.util.List of process variable definitions and values.

This method is used to retrieve a list of visible or searchable process variables and values found using the specified task identifier. If a variable is not set as visible or searchable when defined in the Workbench, it will not be added to the result set generated by this method.

Specified by:
getProcessVariableValues in interface TaskManagerQueryService
Parameters:
taskId - The task identifier.
Returns:
A java.util.List of MultiTypeVariable objects, each of which contains the value of a process variable. null is returned if no results are found.

Only simple types of process variables are handled by query service methods. The supported process variables types are:

  • boolean
  • byte
  • date
  • date-time
  • decimal
  • double
  • float
  • int
  • long
  • short
  • string
Throws:
TaskQueryServiceException - if query exceptions occur.

processList

public java.util.List processList()
                           throws TaskQueryServiceException
Description copied from interface: TaskManagerQueryService
Retrieves a java.util.List of process names in which the logged-in user has participated.

This method is used to retrieve a list of ProcessRow objects for those processes in which the currently logged-in user has participated. Process rows will be unique. Processes will not be duplicated in the list.

Specified by:
processList in interface TaskManagerQueryService
Returns:
A java.util.List of ProcessRow objects. null is returned if no results are found.
Throws:
TaskQueryServiceException - if query exceptions occur.

processInstanceList

public java.util.List processInstanceList(java.lang.String processName,
                                          boolean returnVariables)
                                   throws TaskQueryServiceException
Description copied from interface: TaskManagerQueryService
Retrieves a java.util.List of those process instances in which the currently logged in user has participated, based on the specified process name.

This method method is used to retrieve a list of ProcessInstanceRow objects for those process instances in which the user has participated.

Specified by:
processInstanceList in interface TaskManagerQueryService
Parameters:
processName - The name of the process from which to retrieve process instances.
returnVariables - true to retrieve a list of MultiTypeVariable objects, within each ProcessInstanceRow, containing any visible process variables and their values. A value of false means that a null list is returned in each ProcessInstanceRow object.
Returns:
A java.util.List of ProcessInstanceRow objects. null is returned if no results are found.

Only simple types of process variables are handled by query service methods. The supported process variables types are:

  • boolean
  • byte
  • date
  • date-time
  • decimal
  • double
  • float
  • int
  • long
  • short
  • string
Throws:
TaskQueryServiceException - if query exceptions occur.

taskSearch

public java.util.List taskSearch(TaskSearchFilter filter)
                          throws TaskQueryServiceException
Description copied from interface: TaskManagerQueryService
Retrieves a java.util.List of task-related data.

This method is used to execute a task-based query. Queries are built using the TaskSearchFilter object, which can be used to filter and define result sets. If no result set is defined in the filter, a default result set will be generated.

When searching for process variables or adding them to a result set, you must specify the service (process) name that you are searching against using the TaskSearchingUtil object found in the TaskSearchFilter object. For example:

TaskSearchFilter filt = new TaskSearchFilter();
((TaskSearchingUtil)filt.getPropertyUtil()).setProcessVariableServiceName("procvar3");

Once the process name is set you can add process variables to a condition or add it to the result set. To do so add the prefix "procVar." to your process variable. If a process variable in called "one", it will become "procVar.one" when used with the TaskSearchFilter object. For example:

filt.addCondition("procVar.two", Operator.EQUALS, new Long(28));
filt.addResultsetAttribute("procVar.one");

Only simple types of process variables are handled by query service methods. The supported process variables types are:

Specified by:
taskSearch in interface TaskManagerQueryService
Parameters:
filter - Contains search parameters, and possibly the result set definition for the query.
Returns:
The java.util.List object populated with one or more TaskRow objects. null is returned if no results are found.
Throws:
TaskQueryServiceException - if query exceptions occur.

processSearch

public java.util.List processSearch(ProcessSearchFilter filter)
                             throws TaskQueryServiceException
Description copied from interface: TaskManagerQueryService
Retrieves a java.util.List of process instances according to the specified search criteria set in the ProcessSearchFilter object.

When searching for process variables or adding them to a result set, you must specify the service (process) name that you are searching against using the ProcessSearchFilter object. For example:

ProcessSearchFilter filter = new ProcessSearchFilter();
filter.setServiceName("procvar3");

Once the process name is set you can add process variables to a condition or add it to the result set. To do so add the prefix "procVar." to your process variable. If a process variable in called "one", it will become "procVar.one" when used with the ProcessSearchFilter object. For example:

filter.addCondition("procVar.two", Operator.EQUALS, new Long(28));
filter.addResultsetAttribute("procVar.one");

Only simple types of process variables are handled by query service methods. The supported process variables types are:

Specified by:
processSearch in interface TaskManagerQueryService
Parameters:
filter - The search criteria.
Returns:
A java.util.List of process instances.
Throws:
TaskQueryServiceException

taskList

public java.util.List taskList(TaskFilter filter)
                        throws TaskQueryServiceException
Description copied from interface: TaskManagerQueryService
Retrieves a java.util.List of tasks.

The TaskFilter is an object used to determine the results of the query. Passing in a null value for this parameter will retrieve the task list for the current user, which contains a collection of TaskRow objects representing the requested task list.

Specified by:
taskList in interface TaskManagerQueryService
Parameters:
filter - Contains search parameters for the query.
Returns:
A java.util.List object populated with one or more TaskRow objects.
Throws:
TaskQueryServiceException - if query exceptions occur.

taskListUnsecure

public java.util.List taskListUnsecure(TaskFilter filter)
                                throws TaskQueryServiceException
Description copied from interface: TaskManagerQueryService
Retrieves a java.util.List of tasks without checking the user ACL. This will only honour an in-VM call.

The TaskFilter is an object used to determine the results of the query. Passing in a null value for this parameter will retrieve the task list for the current user, which contains a collection of TaskRow objects representing the requested task list.

Specified by:
taskListUnsecure in interface TaskManagerQueryService
Parameters:
filter - Contains search parameters for the query.
Returns:
A java.util.List object populated with one or more TaskRow objects.
Throws:
TaskQueryServiceException - if query exceptions occur.

taskHistory

public java.util.List taskHistory(long taskId)
                           throws TaskQueryServiceException
Description copied from interface: TaskManagerQueryService
Retrieves a list of Assignment objects, each representing a participant assigned to the task.

Specified by:
taskHistory in interface TaskManagerQueryService
Parameters:
taskId - The task identifier.
Returns:
A java.util.List object populated with 0 or 1 Assignment objects, or null if the task does not exist.

Throws:
TaskQueryServiceException - if query exceptions occur.

userSearch

public java.util.List userSearch(UserSearchFilter filter)
                          throws TaskQueryServiceException
Description copied from interface: TaskManagerQueryService
A user search mechanism which will return taskmanager specific data about the end-user, like their OOO status

Specified by:
userSearch in interface TaskManagerQueryService
Returns:
the list of resultant users
Throws:
TaskQueryServiceException

getProcessInstanceById

public ProcessInstanceRow getProcessInstanceById(long id)
                                          throws TaskQueryServiceException
Description copied from interface: TaskManagerQueryService
Retrieves a process instance according to the specified id

Specified by:
getProcessInstanceById in interface TaskManagerQueryService
Parameters:
id - The process instance id.
Returns:
A ProcessInstanceRow of process instance.
Throws:
TaskQueryServiceException