public abstract class WmAdapterService
extends java.lang.Object
implements javax.resource.cci.InteractionSpec, com.wm.pkg.art.metadata.ComplexTemplate
WmAdapterService
for each service template in the adapter.Constructor and Description |
---|
WmAdapterService()
Constructs an adapter service.
|
Modifier and Type | Method and Description |
---|---|
void |
_setNodeReference(com.wm.pkg.art.ns.AdapterServiceNode node)
internal method - should be considered part of the constructor (it still must be called explicitely
because we can't change the no-arg constructor - so just set it right after instantiation.)
|
void |
accessPipeline(com.wm.data.IData pipeline,
java.lang.String inputRecordName)
Callback from ART to grant adapter service access to pipeline
The new siebel and JDBC adapters are going to support dynamic password
passing to adapter service instance.
|
void |
configureIOProperties(PipelineRecordProperties input,
PipelineRecordProperties output)
fullfill ComplexTemplate interface.
|
abstract WmRecord |
execute(WmManagedConnection connection,
WmRecord input)
Executes this adapter service template, with the specified connection and input record.
|
boolean |
execute(WmManagedConnection connection,
WmRecord input,
WmRecord output)
Support for this version of execute() is optional.
|
void |
fillWmTemplateDescriptor(WmTemplateDescriptor d,
java.util.Locale l)
Populates the metadata object describing this service template in the specified locale.
|
protected WmManagedConnectionFactory |
getConnectionProperties(WmManagedConnection connection)
Helper method to retrieve the properties of a
WmManagedConnection . |
WmConnectionSpec |
getConnectionSpec(com.wm.data.IData pipeline)
An adapter writer may override this method to specify information about
the connections requirements of a specific service invocation.
|
java.lang.String |
getDesignTimeLocale()
Retrieves a String representation of the client locale that was used
when this adapter service was created.
|
java.lang.String |
inputRecordName()
Returns the input wrapper record name.
|
java.lang.String |
outputRecordName() |
void |
populateMetadata(ComplexMetadata md,
java.util.Locale l)
Part of the ComplexTemplate interface.
|
protected void |
releaseConnection()
checks for an allocated connection and releases it if present
currently limited to use by ConfigureIOProperties
|
protected WmManagedConnection |
retrieveConnection()
Retrieves a connection instance from the default connection pool of the current service.
|
java.lang.String |
serviceName() |
void |
setDesignTimeLocale(java.lang.String val)
Java-Bean compliant accessor method to set the design-time locale data as metadata
Data is expected in the form of a pipe-delimitted string with countryCode|languageCode|[variant]
|
protected void |
setSignatureProperties(PipelineRecordProperties inputSigProps,
PipelineRecordProperties outputSigProps)
Adapter writers should override this method to configure signature properties for
this service (e.g.
|
void |
useConnection(WmManagedConnection connection) |
public WmAdapterService()
WmAdapterService
.public void _setNodeReference(com.wm.pkg.art.ns.AdapterServiceNode node)
node
- public void accessPipeline(com.wm.data.IData pipeline, java.lang.String inputRecordName)
public final void configureIOProperties(PipelineRecordProperties input, PipelineRecordProperties output) throws javax.resource.ResourceException
configureIOProperties
in interface com.wm.pkg.art.metadata.ComplexTemplate
input
- input record for the template (null if n/a)output
- output record for the templatejavax.resource.ResourceException
ComplexTemplate.configureIOProperties(com.wm.adk.metadata.PipelineRecordProperties, com.wm.adk.metadata.PipelineRecordProperties)
public abstract WmRecord execute(WmManagedConnection connection, WmRecord input) throws javax.resource.ResourceException
connection
- the connection that the adapter service should use to run.input
- the record containing the input data the adapter service should use.javax.resource.ResourceException
- an instance of AdapterException
. Adapter writers should throw an AdapterException
or any of its subclasses if an error is encountered during the service execution.WmManagedConnection
,
WmRecord
,
AdapterException
public boolean execute(WmManagedConnection connection, WmRecord input, WmRecord output) throws javax.resource.ResourceException
javax.resource.ResourceException
public void fillWmTemplateDescriptor(WmTemplateDescriptor d, java.util.Locale l) throws javax.resource.ResourceException
d
- the metadata object describing this adapter service.l
- the locale that locale-specific metadata should be populated in.javax.resource.ResourceException
- an instance of AdapterException
if an error was encountered while populating the metadataWmTemplateDescriptor
protected WmManagedConnectionFactory getConnectionProperties(WmManagedConnection connection) throws javax.resource.ResourceException
WmManagedConnection
.
This method return the WmManagedConnection's WmManagedConnectionFactory
, which
contains the connection properties. DO NOT USE THIS FACTORY TO RETRIEVE A CONNECTION.connection
- the connection object.javax.resource.ResourceException
WmManagedConnection
,
WmManagedConnectionFactory
public WmConnectionSpec getConnectionSpec(com.wm.data.IData pipeline) throws javax.resource.ResourceException
pipeline
- is complete as passed to adapter servicejavax.resource.ResourceException
- an instance of AdapterException
if an error was encountered while populating the metadatapublic java.lang.String getDesignTimeLocale()
AdapterUtil.parseLocaleString(java.lang.String)
,
ADKGLOBAL.DESIGN_LOCALE_PROPERTY
public java.lang.String inputRecordName()
inputRecordName
in interface com.wm.pkg.art.metadata.ComplexTemplate
public java.lang.String outputRecordName()
outputRecordName
in interface com.wm.pkg.art.metadata.ComplexTemplate
public void populateMetadata(ComplexMetadata md, java.util.Locale l) throws javax.resource.ResourceException
populateMetadata
in interface com.wm.pkg.art.metadata.ComplexTemplate
md
- l
- javax.resource.ResourceException
protected void releaseConnection()
protected WmManagedConnection retrieveConnection()
public java.lang.String serviceName()
public void setDesignTimeLocale(java.lang.String val)
protected void setSignatureProperties(PipelineRecordProperties inputSigProps, PipelineRecordProperties outputSigProps) throws javax.resource.ResourceException
inputSigProps
- properties record for the input signatureoutputSigProps
- properties record for the output signaturejavax.resource.ResourceException
public void useConnection(WmManagedConnection connection)
Copyright © 2003 - 2021 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.