beautypg.com

IBM WebSphere Adapters User Manual

Page 157

background image

The enterprise metadata discovery service uses WBIMetadataEditImpl to acquire
connectionTypes

, which contains editable properties forResourceAdapter,

ManagedConnectionFactory

, or ActivationSpecWithXid.

The enterprise metadata discovery tooling creates an instance of
WBIMetadataEditImpl

during the boot strap process. Along with the name of the

MetadataDiscovery

class, WBIMetadataEditImpl is specified in the

discovery-service.xml

file. If for any reason WBIMetadataEditImpl cannot be

instantiated, then enterprise metadata discovery is not selectable in the WebSphere
Integration Developer tooling.

getOutboundConnectionType

The getOutboundConnectionType() method returns an instance of
OutboundConnectionType

with an input name.

public OutboundConnectionType getOutboundConnectionType(String arg0)

throws MetadataException {

return adapterType.getOutboundConnectionTypes()[1];

}

getInboundConnectionType

The getInboundConnectionType() method returns an instance of
InboundConnectionType with an input name.

public InboundConnectionType getInboundConnectionType(String arg0)

throws MetadataException {

return adapterType.getInboundConnectionTypes()[0];

}

WBIDataDescriptionImpl samples:

WBIDataDescriptionImpl

represents the data description interface. This interface

maps business object definitions to Java

objects.

prepareChildSchemaFiles

The prepareChildSchemaFiles() method creates child objects when a parent object
cannot do so. If your adapter requires a separate and recursive creating of child
objects, then implement this method. Its should call recursively as shown:

prepareChildSchemaFiles();
prepareSchemaFiles();

public void prepareChildSchemaFiles() throws MetadataException {

WBIMetadataDiscoveryImpl.getLogUtils().trace(Level.FINER, CLASSNAME,

"prepareChildSchemaFiles",

"Entering Method");

MetadataObjectResponse response = getMetadataObject().getChildren(null);
WBIMetadataDiscoveryImpl.getLogUtils().trace(Level.FINER,

CLASSNAME, "prepareChildSchemaFiles",

"Number of BUSINESS OBJECTS: " + response.getObjectIterator().size());

for (Iterator i = response.getObjectIterator(); i.hasNext();) {

TwineBallMetadataObject bo = (TwineBallMetadataObject) i.next();
TwineBallDataDescription dataDesc = new TwineBallDataDescription();
dataDesc.setMetadataObject(bo);

dataDesc.setRelativePath(getRelativePath());

dataDesc.setName(getName().getNamespaceURI(), bo.getBOName());
WBIMetadataDiscoveryImpl.getLogUtils().trace(Level.FINER,

CLASSNAME,

"prepareChildSchemaFiles",
"Build Child Business Object : " + bo.getBOName());

if (bo.getType() == WBIMetadataObjectImpl.OBJECT)

WebSphere Adapter development overview

151