Справочник Пользователя для IBM WebSphere Adapters
getChildList
The getChildList() method returns the Iterator for the child objects of the
DataDescription
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 .
objects and properties selected in MetadataSelection .
public void setFunctionDescriptions(MetadataSelection selection)
throws MetadataException {
MetadataImportConfiguration[] selectedObjects = selection.getSelection();
PropertyGroup selectionProperties =
PropertyGroup selectionProperties =
((WBIMetadataSelectionImpl) selection).getAppliedSelectionProperties();
WBIMultiValuedPropertyImpl operationsProperty =
(WBIMultiValuedPropertyImpl) selectionProperties.getProperty("Operations");
String[] operations = operationsProperty.getValuesAsStrings();
ArrayList functionDescriptions = new ArrayList();
String location = TwineBallConfigurationProperties.getLocation
ArrayList functionDescriptions = new ArrayList();
String location = TwineBallConfigurationProperties.getLocation
(selectionProperties);
// iterate through the objects.
for (int i = 0; i < selectedObjects.length; i++) {
for (int i = 0; i < selectedObjects.length; i++) {
WBIMetadataImportConfigurationImpl spec =
(WBIMetadataImportConfigurationImpl) selectedObjects[i];
WBIInboundFunctionDescriptionImpl functionDescription;
TwineBallMetadataObject metadataObj =
TwineBallMetadataObject metadataObj =
(TwineBallMetadataObject) spec.getMetadataObject();
for (int j = 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
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(),
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() + "/" +
dataDescription.setRelativePath(location);
dataDescription.setName(getNameSpace() + "/" +
metadataObj.getBOName().toLowerCase() +
"bg", metadataObj.getBOName() + "BG");
functionDescription.setInputDataDescription(dataDescription);
functionDescriptions.add(functionDescription);
functionDescriptions.add(functionDescription);
}
}
WebSphere Adapter development overview
155