Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.adapter.cci
Class AbstractDocumentRecordInteraction

    java.lang.Object
      |
      +--com.bea.adapter.cci.AbstractInteraction
            |
            +--com.bea.adapter.cci.AbstractDocumentRecordInteraction

public abstract class AbstractDocumentRecordInteraction
extends AbstractInteraction

Provides a base implementation for adapter providers to extend. An `Interaction` enables a component to execute EIS functions. This class makes sure the client passed a com.bea.connector.DocumentRecord.

A DocumentRecord represents a runtime request for a service. A service represents functionality available in an EIS system. A service is comprised of four components:

- Unique Business Name: Every service has a unique business name that indicates its role in an integration solution. For example, in an integration solution involving a Customer Relationship Management (CRM) system, you may have a service named "CreateNewCustomer". It is important to understand that the service name should reflect the business purpose of the service. It is an abstraction from the name of the function(s) your service invokes in the EIS. If the underlying CRM system is SAP R/3, the "CreateNewCustomer" service would map to a BAPI or RFC.
- Request Document Definition: The request document definition describes the input requirements for a service. The com.bea.document.IDocumentDefinition interface embodies all the metadata about a document type. It includes the document schema (structure and usage), and the root element name for all documents of this type. The root element name is needed because an XML schema can define more than one possible root element.
- Response Document Definition: The response document definition describes the output for a service.
- Additional Metadata: A service is a higher-order component in an integration solution that hides most of the complexity involved in executing functionality in an EIS. In other words, a service does not expose many of the details required to interact with the EIS in its public interface. This implies there is some amount of information that is required to invoke a function in an EIS that is not provided by the client in the request. Consequently, most services need to store additional metadata. In WLAI, this additional metadata is encapuslated by a resource adapter's javax.resource.cci.InteractionSpec implementation class.

Author:
  Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.

Fields inherited from class com.bea.adapter.cci.AbstractInteraction
`m_warning`

Constructor Summary
`AbstractDocumentRecordInteraction(AbstractConnection connectionHandle)` Constructs an instance

Method Summary
`boolean` | `allowsNullRequest()` Indicates whether this adapter can allow null request records.
`boolean` | `allowsNullResponse()` Indicates whether this adapter can return null response records.
`protected abstract DocumentRecord` | `execute(javax.resource.cci.InteractionSpec ixSpec, DocumentRecord inputDoc)` Adapter developers must provide an implementation for this method rather than overriding execute(InteractionSpec, Record)
`protected abstract boolean` | `execute(javax.resource.cci.InteractionSpec ixSpec, DocumentRecord inputDoc, DocumentRecord outputDoc)` Adapter developers must provide an implementation for this method rather than execute(InteractionSpec, Record, Record).
`javax.resource.cci.Record` | `execute(javax.resource.cci.InteractionSpec ixSpec, javax.resource.cci.Record input)` Executes the EIS function represented by the `InteractionSpec` and produces the output `Record` as a return value.
`boolean` | `execute(javax.resource.cci.InteractionSpec ixSpec, javax.resource.cci.Record input, javax.resource.cci.Record output)` Executes the EIS function represented by the `InteractionSpec` and updates the output `Record`.
`protected java.lang.String` | `getContent(DocumentRecord rec, java.lang.String strPath, boolean bIsMandatory)` A convenience method for retrieving String content from a DocumentRecord.
`protected java.util.Calendar` | `getDateContent(DocumentRecord rec, java.lang.String strPath, boolean bIsMandatory)` A convenience method for retrieving date content as a Java Calendar from a DocumentRecord.
`protected java.util.Calendar` | `getDateTimeContent(DocumentRecord rec, java.lang.String strPath, boolean bIsMandatory)` A convenience method for retrieving dateTime content as a Java Calendar from a DocumentRecord.
`protected java.util.Calendar` | `getTimeContent(DocumentRecord rec, java.lang.String strPath, boolean bIsMandatory)` A convenience method for retrieving time content as a Java Calendar from a DocumentRecord.
`protected void` | `validateRequestDocument(DocumentInteractionSpec ixSpec, DocumentRecord inputDoc)` Convenience method for validating request documents

Methods inherited from class com.bea.adapter.cci.AbstractInteraction
`clearWarnings, getConnection, getLogContext, getLogger, getRecordFactory, getWarnings`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractDocumentRecordInteraction

    public AbstractDocumentRecordInteraction(AbstractConnection connectionHandle)
                                      throws javax.resource.ResourceException

  Constructs an instance

  Parameters:
    `connectionHandle` - - the connection to execute an EIS function against must not be null.
  Throws:
    javax.resource.ResourceException - - the supplied handle or the log context object is null

Method Detail

### allowsNullRequest

    public boolean allowsNullRequest()

  Indicates whether this adapter can allow null request records. Subclasses should override this method to return true if they can accept null request records. By default this method returns false.

### allowsNullResponse

    public boolean allowsNullResponse()

  Indicates whether this adapter can return null response records. Subclasses should override this method to return true if they can return null response records. By default this method returns false.

### execute

    public boolean execute(javax.resource.cci.InteractionSpec ixSpec,
                           javax.resource.cci.Record input,
                           javax.resource.cci.Record output)
                    throws javax.resource.ResourceException

  Executes the EIS function represented by the `InteractionSpec` and updates the output `Record`. Specifically, this method ensures that the input and output records are DocumentRecords.

### execute

    protected abstract boolean execute(javax.resource.cci.InteractionSpec ixSpec,
                                       DocumentRecord inputDoc,
                                       DocumentRecord outputDoc)
                                throws javax.resource.ResourceException

  Adapter developers must provide an implementation for this method rather than execute(InteractionSpec, Record, Record).

### execute

    public javax.resource.cci.Record execute(javax.resource.cci.InteractionSpec ixSpec,
                                             javax.resource.cci.Record input)
                                      throws javax.resource.ResourceException

  Executes the EIS function represented by the `InteractionSpec` and produces the output `Record` as a return value.

### execute

    protected abstract DocumentRecord execute(javax.resource.cci.InteractionSpec ixSpec,
                                              DocumentRecord inputDoc)
                                       throws javax.resource.ResourceException

  Adapter developers must provide an implementation for this method rather than overriding execute(InteractionSpec, Record)

### validateRequestDocument

    protected void validateRequestDocument(DocumentInteractionSpec ixSpec,
                                           DocumentRecord inputDoc)
                                    throws javax.resource.ResourceException

  Convenience method for validating request documents

### getContent

    protected java.lang.String getContent(DocumentRecord rec,
                                          java.lang.String strPath,
                                          boolean bIsMandatory)
                                   throws javax.resource.ResourceException

  A convenience method for retrieving String content from a DocumentRecord.

  Parameters:
    `rec` - - the DocumentRecord with the desired content
    `strPath` - - a valid XPath in the Document
    `bIsMandatory` - - a flag to indicate if the value is mandatory.
  Throws:
    javax.resource.ResourceException - if the DocumentRecord does not contain mandatory content, i.e. if the String value is null or empty.

### getDateContent

    protected java.util.Calendar getDateContent(DocumentRecord rec,
                                                java.lang.String strPath,
                                                boolean bIsMandatory)
                                         throws javax.resource.ResourceException

  A convenience method for retrieving date content as a Java Calendar from a DocumentRecord.

  Parameters:
    `rec` - - the DocumentRecord with the desired content
    `strPath` - - a valid XPath in the Document
    `bIsMandatory` - - a flag to indicate if the value is mandatory.
  Throws:
    javax.resource.ResourceException - if the DocumentRecord does not contain mandatory content, i.e. if the String value is null or empty.

### getDateTimeContent

    protected java.util.Calendar getDateTimeContent(DocumentRecord rec,
                                                    java.lang.String strPath,
                                                    boolean bIsMandatory)
                                             throws javax.resource.ResourceException

  A convenience method for retrieving dateTime content as a Java Calendar from a DocumentRecord.

  Parameters:
    `rec` - - the DocumentRecord with the desired content
    `strPath` - - a valid XPath in the Document
    `bIsMandatory` - - a flag to indicate if the value is mandatory.
  Throws:
    javax.resource.ResourceException - if the DocumentRecord does not contain mandatory content, i.e. if the String value is null or empty.

### getTimeContent

    protected java.util.Calendar getTimeContent(DocumentRecord rec,
                                                java.lang.String strPath,
                                                boolean bIsMandatory)
                                         throws javax.resource.ResourceException

  A convenience method for retrieving time content as a Java Calendar from a DocumentRecord.

  Parameters:
    `rec` - - the DocumentRecord with the desired content
    `strPath` - - a valid XPath in the Document
    `bIsMandatory` - - a flag to indicate if the value is mandatory.
  Throws:
    javax.resource.ResourceException - if the DocumentRecord does not contain mandatory content, i.e. if the String value is null or empty.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Integration (WLI)