org.openeai.transport
Interface RequestService

All Known Implementing Classes:
PointToPointProducer

public interface RequestService


Method Summary
 XmlEnterpriseObject create(ActionableEnterpriseObject theObject)
          Create message production.
 XmlEnterpriseObject delete(java.lang.String deleteAction, ActionableEnterpriseObject theObject)
          Delete message production.
 java.util.List generate(XmlEnterpriseObject keyObject, ActionableEnterpriseObject theObject)
          Generate message production.
 ProducerId getProducerId(java.lang.String dummyParm)
           
 int incrementMessageSequence()
           
 org.jdom.Document produceRequest(ActionableEnterpriseObject theObject, org.jdom.Document doc)
           
 java.util.List query(XmlEnterpriseObject keyObject, ActionableEnterpriseObject theObject)
          Query message production.
 void setProducerId(ProducerId producerId)
           
 XmlEnterpriseObject update(ActionableEnterpriseObject theObject)
          Update message production.
 

Method Detail

query

java.util.List query(XmlEnterpriseObject keyObject,
                     ActionableEnterpriseObject theObject)
                     throws TransportException
Query message production. Builds an XML document (using the primed query document as a "template") out of the current contents of the keyObject passed in. While building the XML Query message, it will validate contents of the keyObject checking for any malformed, missing or invalid fields. Field data values are also checked for validitity against the EnterpriseObjects document. Uses the producer passed in to send the XML document as a JMS request to the queue connected to by the producer which then processes the response checking for any errors in the response.

Parameters:
keyObject - XmlEnterpriseObject to use as retreival arguments in the Query. The contents of this object are inserted into the Query document prior to sending the query request. Under normal conditions, this object is actually a LightweightPerson object since that's the most common query object used.

NOTE: This method should be over-ridden by lower level classes if the keyObject isn't a LightweightPerson.

producer - PointToPointProducer a pre-configured and started PointToPointProducer which will be used to send the update-request message to the appropriate destination and return the reply to this method (via the PointToPointProducer.produceRequest method).

Returns:
java.util.List this is a list of XmlEnterpriseObject objects (like BasicPerson, BasicEmployee etc.) provided by the authoritative source (the application consuming the query request).

Throws:
EnterpriseObjectQueryException - if any errors occur when validating the contents of the object, if any errors occur while producing the request or if the object doesn't support the create action. This exception will also be thrown if the contents of the reply document contains an error. That is, if the consuming application had errors processing the request. This exception will include the Result information containing the error that occurred.
TransportException

create

XmlEnterpriseObject create(ActionableEnterpriseObject theObject)
                           throws TransportException
Create message production. Builds an XML document (using the primed create document as a "template") out of the current contents of the object. While building the XML Create document, it will validate contents of the object checking for any malformed, missing or invalid fields. Field data values are also checked for validitity against the EnterpriseObjects document. Uses the producer passed in to send the XML document as a JMS request to the queue connected to by the producer which then processes the response checking for any errors in the response.

Parameters:
producer - PointToPointProducer a pre-configured and started PointToPointProducer which will be used to send the create-request message to the appropriate destination and return the reply to this method (via the PointToPointProducer.produceRequest method).

Returns:
XmlEnterpriseObject a generic response which will indicate success or failure. If failure, any error information will be included in that result. The object returned is actually a org.openeai.moa.objects.Result object.

Throws:
EnterpriseObjectCreateException - if any errors occur when validating the contents of the object, if any errors occur while producing the request or if the object doesn't support the create action. This exception will also be thrown if the contents of the reply document contains an error. That is, if the consuming application had errors processing the request. This exception will include the Result information containing the error that occurred.
TransportException

delete

XmlEnterpriseObject delete(java.lang.String deleteAction,
                           ActionableEnterpriseObject theObject)
                           throws TransportException
Delete message production. Builds an XML document (using the primed delete document as a "template") out of the current contents of the object. While building the XML Delete document, it will validate contents of the object checking for any malformed, missing or invalid fields. Field data values are also checked for validitity against the EnterpriseObjects document. Uses the producer passed in to send the XML document as a JMS request to the queue connected to by the producer which then processes the response checking for any errors in the response.

Parameters:
deleteAction - String the delete action ('delete' or 'purge')

producer - PointToPointProducer a pre-configured and started PointToPointProducer which will be used to send the delete-request message to the appropriate destination and return the reply to this method (via the PointToPointProducer.produceRequest method).

Returns:
XmlEnterpriseObject a generic response which will indicate success or failure. If failure, any error information will be included in that result. The object returned is actually a org.openeai.moa.objects.Result object.

Throws:
EnterpriseObjectDeleteException - if any errors occur when validating the contents of the object, if any errors occur while producing the request or if the object doesn't support the create action. This exception will also be thrown if the contents of the reply document contains an error. That is, if the consuming application had errors processing the request. This exception will include the Result information containing the error that occurred.
TransportException

generate

java.util.List generate(XmlEnterpriseObject keyObject,
                        ActionableEnterpriseObject theObject)
                        throws TransportException
Generate message production. Builds an XML document (using the primed generate document as a "template") out of the current contents of the object. While building the XML Generate document, it will validate contents of the object checking for any malformed, missing or invalid fields. Field data values are also checked for validitity against the EnterpriseObjects document. Uses the producer passed in to send the XML document as a JMS request to the queue connected to by the producer which then processes the response checking for any errors in the response.

Parameters:
producer - PointToPointProducer a pre-configured and started PointToPointProducer which will be used to send the update-request message to the appropriate destination and return the reply to this method (via the PointToPointProducer.produceRequest method).

keyObject - XmlEnterpriseObject to use as generation "seed" data (like an UnknownPerson for an InstitutionalIdentity-Generate-Request).

Returns:
java.util.List this is a list of XmlEnterpriseObject objects generated by the authoritative source (the application consuming the request to generate). Typically, this will be only one object (like an InstitutionalIdentity).

Throws:
EnterpriseObjectGenerateException - if any errors occur when validating the contents of the object, if any errors occur while producing the request or if the object doesn't support the create action. This exception will also be thrown if the contents of the reply document contains an error. That is, if the consuming application had errors processing the request. This exception will include the Result information containing the error that occurred.
TransportException

update

XmlEnterpriseObject update(ActionableEnterpriseObject theObject)
                           throws TransportException
Update message production. Builds an XML document (using the primed update document as a "template") out of the current contents of the object (this). It will use the current contents of the object as the NewData portion of the message and it will use this object's "baseline" object as the Baseline portion of the message. The "baseline" object is set when this object was "queried" for previously. While building the XML Update message, it will validate contents checking for any malformed, missing or invalid fields. Field data values are also checked for validitity against the EnterpriseObjects document. Uses the producer passed in to send the XML document as a JMS request to the queue connected to by the producer which then processes the response checking for any errors in the response.

Parameters:
producer - PointToPointProducer a pre-configured and started PointToPointProducer which will be used to send the update-request message to the appropriate destination and return the reply to this method (via the PointToPointProducer.produceRequest method).

Returns:
XmlEnterpriseObject (Result) this will indicate the success or failure of the Update request. In an error condition, this will include any error information.

Throws:
EnterpriseObjectUpdateException - if any errors occur when validating the contents of the object, if any errors occur while producing the request or if the object doesn't support the create action. This exception will also be thrown if the contents of the reply document contains an error. That is, if the consuming application had errors processing the request. This exception will include the Result information containing the error that occurred.
TransportException

produceRequest

org.jdom.Document produceRequest(ActionableEnterpriseObject theObject,
                                 org.jdom.Document doc)
                                 throws TransportException
Throws:
TransportException

getProducerId

ProducerId getProducerId(java.lang.String dummyParm)

setProducerId

void setProducerId(ProducerId producerId)

incrementMessageSequence

int incrementMessageSequence()


Copyright © 2002,2003 OpenEAI Software Foundation