com.ibm.uddi.promoter.config
Class Configuration

java.lang.Object
  |
  +--com.ibm.uddi.promoter.config.Configuration
All Implemented Interfaces:
CommandLineConstants, PromoterConstants

public class Configuration
extends java.lang.Object
implements PromoterConstants

Represents the configuration for UDDI Utility Tools.

Contains instance of configuration objects for each function.

Author:
IBM

Field Summary
static java.lang.String java_copyright
           
 
Fields inherited from interface com.ibm.uddi.promoter.PromoterConstants
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_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_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_STUB_BINDING, ERR_STUB_BUSINESS, ERR_STUB_CREATE_FAILED, ERR_STUB_SERVICE, ERR_STUB_TMODEL, 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, 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_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
 
Fields inherited from interface com.ibm.uddi.promoter.CommandLineConstants
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 Summary
Configuration(java.util.Properties properties)
          Constructor taking a Properties.
Configuration(java.lang.String propertiesFileName)
          Constructor taking a properties file path.
 
Method Summary
 DatabaseConfiguration getDatabaseConfiguration()
          Returns an object containing all the database specific configuration data.
 java.lang.String getDbDriver()
          Returns database driver class name.
 java.lang.String getDbPasswd()
          Returns database password.
 java.lang.String getDbUrl()
          Returns database URL.
 java.lang.String getDbUser()
          Returns database userid.
 ExportConfiguration getExportConfiguration()
          Returns an object containing all the export specific configuration data.
 java.lang.String getFromGetURL()
          Returns URL to source UDDI registry get service.
 java.lang.String getFromInquiryURL()
          Returns URL to source UDDI registry inquiry service.
 ImportConfiguration getImportConfiguration()
          Returns an object containing all the import specific configuration data.
 LoggerConfiguration getLoggerConfiguration()
          Returns configuration object for the PromoterLogger.
 java.lang.String getMessageLogFileName()
          Returns the message log file name.
 java.io.PrintStream getMessageStream()
          Returns the messages stream.
 java.lang.String getNamespacePrefix()
          Returns the namespace prefix used in the generation of the entity definition file.
 java.lang.String getPassword()
          Returns target registry access password.
 PublishConfiguration getPublishConfiguration()
          Returns an object containing all the publish specific configuration data.
 java.lang.String getToInquiryURL()
          Returns URL to target UDDI registry inquiry service.
 java.lang.String getToPublishURL()
          Returns URL to target UDDI registry publish service.
 int getTraceLevel()
          Returns the trace detail level.
 java.lang.String getTraceLogFileName()
          Returns the trace log file name.
 TransformConfiguration getTransformConfiguration()
          Returns the configuration for serialization and deserialization functions.
 java.lang.String getTrustStoreFilename()
          Returns the trust store file name.
 java.lang.String getTrustStorePassword()
          Returns the trust store password.
 java.lang.String getUddiEntityDefinitionFile()
          Returns the entity definition file path and name.
 java.lang.String getUserID()
          Returns target registry access userid.
 boolean isImportReferencedEntities()
          Returns the indicator for importing referenced entities.
 boolean isOverwrite()
          Returns the overwrite property.
 boolean isSecureConnection()
          Returns the secure connection indicator.
 boolean isVerbose()
          Returns the verbose setting for message detail.
 void setDbDriver(java.lang.String driverClassName)
          Sets database driver class name.
 void setDbPasswd(java.lang.String password)
          Sets database password.
 void setDbUrl(java.lang.String dbUrl)
          Sets database URL.
 void setDbUser(java.lang.String dbUser)
          Sets database userid.
 void setFromGetURL(java.lang.String fromGetURL)
          Sets URL to source UDDI registry get service.
 void setFromInquiryURL(java.lang.String fromInquiryURL)
          Sets URL to source UDDI registry inquiry service.
 void setImportReferencedEntities(boolean importReferencedEntities)
          Sets the indicator for importing referenced entities.
 void setMessageLogFileName(java.lang.String messageLogFileName)
          Sets the messages log file name.
 void setMessageStream(java.io.PrintStream messageStream)
          Sets the messages stream.
 void setNamespacePrefix(java.lang.String namespacePrefix)
          Sets the namespace prefix used in the generation of the entity definition file.
 void setOverwrite(boolean overwrite)
          Set the overwrite property.
 void setPassword(java.lang.String password)
          Sets target registry access password.
 void setSecureConnection(boolean secureConnection)
          Sets the secure connection indicator.
 void setToInquiryURL(java.lang.String toInquiryURL)
          Sets URL to target UDDI registry inquiry service.
 void setToPublishURL(java.lang.String toPublishURL)
          Sets URL to target UDDI registry publish service.
 void setTraceLevel(int traceLevel)
          Sets the trace detail level.
 void setTraceLogFileName(java.lang.String traceLogFileName)
          Sets the trace log file name.
 void setTrustStoreFilename(java.lang.String trustStoreFilename)
          Sets the trust store file name.
 void setTrustStorePassword(java.lang.String trustStorePassword)
          Sets the trust store password.
 void setUddiEntityDefinitionFile(java.lang.String uddiEntityDefinitionFile)
          Sets the entity definition file path and name.
 void setUserID(java.lang.String userID)
          Sets target registry access userid.
 void setVerbose(boolean verbose)
          Sets the verbose setting for message detail.
 java.lang.String toString()
          Returns the result of invoking toString method on all the contained configuration objects.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

java_copyright

public static final java.lang.String java_copyright
Constructor Detail

Configuration

public Configuration(java.lang.String propertiesFileName)
              throws PromoterException
Constructor taking a properties file path.

The contents of the properties file is used to populate all its fields.

Parameters:
propertiesFileName -  
Throws:
PromoterException -  

Configuration

public Configuration(java.util.Properties properties)
              throws java.lang.Exception,
                     java.io.IOException
Constructor taking a Properties.

The contents of the Properties is used to populate all its fields.

Parameters:
properties -  
Throws:
java.lang.Exception -  
java.io.IOException -  
Method Detail

getDatabaseConfiguration

public DatabaseConfiguration getDatabaseConfiguration()
Returns an object containing all the database specific configuration data.

Returns:
DatabaseConfiguration

getPublishConfiguration

public PublishConfiguration getPublishConfiguration()
Returns an object containing all the publish specific configuration data.

Returns:
PublishConfiguration

getImportConfiguration

public ImportConfiguration getImportConfiguration()
Returns an object containing all the import specific configuration data.

Always returns non-null object.

Returns:
ImportConfiguration

getExportConfiguration

public ExportConfiguration getExportConfiguration()
Returns an object containing all the export specific configuration data.

Returns:
ExportConfiguration

setDbUrl

public void setDbUrl(java.lang.String dbUrl)
Sets database URL.

Parameters:
dbUrl -  

setDbPasswd

public void setDbPasswd(java.lang.String password)
Sets database password.

Parameters:
password -  

setDbDriver

public void setDbDriver(java.lang.String driverClassName)
Sets database driver class name.

Parameters:
driverClassName -  

setDbUser

public void setDbUser(java.lang.String dbUser)
Sets database userid.

Parameters:
dbUser -  

getDbUrl

public java.lang.String getDbUrl()
Returns database URL.

Returns:
String

getDbPasswd

public java.lang.String getDbPasswd()
Returns database password.

Returns:
String

getDbDriver

public java.lang.String getDbDriver()
Returns database driver class name.

Returns:
String

getDbUser

public java.lang.String getDbUser()
Returns database userid.

Returns:
String

setFromGetURL

public void setFromGetURL(java.lang.String fromGetURL)
Sets URL to source UDDI registry get service.

Parameters:
fromGetURL -  

setFromInquiryURL

public void setFromInquiryURL(java.lang.String fromInquiryURL)
Sets URL to source UDDI registry inquiry service.

Parameters:
fromInquiryURL -  

getFromInquiryURL

public java.lang.String getFromInquiryURL()
Returns URL to source UDDI registry inquiry service.

Returns:
String

getFromGetURL

public java.lang.String getFromGetURL()
Returns URL to source UDDI registry get service.

Returns:
String

setToInquiryURL

public void setToInquiryURL(java.lang.String toInquiryURL)
Sets URL to target UDDI registry inquiry service.

Parameters:
toInquiryURL -  

setToPublishURL

public void setToPublishURL(java.lang.String toPublishURL)
Sets URL to target UDDI registry publish service.

Parameters:
toPublishURL -  

setUserID

public void setUserID(java.lang.String userID)
Sets target registry access userid.

Parameters:
userID -  

setPassword

public void setPassword(java.lang.String password)
Sets target registry access password.

Parameters:
password -  

getToInquiryURL

public java.lang.String getToInquiryURL()
Returns URL to target UDDI registry inquiry service.

Returns:
String

getToPublishURL

public java.lang.String getToPublishURL()
Returns URL to target UDDI registry publish service.

Returns:
String

getUserID

public java.lang.String getUserID()
Returns target registry access userid.

Returns:
String

getPassword

public java.lang.String getPassword()
Returns target registry access password.

Returns:
String

isSecureConnection

public boolean isSecureConnection()
Returns the secure connection indicator.

Returns:
boolean true if a security provider is active.

getTrustStoreFilename

public java.lang.String getTrustStoreFilename()
Returns the trust store file name.

Returns:
String

getTrustStorePassword

public java.lang.String getTrustStorePassword()
Returns the trust store password.

Returns:
String

setSecureConnection

public void setSecureConnection(boolean secureConnection)
Sets the secure connection indicator.

Parameters:
secureConnection - true if a security provider is active.

setTrustStoreFilename

public void setTrustStoreFilename(java.lang.String trustStoreFilename)
Sets the trust store file name.

Parameters:
trustStoreFilename -  

setTrustStorePassword

public void setTrustStorePassword(java.lang.String trustStorePassword)
Sets the trust store password.

Parameters:
trustStorePassword -  

setImportReferencedEntities

public void setImportReferencedEntities(boolean importReferencedEntities)
Sets the indicator for importing referenced entities.

Parameters:
importReferencedEntities - true if referenced entities are to be imported first, false if not to be imported at all.

isImportReferencedEntities

public boolean isImportReferencedEntities()
Returns the indicator for importing referenced entities.

Returns:
boolean true if referenced entities are to be imported first, false if not to be imported at all.

setOverwrite

public void setOverwrite(boolean overwrite)
Set the overwrite property.

Parameters:
overwrite - true if existing entities are to be overwritten during import function.

isOverwrite

public boolean isOverwrite()
Returns the overwrite property.

Returns:
boolean true if existing entities are to be overwritten during import function.

getUddiEntityDefinitionFile

public java.lang.String getUddiEntityDefinitionFile()
Returns the entity definition file path and name.

Returns:
String

setUddiEntityDefinitionFile

public void setUddiEntityDefinitionFile(java.lang.String uddiEntityDefinitionFile)
Sets the entity definition file path and name.

Parameters:
uddiEntityDefinitionFile -  

getNamespacePrefix

public java.lang.String getNamespacePrefix()
Returns the namespace prefix used in the generation of the entity definition file.

Returns:
String

setNamespacePrefix

public void setNamespacePrefix(java.lang.String namespacePrefix)
Sets the namespace prefix used in the generation of the entity definition file.

Parameters:
namespacePrefix -  

getTransformConfiguration

public TransformConfiguration getTransformConfiguration()
Returns the configuration for serialization and deserialization functions.

Returns:
TransformConfiguration

getLoggerConfiguration

public LoggerConfiguration getLoggerConfiguration()
Returns configuration object for the PromoterLogger.

Returns:
LoggerConfiguration

getMessageStream

public java.io.PrintStream getMessageStream()
Returns the messages stream.

Returns:
PrintStream

setMessageStream

public void setMessageStream(java.io.PrintStream messageStream)
Sets the messages stream.

Parameters:
messageStream -  

getMessageLogFileName

public java.lang.String getMessageLogFileName()
Returns the message log file name.

Returns:
String

getTraceLogFileName

public java.lang.String getTraceLogFileName()
Returns the trace log file name.

Returns:
String

setMessageLogFileName

public void setMessageLogFileName(java.lang.String messageLogFileName)
Sets the messages log file name.

Parameters:
messageLogFileName -  

setTraceLogFileName

public void setTraceLogFileName(java.lang.String traceLogFileName)
Sets the trace log file name.

Parameters:
traceLogFileName -  

getTraceLevel

public int getTraceLevel()
Returns the trace detail level.

Returns:
int 1 is lowest detail, 3 is highest.

setTraceLevel

public void setTraceLevel(int traceLevel)
Sets the trace detail level.

Parameters:
traceLevel - 1 is lowest detail, 3 is highest.

isVerbose

public boolean isVerbose()
Returns the verbose setting for message detail.

Returns:
boolean true if detailed message output is activated.

setVerbose

public void setVerbose(boolean verbose)
Sets the verbose setting for message detail.

This affects the messages stream detail level.

Parameters:
verbose -  

toString

public java.lang.String toString()
Returns the result of invoking toString method on all the contained configuration objects.

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()