com.oakgrovesystems.reactor.requests
Class Delete

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

public class Delete
extends ReactorRequest

A request to permanently remove a Process Mediation Object.

See Also:
Serialized Form

Field Summary
static java.lang.String DELETE_DEF_PARM_NAME
          The name of the request parameter that is the boolean value of deleteDefinitionOnly
static java.lang.String ID_PARM_NAME
          The name of the request parameter that is the id of the object to delete.
static java.lang.String LABEL_PATH_PARM_NAME
          The name of the request parameter that is the label path of the object to delete.
static java.lang.String REQUEST_TYPE
          The request type of Delete requests.
static java.lang.String TYPE_PARM_NAME
          The name of the request parameter that is the type of the object to delete
 
Fields inherited from class com.oakgrovesystems.reactor.requests.ReactorRequest
operandOutputter, policyOutputter, processOutputter, statusOutputter
 
Constructor Summary
Delete()
          Creates a Delete request without specifying the authentication token to use to make the request.
Delete(java.lang.String authToken)
          Creates a Delete request that will use the specified authentication token
 
Method Summary
 boolean getDeleteDefinitionOnly()
          Whether or not only a Process definition may be deleted by this request.
 com.oakgrovesystems.reactor.ReactorObjectId getId()
          returns the id of the object to delete
 com.oakgrovesystems.reactor.LabelPath getLabelPath()
          returns the label path of the object to delete
 java.lang.Class getType()
          returns the Class of the object to delete
 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 setDeleteDefinitionOnly(boolean deleteDefinitionOnly)
          Specifies whether or not only a Process definition may be deleted by this request.
 void setId(com.oakgrovesystems.reactor.ReactorObjectId id)
          Specifies the id of the object to delete.
 void setLabelPath(com.oakgrovesystems.reactor.LabelPath lp)
          Specifies the label path of the object to delete.
 void setType(java.lang.Class type)
          Specifies the Class of the object to delete
 
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

ID_PARM_NAME

public static final java.lang.String ID_PARM_NAME
The name of the request parameter that is the id of the object to delete. Not used in conjunction with LABEL_PATH_PARM_NAME.

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 object to delete. Not used in conjunction with ID_PARM_NAME.

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 type of the object to delete

See Also:
Constant Field Values

DELETE_DEF_PARM_NAME

public static final java.lang.String DELETE_DEF_PARM_NAME
The name of the request parameter that is the boolean value of deleteDefinitionOnly

See Also:
Constant Field Values

REQUEST_TYPE

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

See Also:
Constant Field Values
Constructor Detail

Delete

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


Delete

public Delete(java.lang.String authToken)
Creates a Delete 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 object to delete. 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 object to delete

getId

public com.oakgrovesystems.reactor.ReactorObjectId getId()
returns the id of the object to delete

Returns:
the id of the object to delete

setLabelPath

public void setLabelPath(com.oakgrovesystems.reactor.LabelPath lp)
Specifies the label path of the object to delete. 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 object to delete

getLabelPath

public com.oakgrovesystems.reactor.LabelPath getLabelPath()
returns the label path of the object to delete

Returns:
the label path of the object to delete

setType

public void setType(java.lang.Class type)
Specifies the Class of the object to delete

Parameters:
type - the Class of the object to delete

getType

public java.lang.Class getType()
returns the Class of the object to delete

Returns:
the Class of the object to delete

setDeleteDefinitionOnly

public void setDeleteDefinitionOnly(boolean deleteDefinitionOnly)
Specifies whether or not only a Process definition may be deleted by this request. This parameter is only used in the case where a label path is used to identify the object to be deleted AND the label path specified resolves to exactly one Process definition and at least one other ProcessMediationObject. A value of true indicates that in this case, only the definition should be deleted. A value of false indicates that in this case, the request should fail and delete nothing. The default is to fail and delete nothing.

Parameters:
deleteDefinitionOnly - whether or not to delete the Process definiton

getDeleteDefinitionOnly

public boolean getDeleteDefinitionOnly()
Whether or not only a Process definition may be deleted by this request. This parameter is only used in the case where a label path is used to identify the object to be deleted AND the label path specified resolves to exactly one Process definition and at least one other ProcessMediationObject. A value of true indicates that in this case, only the definition should be deleted. A value of false indicates that in this case, the request should fail and delete nothing. The default is to fail and delete nothing.

Returns:
whether or not to delete the Process definiton

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.