IBM WebSphere Adapters User Manual page 162

Version 6 release 2
Table of Contents

Advertisement

FunctionDescription[] funcArray =
new FunctionDescription[functionDescriptions.size()];
functionDescriptions.toArray(funcArray);
super.setFunctionDescriptions(funcArray);
}
WBIOutboundServiceDescriptionImpl samples:
WBIOutboundServiceDescriptionImpl represents the object that populates function
descriptions for outbound service descriptions.
Implement the method shown in the section below.
setFunctionDescriptions
The setFunctionDescriptions() method populates the function descriptions based
on objects and properties selected in MetadataSelection.
public void setFunctionDescriptions(MetadataSelection selection)
WBIMetadataDiscoveryImpl.getLogUtils().traceMethodEntrance
ArrayList functionDescriptions = new ArrayList();
MetadataImportConfiguration[] supportedObjects = selection.getSelection();
PropertyGroup selectionProperties =
((WBIMetadataSelectionImpl) selection).getAppliedSelectionProperties();
WBIMultiValuedPropertyImpl operationProperty =
(WBIMultiValuedPropertyImpl) selectionProperties.getProperty("Operations");
String[] supportedOperations = operationProperty.getValuesAsStrings();
traceFiner("supportedOperations=" + supportedOperations);
String location = TwineBallConfigurationProperties.getLocation(selectionProperties);
for (int i = 0; i < supportedObjects.length; i++) {
WBIMetadataImportConfigurationImpl importConfiguration =
(WBIMetadataImportConfigurationImpl) supportedObjects[i];
WBIOutboundFunctionDescriptionImpl outboundFunctionDescription;
WBIInteractionSpec interactionSpec;
TwineBallMetadataObject metadataObj = (TwineBallMetadataObject)
traceFiner("Object name is " + metadataObj.getBOName());
for (int j = 0; j < supportedOperations.length; j++) {
String operation = (String) supportedOperations[j];
traceFiner("generating function for the " + operation
+ " operation on " + metadataObj.getBOName());
outboundFunctionDescription = new WBIOutboundFunctionDescriptionImpl();
outboundFunctionDescription.setName(operation.toLowerCase()
TwineBallDataDescription dataDescription = new TwineBallDataDescription();
dataDescription.setMetadataObject(metadataObj);
dataDescription.setName(getNameSpace(), metadataObj.getDisplayName());
dataDescription.populateSchemaDefinitions();
dataDescription.setRelativePath(location);
outboundFunctionDescription.setInputDataDescription(dataDescription);
dataDescription.setName(getNameSpace() +
"/" + metadataObj.getBOName().toLowerCase() +
"bg", metadataObj.getBOName() + "BG");
traceFiner("type of input object" +
dataDescription.getName().getNamespaceURI() +
"\\" + dataDescription.getName().getLocalPart());
if (operation != WBIInteractionSpec.RETRIEVE_ALL_OP)
outboundFunctionDescription.setOutputDataDescription(dataDescription);
else {
dataDescription = new TwineBallDataDescription();
dataDescription.setName(getNameSpace(),
metadataObj.getDisplayName() + "Container");
156
WebSphere Adapters: WebSphere Adapter Toolkit User Guide
throws MetadataException {
(CLASSNAME,SETFUNCTIONDESCRIPTIONS);
importConfiguration.getMetadataObject();
+ metadataObj.getDisplayName());

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Websphere adapter toolkit

Table of Contents