com.oakgrovesystems.reactor.requests
Class SetObjects

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

public class SetObjects
extends ReactorRequest

A request to create or update new Process Mediation Objects. The parameters must include a Set of objects from the com.oakgrovesystems.reactor.processMediation package. The difference between this request and a create request is that a create request will complain if objects in the set already exist, whereas this request will simply overwrite the objects. Overwriting objects must be done with care, as the objects you are overwriting may have been modified since the last time you looked at them. In this case, the modifications would be lost.

See Also:
Serialized Form

Field Summary
static java.lang.String OBJECTS_PARM_NAME
          The name of the request parameter that is the the set of objects to update.
static java.lang.String REQUEST_TYPE
          The request type of SetObjects requests.
protected  boolean useLabelPaths
           
 
Fields inherited from class com.oakgrovesystems.reactor.requests.ReactorRequest
operandOutputter, policyOutputter, processOutputter, statusOutputter
 
Constructor Summary
SetObjects()
          Creates a SetObjects request without specifying the authentication token to use to make the request.
SetObjects(java.lang.String authToken)
          Creates a SetObjects request that will use the specified authentication token
 
Method Summary
 void addObjectsToUpdate(java.util.Collection objects)
          Specifies the set of Objects to update.
 void addObjectToUpdate(java.lang.Object object)
          Specifies the set of Objects to update.
 java.util.Set getObjectsToUpdate()
          returns the set of Objects to update.
 boolean getUseLabelPaths()
          Returns whether references in request use label paths, and should be translated to IDs.
 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
protected  com.oakgrovesystems.reactor.ReactorResponse parseReturnValues(org.jdom.Element returnValues)
           
 void setObjectsToUpdate(java.util.Set objects)
          Specifies the set of Objects to update.
 void setUseLabelPaths(boolean value)
          Specifies whether references in request use label paths, and should be translated to IDs.
 
Methods inherited from class com.oakgrovesystems.reactor.requests.ReactorRequest
configureFromXML, configureFromXML, createResponseXML, createResponseXML, createReturnValuesElem, createRtnValXML, 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

OBJECTS_PARM_NAME

public static final java.lang.String OBJECTS_PARM_NAME
The name of the request parameter that is the the set of objects to update.

See Also:
Constant Field Values

REQUEST_TYPE

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

See Also:
Constant Field Values

useLabelPaths

protected boolean useLabelPaths
Constructor Detail

SetObjects

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


SetObjects

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

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

setObjectsToUpdate

public void setObjectsToUpdate(java.util.Set objects)
Specifies the set of Objects to update.

Parameters:
objects - The set of Objects to update.

addObjectToUpdate

public void addObjectToUpdate(java.lang.Object object)
Specifies the set of Objects to update.


addObjectsToUpdate

public void addObjectsToUpdate(java.util.Collection objects)
Specifies the set of Objects to update.

Parameters:
objects - The set of Objects to update.

getObjectsToUpdate

public java.util.Set getObjectsToUpdate()
returns the set of Objects to update.

Returns:
the set of Objects to update.

setUseLabelPaths

public void setUseLabelPaths(boolean value)
Specifies whether references in request use label paths, and should be translated to IDs.

Parameters:
value - whether references in request use label paths

getUseLabelPaths

public boolean getUseLabelPaths()
Returns whether references in request use label paths, and should be translated to IDs.

Returns:
whether references in request use label paths

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

parseReturnValues

protected com.oakgrovesystems.reactor.ReactorResponse parseReturnValues(org.jdom.Element returnValues)
                                                                 throws FailedRequestException
Specified by:
parseReturnValues in class ReactorRequest
FailedRequestException


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