com.ibm.uddi.promoter
Class PromoterAPI
- java.lang.Object
com.ibm.uddi.promoter.PromoterAPI
- public class PromoterAPI
- extends java.lang.Object
- implements PromoterConstants
Export is the process of getting UDDI entities from a source registry, specified by a list of keys, and persisting them to a UDDI entity definition file, or EDF, which is in XML format.
Import is the process of reading an EDF and transforming UDDI entities represented in XML format to UDDI4J objects and loading these in a target registry, with the entity keys as specified in the EDF. Note the target registry must be a UDDI V3 IBM WebSpher UDDI Registry.
Promote is the single step process which combines the export and import steps, which can, but does not require, the writing of the EDF.
Find is the process of performing inquiry operation or operations on the source registry, and using the matching results to generate a list of UDDI entity keys. The list of keys can be used as input to the export, promote and delte functions.
Delete is the process of deleting UDDI entities from the target registry, as specified by a list of UDDI entity keys.
Usage of this class to perform these functions is typically to:
- Create a
Configuration
and populate it from aProperties
object or from a configuration properties file - Create a
PromoterAPI
passing theConfiguration
in the constructor - For keys based functions (export, delete and promote), set the keys by supplying a
UddiEntityKeys
, the location of a keys file, or, for one entity, by specifying an entity type and a key value - Invoke the corresponding method for the function required:
exportEntities
,promoteEntities(boolean)
,importEntities
,deleteEntities
orextractKeysFromInquiry(FindTModel, FindBusiness, FindService, FindBinding, FindRelatedBusinesses)
Field Summary
Constructor Summary
Constructor and Description |
---|
PromoterAPI(Configuration config)
Constructor taking a
Configuration .
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
deleteEntities()
Drives deletion of entities from the target registry.
|
|
exportEntities()
Drives the export of UDDI entities from the source registry.
|
|
extractKeysFromInquiry(FindTModel findTModel,FindBusiness findBusiness,FindService findService,FindBinding findBinding,FindRelatedBusinesses findRelatedBusiness)
Performs inquiry requests on the source registry and uses the results
to set the
UddiEntityKeys in PromoterAPI
that can be used by the exportEntities ,
promoteEntities and deleteEntities methods.
|
|
getConfiguration()
Returns the configuration.
|
|
importEntities()
Drives the import of UDDI entities to target registry, where the
source of UDDI entities is an entity definition file in XML format, according to the
UDDI Utility Tools schema,
promoter.xsd .
|
|
promoteEntities(boolean writeXML)
Drives the single step process of extracting UDDI entities
from the source registry and importing them to the target
registry.
|
|
setConfiguration(Configuration configuration)
Sets the configuration.
|
|
setUddiEntities(java.lang.String keysFilePath)
Reads the list of UDDI entity keys from the specified
file.
|
|
setUddiEntities(UddiEntityKeys entityKeys)
Sets the list of UDDI entity keys to be exported,
promoted or deleted.
|
|
setUddiEntity(java.lang.String entityType,java.lang.String entityKey)
Specifys a single UDDI entity to be exported, promoted
or deleted.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
PromoterAPI
- public PromoterAPI(Configuration config)
- throws PromoterConfigurationException
- PromoterIOException
config
- PromoterConfigurationException
PromoterIOException
Method Detail
setUddiEntities
- public void setUddiEntities(UddiEntityKeys entityKeys)
entityKeys
- setUddiEntities
- public void setUddiEntities(java.lang.String keysFilePath)
- throws PromoterIOException
keysFilePath
- PromoterIOException
setUddiEntity
- public void setUddiEntity(java.lang.String entityType,
- java.lang.String entityKey)
entityType
- Can be one of 'tModel', 'business', 'service' or 'binding'. entityKey
- getConfiguration
- public Configuration getConfiguration( )
setConfiguration
- public void setConfiguration(Configuration configuration)
configuration
- exportEntities
- public void exportEntities()
- throws PromoterException
The UDDI entities are persisted to an XML file, the entity definition file (EDF), which can be later used to import into a target UDDI registry.
The EDF is generated according to the UDDI Utility Tools schema, promoter.xsd
.
PromoterException
extractKeysFromInquiry
- public void extractKeysFromInquiry( FindTModel findTModel,
- FindBusiness findBusiness,
- FindService findService,
- FindBinding findBinding,
- FindRelatedBusinesses findRelatedBusiness)
- throws PromoterException
UddiEntityKeys
in PromoterAPI
that can be used by the exportEntities
,
promoteEntities
and deleteEntities
methods.
The five possible arguments are all UDDI4J find objects and are optional. To omit a find object just set the argument to null. For example, to invoke this method specifying only business and tModel search criteria, the invocation would be similar to:
promoterAPI.extractKeysFromInquiry(findTModel, findBusiness, null, null, null);
findTModel
- findBusiness
- findService
- findBinding
- findRelatedBusiness
- PromoterException
importEntities
- public void importEntities()
- throws PromoterException
promoter.xsd
.
PromoterException
promoteEntities
- public void promoteEntities(boolean writeXML)
- throws PromoterException
In this case, although an intermediate XML file may be written, it is not used for the import step.
writeXML
- true
will generate an intermediate EDF. PromoterException
deleteEntities
- public void deleteEntities()
- throws PromoterUDDI4JException
- PromoterTransportException
- PromoterConfigurationException
PromoterUDDI4JException
PromoterTransportException
PromoterConfigurationException
Configuration
.