|
KIE Remote Services :: Services 6.2.0.CR4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kie.remote.services.rest.query.InternalTaskQueryHelper
public class InternalTaskQueryHelper
This class contains the core logic for processing the query parameters from a
REST task query call to a JaxbQueryTaskResult instance.
| Field Summary | |
|---|---|
protected ResourceBase |
resourceBase
|
| Constructor Summary | |
|---|---|
InternalTaskQueryHelper(ResourceBase resourceBase)
|
|
| Method Summary | |
|---|---|
void |
businessAdmin(String[] data)
|
protected void |
createAndSetQueryBuilders(String identity)
Create the RemoteServicesQueryCommandBuilder instances used by the particular Query Helper implementation. |
void |
deploymentId(String[] data)
|
protected boolean |
determineWorkFlowInstanceVariableUse(Map<String,String[]> queryParams)
Figure out whether or not we're getting audit variable logs or workflow instance variables. |
void |
dispose()
|
JaxbQueryTaskResult |
doQueryAndCreateResultObjects(boolean onlyRetrieveLastVarLogs,
boolean workFlowInstanceVariables)
Use the created RemoteServicesQueryCommandBuilder instances to execute the query via the backend. |
void |
endDate(Date[] dateData)
|
void |
endDateMax(Date date)
|
void |
endDateMin(Date date)
|
protected Queue<org.kie.remote.services.rest.query.QueryAction> |
fillQueryActionQueueFromQueryParams(Map<String,String[]> queryParams,
Map<String,String> varValueMap,
Map<String,String> varRegexMap)
Parse the given query parameters to create an ArrayDeque of QueryAction. |
protected org.kie.remote.services.rest.query.RemoteServicesQueryCommandBuilder[] |
getQueryBuilders()
|
void |
initiator(String[] data)
|
void |
potentialOwner(String[] data)
|
void |
processId(String[] data)
|
void |
processInstanceId(long[] longData)
|
void |
processInstanceIdMax(long[] longData)
|
void |
processInstanceIdMin(long[] longData)
|
void |
processInstanceStatus(int[] intData)
|
protected void |
processQueryActionQueue(Queue<org.kie.remote.services.rest.query.QueryAction> queryActionQueue,
Map<String,String> varValueMap,
Map<String,String> varRegexMap,
boolean workFlowInstanceVariables)
This is the main core of logic for the query helper classes. |
void |
processVersion(String[] data)
|
R |
queryTaskOrProcInstAndAssociatedVariables(String identity,
Map<String,String[]> queryParams,
int[] pageInfo,
int maxResults)
This method is the internal logic that preprocesses the list of query parameters passed to the .. |
R |
queryTasksOrProcInstsAndVariables(Map<String,String[]> queryParams,
int[] pageInfo,
int maxResults)
|
protected void |
setQueryBuilders(org.kie.remote.services.rest.query.RemoteServicesQueryCommandBuilder... queryBuilders)
|
void |
stakeHolder(String[] data)
|
void |
startDate(Date[] dateData)
|
void |
startDateMax(Date date)
|
void |
startDateMin(Date date)
|
void |
taskId(long[] longData)
|
void |
taskIdMax(long longData)
|
void |
taskIdMin(long longData)
|
void |
taskOwner(String[] data)
|
void |
taskStatus(org.kie.api.task.model.Status[] statuses)
|
void |
value(String[] data)
|
protected boolean |
variableCriteriaInQuery(org.kie.internal.query.data.QueryData queryData)
|
void |
variableId(String[] data)
|
void |
variableValue(String varId,
String value)
|
void |
workItemId(long[] longData)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ResourceBase resourceBase
| Constructor Detail |
|---|
public InternalTaskQueryHelper(ResourceBase resourceBase)
| Method Detail |
|---|
protected void createAndSetQueryBuilders(String identity)
RemoteServicesQueryCommandBuilder instances used by the particular Query Helper implementation.
identity - The identity of the user doing the REST call, needed when querying Tasks
public JaxbQueryTaskResult doQueryAndCreateResultObjects(boolean onlyRetrieveLastVarLogs,
boolean workFlowInstanceVariables)
RemoteServicesQueryCommandBuilder instances to execute the query via the backend.JaxbQueryProcessInstanceResult or JaxbQueryTaskResult) with the
information from the results of the queries
onlyRetrieveLastVarLogs - Whether toworkFlowInstanceVariables - (UNFINISHED FEATURE) whether to use the information from variable instance logs
or from the process instance variables themselves.
public void dispose()
public R queryTaskOrProcInstAndAssociatedVariables(String identity,
Map<String,String[]> queryParams,
int[] pageInfo,
int maxResults)
../rest/query/runtime/{task,process} operationJaxbQueryTaskResult or JaxbQueryProcessInstanceResult instanceQueryAction instances
to the actual QueryData, instead of directly translating REST query parameters to QueryData information. This
effectively decouples the REST query parameters from the query builders, giving us more flexibility/maintainability in the code.
identity - The identity of the caller, needed when doing task queriesqueryParams - The query parameters map returned by the JAX-RS logicpageInfo - The pagination informationmaxResults - The maximum number of results to be returned, determined by the pagination information
JaxbQueryTaskResult or JaxbQueryProcessInstanceResult containing a list of entities containing task
and process variable information
public R queryTasksOrProcInstsAndVariables(Map<String,String[]> queryParams,
int[] pageInfo,
int maxResults)
protected boolean determineWorkFlowInstanceVariableUse(Map<String,String[]> queryParams)
queryParams - The map of (REST operation) query parameters
protected Queue<org.kie.remote.services.rest.query.QueryAction> fillQueryActionQueueFromQueryParams(Map<String,String[]> queryParams,
Map<String,String> varValueMap,
Map<String,String> varRegexMap)
ArrayDeque of QueryAction.
The Queue of QueryAction is then acted upon by the {#processQueryActionQueue(ArrayDeque, Map, Map, boolean)
method, which applies the different query actions to build the query requested via the query builder instances.
queryParams - a Map of the received query parametersvarValueMap - a Map that maps query variable names to the passed valuesvarRegexMap - a Map that maps query variable names to the passed regexs for the specified variable
Queue of QueryAction instancesprotected boolean variableCriteriaInQuery(org.kie.internal.query.data.QueryData queryData)
protected void processQueryActionQueue(Queue<org.kie.remote.services.rest.query.QueryAction> queryActionQueue,
Map<String,String> varValueMap,
Map<String,String> varRegexMap,
boolean workFlowInstanceVariables)
Deque
of QueryAction instances.
We're using a Queue instead of a List because I may eventually want to add new QueryAction elements
to the queue during processing: once I'm sure that I won't be doing that, I'll move this back to a List which is
more efficient and performant.
In this method, we go through each element (in the order that it was added) and translate the REST query parameter to a
action on the query builder(s) so that the requested query can be built an executed.
queryActionQueue - An ordered collection of QueryAction instancesvarValueMap - A Map mapping the variable name to the variable's valuevarRegexMap - A Map mapping the variable name to a regex for the variable's valueworkFlowInstanceVariables - Whether or not variable values should be retrieved from the audit logs or the process instanceprotected void setQueryBuilders(org.kie.remote.services.rest.query.RemoteServicesQueryCommandBuilder... queryBuilders)
protected org.kie.remote.services.rest.query.RemoteServicesQueryCommandBuilder[] getQueryBuilders()
public void processInstanceId(long[] longData)
public void processInstanceIdMin(long[] longData)
public void processInstanceIdMax(long[] longData)
public void processId(String[] data)
public void workItemId(long[] longData)
public void deploymentId(String[] data)
public void taskId(long[] longData)
public void taskIdMin(long longData)
public void taskIdMax(long longData)
public void initiator(String[] data)
public void stakeHolder(String[] data)
public void potentialOwner(String[] data)
public void taskOwner(String[] data)
public void businessAdmin(String[] data)
public void taskStatus(org.kie.api.task.model.Status[] statuses)
public void processInstanceStatus(int[] intData)
public void processVersion(String[] data)
public void startDateMin(Date date)
public void startDateMax(Date date)
public void startDate(Date[] dateData)
public void endDateMin(Date date)
public void endDateMax(Date date)
public void endDate(Date[] dateData)
public void variableId(String[] data)
public void value(String[] data)
public void variableValue(String varId,
String value)
|
KIE Remote Services :: Services 6.2.0.CR4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||