IBM WebSphere Adapters Network Card User Manual


 
(Constants.SERVICETYPE));
propertyGroup.addProperty(typeProp);
WBISingleValuedPropertyImpl nameSpaceProp =
new WBISingleValuedPropertyImpl
(Constants.NAMESPACE, String.class);
nameSpaceProp.setDefaultValue(Constants.TB_DEFAULT_NAMESPACE);
propertyGroup.addProperty(nameSpaceProp);
nameSpaceProp.setDisplayName
(WBIMetadataDiscoveryImpl.getPropertyName
(Constants.NAMESPACE));
nameSpaceProp.setDescription
(WBIMetadataDiscoveryImpl.getPropertyDescription
(Constants.NAMESPACE));
ServiceTypeSingleProperty operationProp =
new ServiceTypeSingleProperty
(Constants.OPERATIONS, String.class);
String[] operations = TwineBallOperations.getOutboundOperations();
operationProp.setValidValues(operations);
operationProp.setDisplayName
(WBIMetadataDiscoveryImpl.getPropertyName
(Constants.OPERATIONS));
operationProp.setDescription
(WBIMetadataDiscoveryImpl.getPropertyDescription
(Constants.OPERATIONS));
propertyGroup.addProperty(operationProp);
} catch (MetadataException e) {
throw new RuntimeException(e);
}
return propertyGroup;
}
getMetadataObject
The getMetadataObject() method returns an instance of MetadataObject for a
specific location. Each MetadataObject instance that is added to the MetadataTree
should have a unique location such that when the tool calls this method, the
enterprise metadata discovery implementation can find the corresponding
MetadataObject and return it.
Tip: A sample implementation might usefully maintain a HashTable in
MetadataTree and add the location and corresponding MetadataObject to it
whenever a new instance of MetadataObject is added. Then this method could
return an object corresponding to the key value from Hashtable
.
public MetadataObject getMetadataObject(String objectLocationID) {
return (MetadataObject) treeNodes.get(objectLocationID);
}
listMetadataObjects
The listMetadataObjects() method returns an instance of
WBIMetadataObjectResponseImpl. The instance should be populated with
MetadataObjects using method setObjects(). The logic should use filter
properties, if supported by the implementation. Any metadataObjects that can be
selected for import should be set as true with the setIsSelectableForImport()
method.
public MetadataObjectResponse listMetadataObjects(PropertyGroup filterParameters)
throws MetadataException {
WBIMetadataObjectResponseImpl response = new WBIMetadataObjectResponseImpl();
148 WebSphere Adapters: WebSphere Adapter Toolkit User Guide