Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.connector
Interface IRecordTranslator

public interface IRecordTranslator

ApplicationView record translation plugin.

Since the Application Integration engine only supports javax.resource.cci.Record of type com.bea.connector.DocumentRecord, you must translate this proprietary format to a Document record for request and response records. You do not need to rewrite the CCI Interaction layer of the adapter. By inserting a class into the WLI engine classpath that implements IRecordTranslator, the ApplicationView Engine will execute the translate methods in your translator class on each Record for request and response.

The requirements and restrictions for implementing this translator class are that there is a one to one correlation between adapter and the translator. The plug-in architecture loads the translator class by name using the full class name of the adapter's InteractionSpec plus the phrase "RecordTranslator". For example, if the adapter's InteractionSpec class name was com.bea.adapter.dbms.cci.InteractionSpecImpl, then the engine would load the class com.bea.adapter.dbms.cci.InteractionSpecImplRecordTranslator if it was available.

Method Summary
`javax.resource.cci.Record` | `translateRequest(javax.resource.cci.InteractionSpec ixSpec, DocumentRecord inputRecord, javax.resource.cci.ConnectionFactory connectionFactory)` Translate request input XML document to adapter specific Record.
`javax.resource.cci.Record` | `translateResponse(javax.resource.cci.InteractionSpec ixSpec, DocumentRecord inputRecord, javax.resource.cci.ConnectionFactory connectionFactory)` Translate reponse input XML document to adapter specific Record.
`DocumentRecord` | `translateResponse(javax.resource.cci.InteractionSpec ixSpec, DocumentRecord outputDocumentRecord, javax.resource.cci.Record outputRecord, javax.resource.cci.ConnectionFactory connectionFactory)` Translate response output adapter specific Record to XML document.

Method Detail

### translateRequest

    public javax.resource.cci.Record translateRequest(javax.resource.cci.InteractionSpec ixSpec,
                                                      DocumentRecord inputRecord,
                                                      javax.resource.cci.ConnectionFactory connectionFactory)
                                               throws RecordTranslationException

  Translate request input XML document to adapter specific Record. The output of this translation will be used as the input, request/input, to the execute method on the javax.resource.cci.Interaction object

  Parameters:
    `ixSpec` - the interaction spec for the service
    `inputRecord` - the XML record being sent to the adapter from the application view
    `connectionFactory` -
  Returns:
    tranlated record in adapter specific format
  Throws:
    `RecordTranslationException`
  See Also:
    `Interaction`

### translateResponse

    public javax.resource.cci.Record translateResponse(javax.resource.cci.InteractionSpec ixSpec,
                                                       DocumentRecord inputRecord,
                                                       javax.resource.cci.ConnectionFactory connectionFactory)
                                                throws RecordTranslationException

  Translate reponse input XML document to adapter specific Record. The output of this translation will be used as the input, response/output, to the execute method on the javax.resource.cci.Interaction object

  Parameters:
    `ixSpec` - the interaction spec for the service
    `inputRecord` - the XML record being sent to the adapter from the application view
    `connectionFactory` -
  Returns:
    tranlated record in adapter specific format
  Throws:
    `RecordTranslationException`
  See Also:
    `Interaction`

### translateResponse

    public DocumentRecord translateResponse(javax.resource.cci.InteractionSpec ixSpec,
                                            DocumentRecord outputDocumentRecord,
                                            javax.resource.cci.Record outputRecord,
                                            javax.resource.cci.ConnectionFactory connectionFactory)
                                     throws RecordTranslationException

  Translate response output adapter specific Record to XML document. The outputRecord used as input to this method is the output of the execute method on the javax.resource.cci.Interaction object.

  If the calling application has prebuilt an output XML document, outputDocumentRecord will reference that document. Unless the calling application is reusing the output record, this parameter is null. To facilitate reuse, the outputDocumentRecord should be returned if one is provided as input.

  outputRecord is the resultant record from the Interaction's execute method.

  Parameters:
    `ixSpec` - the interaction spec for the service
    `outputDocumentRecord` - reusable XML Document Record
    `outputRecord` - the record returned from the adapter after a successful service call
    `connectionFactory` -
  Returns:
    The adapter record converted to XML
  Throws:
    `RecordTranslationException`
  See Also:
    `Interaction`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD