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:
Configuration
and populate it from a Properties
object
or from a configuration properties file
PromoterAPI
passing the Configuration
in the constructor
UddiEntityKeys
, the location of a keys file, or, for one entity, by specifying an
entity type and a key value
exportEntities
, promoteEntities(boolean)
,
importEntities
, deleteEntities
or extractKeysFromInquiry(FindTModel,
FindBusiness, FindService, FindBinding, FindRelatedBusinesses)
BAD_ENTITY_MSG, CLASSPATH, CLP_FULLY_QUALIFIED_CLASSNAME, COMPLETED_OK, COMPLETED_WITH_ERRORS, CONFIGURATION_FILE_NAME, DATE_MASK, DB_DRIVER, DB_PASSWORD, DB_URL, DB_USERID, DEBUG_PREFIX, DEFINITION_FILE_ENCODING, DELETE_BINDING, DELETE_BUSINESS, DELETE_END, DELETE_SERVICE, DELETE_START, DELETE_TMODEL, DELIMITER_WITH_SPACE, DESERIALIZATION_END, DESERIALIZATION_START, ELEMENT_BINDING, ELEMENT_BUSINESS, ELEMENT_SERVICE, ELEMENT_TMODEL, ENTITY_BINDING, ENTITY_BUSINESS, ENTITY_DELIMITER, ENTITY_SERVICE, ENTITY_TMODEL, ENTRY_PREFIX, ERR_ARG_ALREADY_SPECIFIED, ERR_ARG_NOT_RECOGNISED, ERR_AUTO_COMMIT_OFF, ERR_BAD_ENTITY, ERR_BOOLEAN_PROPERTY, ERR_CANNOT_CONNECT_URL, ERR_CANNOT_WRITE_RESULTS, ERR_COMMIT_FAILED, ERR_CYCLE_IN_REF_TMODELS, ERR_DB_CONN_CLOSE, ERR_DB_CONN_FAILED, ERR_DB_DRIVER_LOAD_FAILED, ERR_DEFINITION_FILE_IOEXCEPTION, ERR_DEFINITION_FILE_NOT_FOUND, ERR_DEFINITION_FILE_READ_ERROR, ERR_DELETE_BINDING_FAILED, ERR_DELETE_BUSINESS_FAILED, ERR_DELETE_SERVICE_FAILED, ERR_DELETE_TMODEL_FAILED, ERR_DISCOVER_PUBLISHER_FAILED, ERR_ERROR_OCCURRED, ERR_EXCEPTION, ERR_FIND_BINDINGS_FAILED, ERR_FIND_BUSINESSES_FAILED, ERR_FIND_RELATED_BUSINESSES_FAILED, ERR_FIND_SERVICES_FAILED, ERR_FIND_TMODELS_FAILED, ERR_GET_AUTHINFO_FAILED, ERR_GET_BINDING_FAILED, ERR_GET_BUSINESS_FAILED, ERR_GET_SERVICE_FAILED, ERR_GET_TMODEL_FAILED, ERR_IMPORT_MISSING_DEF_FILE, ERR_INIT_PREPSTMT_FAILED, ERR_INQUIRYURL_MALFORMED, ERR_INTEGER_PROPERTY, ERR_INVALID_ENTITY, ERR_INVALID_FUNCTION, ERR_INVALID_KEY, ERR_JAVA_IO_ERROR, ERR_JSSEPROVIDER_NOT_ACCESSED, ERR_JSSEPROVIDER_NOT_FOUND, ERR_JSSEPROVIDER_NOT_INSTANTIATED, ERR_KEY_SPECIFIED, ERR_KEYFILE_IOEXCEPTION, ERR_KEYFILE_NOT_FOUND, ERR_KEYFILE_SPECIFIED, ERR_LOGGER_FILE_NOT_FOUND, ERR_MESSAGES_FILE_CLOSE, ERR_MISSING_FUNCTION, ERR_MISSING_NODEID, ERR_MISSING_PROPERTY, ERR_MISSING_VALUE, ERR_NO_KEYS, ERR_NO_PROPERTIES_FILE, ERR_ORPHANED_BINDING_STUB, ERR_ORPHANED_BUSINESS_STUB, ERR_ORPHANED_SERVICE_STUB, ERR_ORPHANED_TMODEL_STUB, ERR_OVERWRITE_BINDING, ERR_OVERWRITE_BUSINESS, ERR_OVERWRITE_SERVICE, ERR_OVERWRITE_TMODEL, ERR_PROMOTE_FAILED, ERR_PROPERTIES_FILE_IO, ERR_PROPERTIES_IOEXCEPTION, ERR_PUBLISHURL_MALFORMED, ERR_REPEATED_FUNCTION, ERR_ROLLBACK_FAILED, ERR_SAVE_BINDING_FAILED, ERR_SAVE_BINDING_NO_PARENT, ERR_SAVE_BUSINESS_FAILED, ERR_SAVE_SERVICE_FAILED, ERR_SAVE_SERVICE_NO_PARENT, ERR_SAVE_TMODEL_FAILED, ERR_SQL_EXCEPTION, ERR_STUB_BINDING_CREATE, ERR_STUB_BINDING_DELETE, ERR_STUB_BINDING_ERROR, ERR_STUB_BUSINESS_CREATE, ERR_STUB_BUSINESS_DELETE, ERR_STUB_CREATE_FAILED, ERR_STUB_SERVICE_CREATE, ERR_STUB_SERVICE_DELETE, ERR_STUB_SERVICE_ERROR, ERR_STUB_TMODEL_CREATE, ERR_STUB_TMODEL_DELETE, ERR_STUB_UNDO_FAILED, ERR_TRACE_FILE_CLOSE, ERR_TRANSPORT_EXCEPTION, ERR_UNEXPECTED_EXCEPTION, ERR_XML_DOC_CREATE_FAILED, ERR_XML_DOC_PARSE_FAILED, ERR_XML_PARSE_ERRORS, ERR_XML_PARSE_WARNINGS, EXIT_PREFIX, EXPORT_BINDING, EXPORT_BUSINESS, EXPORT_END, EXPORT_FIND_END, EXPORT_FIND_START, EXPORT_REFED_TMODEL, EXPORT_SERVICE, EXPORT_START, EXPORT_TMODEL, FROM_GET_URL, FROM_INQUIRY_URL, IMPORT_BINDING, IMPORT_BUSINESS, IMPORT_END, IMPORT_REFED_TMODEL, IMPORT_REFERENCED_ENTITIES, IMPORT_SERVICE, IMPORT_START, IMPORT_TMODEL, JAVA_COMMAND, JSSE_PROVIDER, MESSAGE_CREATED_BINDING_STUB, MESSAGE_CREATED_BUSINESS_STUB, MESSAGE_CREATED_SERVICE_STUB, MESSAGE_CREATED_TMODEL_STUB, MESSAGE_DELETED_BINDING_STUB, MESSAGE_DELETED_BUSINESS_STUB, MESSAGE_DELETED_SERVICE_STUB, MESSAGE_DELETED_TMODEL_STUB, MESSAGE_DETAIL, MESSAGE_IMPORT_END, MESSAGE_LOG_FILENAME, MESSAGE_NORMAL, messages, MESSAGES_FILE, NAMESPACE_DEFAULT, NAMESPACE_PREFIX, NAMESPACE_PROMOTER, NAMESPACE_UDDI, NAMESPACE_UDDI_PREFIX, NAMESPACE_XML, NORMAL_PREFIX, OVERWRITE, PROMOTER_ROOT_NAME, PROMOTING_ENTITY, PROPERTIES_HEADER, RESULTS_FILE_NAME, SCHEMA_FILE_PROMOTER, SCHEMA_FILE_UDDI, SCHEMA_FILE_XML, SECTION_BINDINGS, SECTION_BUSINESSES, SECTION_REFD_TMODELS, SECTION_SERVICES, SECTION_TMODELS, SECURE_CONNECTION, SERIALIZATION_END, SERIALIZATION_START, SOURCE_REGISTRY, STARTING_TOOL_BANNER, SUCCESSFUL, SYS_ID_NAME, SYS_PASSWORD_NAME, SYS_PROTOCOL_NAME, SYS_PROTOCOL_VALUE, SYS_TRANSPORT_NAME, SYS_TRANSPORT_VALUE, SYS_TRUST_STORE_NAME, SYS_TRUST_STORE_PASSWORD_NAME, TARGET_REGISTRY, TEMP_BUSINESS, TO_INQUIRY_URL, TO_PUBLISH_URL, TOOL_START, TRACE_DEBUG, TRACE_DETAIL, TRACE_LEVEL, TRACE_LOG_FILENAME, TRACE_NORMAL, TRACE_SEVERE, TRC_BINDING_NOT_IN_DEST, TRC_BUSINESS_NOT_IN_DEST, TRC_CREATED_BINDING, TRC_CREATED_BUSINESS_STUB, TRC_CREATED_SERVICE_STUB, TRC_CREATED_TMODEL_STUB, TRC_CREATING_BINDING, TRC_CREATING_BUSINESS_STUB, TRC_CREATING_SERVICE_STUB, TRC_CREATING_TMODEL_STUB, TRC_GET_BINDING, TRC_GET_BUSINESS, TRC_GET_SERVICE, TRC_GET_TMODEL, TRC_GOT_BINDING, TRC_GOT_BUSINESS, TRC_GOT_SERVICE, TRC_GOT_TMODEL, TRC_OVERWRITE_ON, TRC_PROMOTED_BINDING, TRC_PROMOTED_BUSINESS, TRC_PROMOTED_SERVICE, TRC_PROMOTED_TMODEL, TRC_PROMOTING_BINDING, TRC_PROMOTING_BUSINESS, TRC_PROMOTING_SERVICE, TRC_PROMOTING_TMODEL, TRC_REMOVING_DISCOS, TRC_SAVED_BINDING, TRC_SAVED_BUSINESS, TRC_SAVED_SERVICE, TRC_SAVED_TMODEL, TRC_SAVING_BINDING, TRC_SAVING_BUSINESS, TRC_SAVING_SERVICE, TRC_SAVING_TMODEL, TRC_SERVICE_NOT_IN_DEST, TRC_TMODEL_NOT_IN_DEST, TRUST_STORE_FILENAME, TRUST_STORE_PASSWORD, UDDI_ENTITY_DEFINITION_FILE, UDDI_PASSWORD, UDDI_USERID, VERBOSE, XML_FEATURE_NAMESPACES, XML_FEATURE_VALIDATION, XML_FEATURE_VALIDATION_SCHEMA, XML_PARSER_ERROR_PREFIX, XML_PARSER_FEATURE_UNREC, XML_PARSER_FEATURE_UNSUP, XML_PARSER_PROPERTY_UNREC, XML_PARSER_PROPERTY_UNSUP, XML_PARSER_WARNING_PREFIX, XML_PROPERTY_SCHEMA_LOCATION
ARG_BINDING, ARG_BUSINESS, ARG_DEFINITION_FILE, ARG_DELETE, ARG_EXPORT, ARG_IMPORT, ARG_IMPORT_REFERENCED_ENTITIES, ARG_INPUT_KEYFILE, ARG_INPUT_KEYFILE_OLD, ARG_OVERWRITE, ARG_OVERWRITE_OLD, ARG_PROMOTE, ARG_PROPERTIES_FILE, ARG_SERVICE, ARG_TMODEL, ARG_VERBOSE, ARG_VERBOSE_OLD, USAGE
Constructor and Description |
---|
PromoterAPI(com.ibm.uddi.promoter.config.Configuration config)
Constructor taking a
Configuration . |
Modifier and Type | Method and Description |
---|---|
void |
deleteEntities()
Drives deletion of entities from the target registry.
|
void |
exportEntities()
Drives the export of UDDI entities from the source registry.
|
void |
extractKeysFromInquiry(org.uddi4j.request.FindTModel findTModel,
org.uddi4j.request.FindBusiness findBusiness,
org.uddi4j.request.FindService findService,
org.uddi4j.request.FindBinding findBinding,
org.uddi4j.request.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. |
com.ibm.uddi.promoter.config.Configuration |
getConfiguration()
Returns the configuration.
|
void |
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 . |
void |
promoteEntities(boolean writeXML)
Drives the single step process of extracting UDDI entities
from the source registry and importing them to the target
registry.
|
void |
setConfiguration(com.ibm.uddi.promoter.config.Configuration configuration)
Sets the configuration.
|
void |
setUddiEntities(java.lang.String keysFilePath)
Reads the list of UDDI entity keys from the specified
file.
|
void |
setUddiEntities(UddiEntityKeys entityKeys)
Sets the list of UDDI entity keys to be exported,
promoted or deleted.
|
void |
setUddiEntity(java.lang.String entityType,
java.lang.String entityKey)
Specifys a single UDDI entity to be exported, promoted
or deleted.
|
public PromoterAPI(com.ibm.uddi.promoter.config.Configuration config) throws com.ibm.uddi.promoter.exception.PromoterConfigurationException, com.ibm.uddi.promoter.exception.PromoterIOException
Configuration
.
config
- com.ibm.uddi.promoter.exception.PromoterConfigurationException
com.ibm.uddi.promoter.exception.PromoterIOException
public void setUddiEntities(UddiEntityKeys entityKeys)
entityKeys
- public void setUddiEntities(java.lang.String keysFilePath) throws com.ibm.uddi.promoter.exception.PromoterIOException
keysFilePath
- com.ibm.uddi.promoter.exception.PromoterIOException
public void setUddiEntity(java.lang.String entityType, java.lang.String entityKey)
entityType
- Can be one of 'tModel', 'business', 'service' or 'binding'.entityKey
- public com.ibm.uddi.promoter.config.Configuration getConfiguration()
public void setConfiguration(com.ibm.uddi.promoter.config.Configuration configuration)
configuration
- public void exportEntities() throws com.ibm.uddi.promoter.exception.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
.
com.ibm.uddi.promoter.exception.PromoterException
public void extractKeysFromInquiry(org.uddi4j.request.FindTModel findTModel, org.uddi4j.request.FindBusiness findBusiness, org.uddi4j.request.FindService findService, org.uddi4j.request.FindBinding findBinding, org.uddi4j.request.FindRelatedBusinesses findRelatedBusiness) throws com.ibm.uddi.promoter.exception.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
- com.ibm.uddi.promoter.exception.PromoterException
public void importEntities() throws com.ibm.uddi.promoter.exception.PromoterException
promoter.xsd
.
com.ibm.uddi.promoter.exception.PromoterException
public void promoteEntities(boolean writeXML) throws com.ibm.uddi.promoter.exception.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.com.ibm.uddi.promoter.exception.PromoterException
public void deleteEntities() throws com.ibm.uddi.promoter.exception.PromoterUDDI4JException, com.ibm.uddi.promoter.exception.PromoterTransportException, com.ibm.uddi.promoter.exception.PromoterConfigurationException
com.ibm.uddi.promoter.exception.PromoterUDDI4JException
com.ibm.uddi.promoter.exception.PromoterTransportException
com.ibm.uddi.promoter.exception.PromoterConfigurationException