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

  • 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 146
discovery and the one that used for run time. The copy is based on names. For
example, if a property name Username exists in the configuration used for
discovery and that used for run time, the Username value is copied.
public ServiceDescription createServiceDescription
(MetadataSelection importSelection) throws MetadataException {
ServiceDescription description = null;
WBIMetadataSelectionImpl selection = (WBIMetadataSelectionImpl)
importSelection;
MetadataImportConfiguration[] confArray = selection.getSelection();
if (confArray.length == 0)
return description;
super.getLogUtils().trace(Level.FINER,
CLASSNAME, "createServiceDescription()",
"Number of MetadataImportConfigurations " + confArray.length);
PropertyGroup serviceType = selection.getAppliedSelectionProperties();
String directionality = getDirectionality(serviceType);
String nameSpace = getNameSpace(serviceType);
boolean inbound = false;
if (directionality.equals("Inbound")) {
super.getLogUtils().trace(Level.FINER, CLASSNAME,
"createServiceDescription()",
"Selected Service Type is:Inbound");
inbound = true;
}
if (inbound) {
description = createInboundServiceDescription
(importSelection, selection, nameSpace);
} else {
description = createOutboundServiceDescription
(importSelection, selection, nameSpace);
}
return description;
}
setToolContext
To implement setToolContext(), initialize the LogUtils instance and set it on the
Foundation Class WBIMetadataDiscoveryImpl.
public void setToolContext(ToolContext toolContext) {
super.setToolContext(toolContext);
try {
LogUtils logUtils = new LogUtils(toolContext.getLogger(),
CURRENT_PACKAGE, "TwineBall Adapter", "6.0.0");
if(logUtils != null) logUtils.trace(Level.FINER, CLASSNAME,
"getToolContext()", "LogUtils Initilialized");
super.setLogUtils(logUtils);
} catch (ResourceAdapterInternalException e) {
e.printStackTrace();
System.out.println(e.getMessage());
System.out.println("Unable to create LogUtils instance");
}
}
WBIAdapterTypeImpl sample:
You use this class to implement the adapter type for enterprise metadata discovery.
Extend WBIAdapterTypeImpl and implement the methods described in the sections
below.
Constructor
The constructor populates the adapter type instance as shown below:
WebSphere Adapter development overview 141
Zobrazit stránku 146
1 2 ... 142 143 144 145 146 147 148 149 150 151 152 ... 225 226

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

Žádné komentáře