IBM WebSphere Adapters Network Card User Manual


 
getChildList
The getChildList() method returns the Iterator for the child objects of the
DataDescription.
public Iterator getChildList() throws MetadataException
{
return (this.getMetadataObject().getChildren(null)).getObjectIterator();
}
WBIInboundServiceDescriptionImpl samples:
WBIInboundServiceDescriptionImpl represents the object that populates function
descriptions for inbound service descriptions.
Implement the method shown in the section below.
setFunctionDescriptions
The setFunctionDescriptions() method populates function descriptions based on
objects and properties selected in MetadataSelection .
public void setFunctionDescriptions(MetadataSelection selection)
throws MetadataException {
MetadataImportConfiguration[] selectedObjects = selection.getSelection();
PropertyGroup selectionProperties =
((WBIMetadataSelectionImpl) selection).getAppliedSelectionProperties();
WBIMultiValuedPropertyImpl operationsProperty =
(WBIMultiValuedPropertyImpl) selectionProperties.getProperty("Operations");
String[] operations = operationsProperty.getValuesAsStrings();
ArrayList functionDescriptions = new ArrayList();
String location = TwineBallConfigurationProperties.getLocation
(selectionProperties);
// iterate through the objects.
for(inti=0;i<selectedObjects.length; i++) {
WBIMetadataImportConfigurationImpl spec =
(WBIMetadataImportConfigurationImpl) selectedObjects[i];
WBIInboundFunctionDescriptionImpl functionDescription;
TwineBallMetadataObject metadataObj =
(TwineBallMetadataObject) spec.getMetadataObject();
for(intj=0;j<operations.length; j++) {
String operation = operations[j];
functionDescription = new WBIInboundFunctionDescriptionImpl();
char firstCharacter = operation.charAt(0);
//convention for displaying the outbound function.
functionDescription.setName
("emit" + Character.toUpperCase(firstCharacter) +
operation.substring(1).toLowerCase() + "AfterImage" +
StringCaseChanger.toCamelCase(metadataObj.getDisplayName()));
functionDescription.setEISFunctionName(functionDescription.getName());
functionDescription.setImportConfiguration(spec);
TwineBallDataDescription dataDescription = new TwineBallDataDescription();
dataDescription.setMetadataObject(metadataObj);
dataDescription.setName(getNameSpace(),
StringCaseChanger.toCamelCase(metadataObj.getDisplayName()));
dataDescription.populateSchemaDefinitions();
dataDescription.setRelativePath(location);
dataDescription.setName(getNameSpace() + "/" +
metadataObj.getBOName().toLowerCase() +
"bg", metadataObj.getBOName() + "BG");
functionDescription.setInputDataDescription(dataDescription);
functionDescriptions.add(functionDescription);
}
}
WebSphere Adapter development overview 155