com.oakgrovesystems.reactor.requests
Class QueryProcessTree

java.lang.Object
  |
  +--com.oakgrovesystems.reactor.requests.ReactorRequest
        |
        +--com.oakgrovesystems.reactor.requests.QueryRequest
              |
              +--com.oakgrovesystems.reactor.requests.QueryProcessTree
All Implemented Interfaces:
java.io.Serializable

public class QueryProcessTree
extends QueryRequest

A request for the Set of Process Mediation Objects in the subtree with the specified root Process. The depth parameter specifies the number of levels of subprocesses to include in the tree (negative implies the entire depth of the subtree). The query always returns all the Process objects in the tree to the specified depth. In addition, it can optionally include any or all of:

This query can optionally return just the identifiers of the objects in the result set instead of the objects themselves.

See Also:
Serialized Form

Field Summary
static java.lang.String DEF_ONLY_PARM_NAME
          The name of the request parameter that is the boolean indicating that only Definition trees should be returned.
static java.lang.String DEPTH_PARM_NAME
          The name of the request parameter that is the depth of the tree to retrieve
static java.lang.String GET_OPERANDS_PARM_NAME
          The name of the request parameter that is whether or not to return Operands
static java.lang.String GET_POLICIES_PARM_NAME
          The name of the request parameter that is whether or not to return Policies
static java.lang.String GET_STATUSES_PARM_NAME
          The name of the request parameter that is whether or not to return Statuses
static java.lang.String GET_SUPERPROCESS_PARM_NAME
          The name of the request parameter that is whether or not to return the superprocess
static java.lang.String ID_PARM_NAME
          The name of the request parameter that is the id of the root of the tree
static java.lang.String LABEL_PATH_PARM_NAME
          The name of the request parameter that is the label path of the root of the tree
static java.lang.String PROCESS_TREE
          The type of a query for a process subtree
static java.lang.String REQUEST_TYPE
          The request type of Query requests.
static java.lang.String TYPE_PARM_NAME
          The name of the request parameter that is the query type
 
Fields inherited from class com.oakgrovesystems.reactor.requests.QueryRequest
operandBuilder, policyBuilder, processBuilder, statusBuilder, useLabelPaths
 
Fields inherited from class com.oakgrovesystems.reactor.requests.ReactorRequest
operandOutputter, policyOutputter, processOutputter, statusOutputter
 
Constructor Summary
QueryProcessTree()
          Creates a QueryProcessTree request without specifying the authentication token to use to make the request.
QueryProcessTree(java.lang.String authToken)
          Creates a QueryProcessTree request that will use the specified authentication token
 
Method Summary
 boolean getDefinitionTreeOnly()
          returns the request parameter that is the boolean indicating that only Definition trees should be returned.
 java.lang.Integer getDepth()
          returns the depth of the tree to return
 com.oakgrovesystems.reactor.ReactorObjectId getId()
          returns the id of the root of the tree
 boolean getIncludeOperands()
          returns the boolean indicating whether or not to include Operands in the result set
 boolean getIncludePolicies()
          returns the boolean indicating whether or not to include Policies in the result set
 boolean getIncludeStatuses()
          returns the boolean indicating whether or not to include Statuses in the result set
 boolean getIncludeSuperprocess()
          returns the boolean indicating whether or not to include in the result set the superprocess of the root of the Process tree
 com.oakgrovesystems.reactor.LabelPath getLabelPath()
          returns the label path of the root of the tree
 java.util.List paramsToXML()
          Returns a List of Elements representing the parameters of the request
protected  void parseParameters(org.jdom.Element params, com.oakgrovesystems.reactor.LabelPathToIdMapper mapper)
          Configures the parameters from the XML representation
 void setDefinitionTreeOnly(boolean gdto)
          sets the request parameter that is the boolean indicating that only Definition trees should be returned.
 void setDepth(int depth)
           
 void setDepth(java.lang.Integer depth)
          Specifies the number of levels of subprocesses to return.
 void setId(com.oakgrovesystems.reactor.ReactorObjectId id)
          Specifies the id of the root of the tree.
 void setIncludeOperands(boolean getOperands)
          Specifies whether or not to include Operands in the result set.
 void setIncludePolicies(boolean getPolicies)
          Specifies whether or not to include Policies in the result set.
 void setIncludeStatuses(boolean getStatuses)
          Specifies whether or not to include Statuses in the result set.
 void setIncludeSuperprocess(boolean getSuperprocess)
          Specifies whether or not to include in the result set the superprocess of the root of the Process tree.
 void setLabelPath(com.oakgrovesystems.reactor.LabelPath lp)
          Specifies the label path of the root of the tree.
 
Methods inherited from class com.oakgrovesystems.reactor.requests.QueryRequest
addObject, addOperand, addPolicy, addProcess, addReference, addStatus, createRtnValXML, getLabelPathFromReference, getUseLabelPaths, parseReturnValues, setUseLabelPaths
 
Methods inherited from class com.oakgrovesystems.reactor.requests.ReactorRequest
configureFromXML, configureFromXML, createResponseXML, createResponseXML, createReturnValuesElem, getAuthToken, getLabelPath, getObjectId, getParameter, getParameter, getParameterNames, getRequestType, makeAuthTokenXML, makeObjectElement, makeOperandElement, makePolicyElement, makeProcessElement, makeReferenceElement, makeStatusElement, parseResponse, send, sendAsXML, sendViaHttp, setAuthToken, setParameter, setRequestType, toString, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROCESS_TREE

public static final java.lang.String PROCESS_TREE
The type of a query for a process subtree

See Also:
Constant Field Values

TYPE_PARM_NAME

public static final java.lang.String TYPE_PARM_NAME
The name of the request parameter that is the query type

See Also:
Constant Field Values

ID_PARM_NAME

public static final java.lang.String ID_PARM_NAME
The name of the request parameter that is the id of the root of the tree

See Also:
Constant Field Values

LABEL_PATH_PARM_NAME

public static final java.lang.String LABEL_PATH_PARM_NAME
The name of the request parameter that is the label path of the root of the tree

See Also:
Constant Field Values

DEF_ONLY_PARM_NAME

public static final java.lang.String DEF_ONLY_PARM_NAME
The name of the request parameter that is the boolean indicating that only Definition trees should be returned. This parameter is only used in the case where the label path is used to specify the root of the tree AND that label path resolves to multiple ids, only one of which is a Process Definition. A value of true indicates that in this case, the tree of the definition should be returned. A value of false indicates the query should fail. Default is true.

See Also:
Constant Field Values

DEPTH_PARM_NAME

public static final java.lang.String DEPTH_PARM_NAME
The name of the request parameter that is the depth of the tree to retrieve

See Also:
Constant Field Values

GET_SUPERPROCESS_PARM_NAME

public static final java.lang.String GET_SUPERPROCESS_PARM_NAME
The name of the request parameter that is whether or not to return the superprocess

See Also:
Constant Field Values

GET_OPERANDS_PARM_NAME

public static final java.lang.String GET_OPERANDS_PARM_NAME
The name of the request parameter that is whether or not to return Operands

See Also:
Constant Field Values

GET_STATUSES_PARM_NAME

public static final java.lang.String GET_STATUSES_PARM_NAME
The name of the request parameter that is whether or not to return Statuses

See Also:
Constant Field Values

GET_POLICIES_PARM_NAME

public static final java.lang.String GET_POLICIES_PARM_NAME
The name of the request parameter that is whether or not to return Policies

See Also:
Constant Field Values

REQUEST_TYPE

public static final java.lang.String REQUEST_TYPE
The request type of Query requests. Used as a parameter to setRequestType() in the instance initializer.

See Also:
Constant Field Values
Constructor Detail

QueryProcessTree

public QueryProcessTree()
Creates a QueryProcessTree request without specifying the authentication token to use to make the request. setAuthToken() must be called before the request can be sent successfully.


QueryProcessTree

public QueryProcessTree(java.lang.String authToken)
Creates a QueryProcessTree request that will use the specified authentication token

Parameters:
authToken - the authentication token to use to make the request
Method Detail

setId

public void setId(com.oakgrovesystems.reactor.ReactorObjectId id)
Specifies the id of the root of the tree. Calling this method with a non-null parameter has the side effect of calling setLabelPath with a null parameter.

Parameters:
id - the id of the root of the tree

getId

public com.oakgrovesystems.reactor.ReactorObjectId getId()
returns the id of the root of the tree

Returns:
the id of the root of the tree

setLabelPath

public void setLabelPath(com.oakgrovesystems.reactor.LabelPath lp)
Specifies the label path of the root of the tree. Calling this method with a non-null parameter has the side effect of calling setId with a null parameter.

Parameters:
lp - the label path of the root of the tree

getLabelPath

public com.oakgrovesystems.reactor.LabelPath getLabelPath()
returns the label path of the root of the tree

Returns:
the label path of the root of the tree

setDefinitionTreeOnly

public void setDefinitionTreeOnly(boolean gdto)
sets the request parameter that is the boolean indicating that only Definition trees should be returned. This parameter is only used in the case where the label path is used to specify the root of the tree AND that label path resolves to multiple ids, only one of which is a Process Definition. A value of true indicates that in this case, the tree of the definition should be returned. A value of false indicates the query should fail. Default is true.

Parameters:
gdto - the value of the boolean request parameter

getDefinitionTreeOnly

public boolean getDefinitionTreeOnly()
returns the request parameter that is the boolean indicating that only Definition trees should be returned. This parameter is only used in the case where the label path is used to specify the root of the tree AND that label path resolves to multiple ids, only one of which is a Process Definition. A value of true indicates that in this case, the tree of the definition should be returned. A value of false indicates the query should fail. Default is true.

Returns:
the value of the boolean request parameter

setDepth

public void setDepth(java.lang.Integer depth)
Specifies the number of levels of subprocesses to return. Defaults to 0 if uncalled. Negative means the entire depth of the tree

Parameters:
depth - the number of levels of subprocesses to return

setDepth

public void setDepth(int depth)

getDepth

public java.lang.Integer getDepth()
returns the depth of the tree to return

Returns:
the depth of the tree to return

setIncludeSuperprocess

public void setIncludeSuperprocess(boolean getSuperprocess)
Specifies whether or not to include in the result set the superprocess of the root of the Process tree. Defaults to false if uncalled.

Parameters:
getSuperprocess - whether or not to include in the result set the superprocess of the root of the Process tree

getIncludeSuperprocess

public boolean getIncludeSuperprocess()
returns the boolean indicating whether or not to include in the result set the superprocess of the root of the Process tree

Returns:
the boolean indicating whether or not to include in the result set the superprocess of the root of the Process tree

setIncludeOperands

public void setIncludeOperands(boolean getOperands)
Specifies whether or not to include Operands in the result set. Defaults to false if uncalled.

Parameters:
getOperands - whether or not to include Operands in the result set

getIncludeOperands

public boolean getIncludeOperands()
returns the boolean indicating whether or not to include Operands in the result set

Returns:
the boolean indicating whether or not to include Operands in the result set

setIncludeStatuses

public void setIncludeStatuses(boolean getStatuses)
Specifies whether or not to include Statuses in the result set. Defaults to false if uncalled.

Parameters:
getStatuses - whether or not to include Statuses in the result set

getIncludeStatuses

public boolean getIncludeStatuses()
returns the boolean indicating whether or not to include Statuses in the result set

Returns:
the boolean indicating whether or not to include Statuses in the result set

setIncludePolicies

public void setIncludePolicies(boolean getPolicies)
Specifies whether or not to include Policies in the result set. Defaults to false if uncalled.

Parameters:
getPolicies - whether or not to include Policies in the result set

getIncludePolicies

public boolean getIncludePolicies()
returns the boolean indicating whether or not to include Policies in the result set

Returns:
the boolean indicating whether or not to include Policies in the result set

parseParameters

protected void parseParameters(org.jdom.Element params,
                               com.oakgrovesystems.reactor.LabelPathToIdMapper mapper)
                        throws FailedRequestException
Description copied from class: ReactorRequest
Configures the parameters from the XML representation

Specified by:
parseParameters in class ReactorRequest
Parameters:
params - the 'parameters' Element of the request
Throws:
FailedRequestException - if the parameters can't be configured from the XML.

paramsToXML

public java.util.List paramsToXML()
                           throws FailedRequestException
Description copied from class: ReactorRequest
Returns a List of Elements representing the parameters of the request

Specified by:
paramsToXML in class ReactorRequest
Returns:
a List of Elements representing the parameters of the request
FailedRequestException


Copyright (c) 1999-2004 Oak Grove Systems. All Rights Reserved.