Ibm WebSphere Adapters Uživatelský manuál Strana 161

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 226
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 160
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() +
"/jointfilesconvert/1251402/bg", metadataObj.getBOName() + "BG");
functionDescription.setInputDataDescription(dataDescription);
functionDescriptions.add(functionDescription);
}
}
WebSphere Adapter development overview 155
Zobrazit stránku 160
1 2 ... 156 157 158 159 160 161 162 163 164 165 166 ... 225 226

Komentáře k této Příručce

Žádné komentáře