org.productivity.java.habitat4j
Class Habitat4JBootstrap

java.lang.Object
  extended by org.productivity.java.habitat4j.Habitat4JBootstrap
All Implemented Interfaces:
Habitat4JConstants

public class Habitat4JBootstrap
extends java.lang.Object
implements Habitat4JConstants

Habitat4JBootstrap provides several static methods for initializing, or "bootstrapping," your application for using Habitat4J.

This class imposes a standard for defining locations of PropertyList XML files, and also a standard for naming of the files.

## LICENSE INFORMATION ##

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Version:
$Id: Habitat4JBootstrap.html,v 1.2 2008/11/24 15:15:21 cvs Exp $
Author:
Justin Yunke <habitat4j@productivity.org>

Field Summary
static java.lang.String BOOTSTRAP_PARAM_APPLICATION_NAME
           
static java.lang.String BOOTSTRAP_PARAM_APPLICATION_PROPERTY_LIST_LOADER_CLASS
           
static java.lang.String BOOTSTRAP_PARAM_BOOTSTRAP_PROPERTIES_PATH
           
static java.lang.String BOOTSTRAP_PARAM_LOG_LEVEL
           
static java.lang.String BOOTSTRAP_PARAM_LOG4J_ENABLED
           
static java.lang.String BOOTSTRAP_PARAM_SERVER_IDENTITY_FILE_PATH
           
static java.lang.String BOOTSTRAP_PARAM_SERVER_IDENTITY_MODE
           
static java.lang.String BOOTSTRAP_PARAM_XSD_VALIDATION_ENABLED
           
protected static java.lang.Class DEFAULT_APPLICATION_PROPERTY_LIST_LOADER
           
protected static java.lang.String DEFAULT_BOOTSTRAP_PROPERTY_LIST_FILENAME
           
protected static java.lang.String[][] defaultBootstrapParamNameArray
           
protected static Habitat4JLogger logger
           
 
Fields inherited from interface org.productivity.java.habitat4j.common.Habitat4JConstants
EOL_SEQUENCE, HABITAT4J_APPNAME_ATTRIBUTE_NAME, HABITAT4J_APPNAME_DEFAULT, HABITAT4J_CONTEXT_APPLICATION_NAME, HABITAT4J_CONTEXT_ENVIRONMENT, HABITAT4J_CONTEXT_INSTANCE_DESCRIPTION, HABITAT4J_CONTEXT_INSTANCE_ENUMERATION, HABITAT4J_CONTEXT_INSTANCE_NAME, HABITAT4J_CONTEXT_INSTANCE_OS, HABITAT4J_CONTEXT_LEGAL_ROLE_NAMES, HABITAT4J_CONTEXT_PREFIX, HABITAT4J_CONTEXT_ROLE_NAME, HABITAT4J_CONTEXT_ROLE_PATCH_LEVEL, HABITAT4J_CONTEXT_ROLE_PRODUCT, HABITAT4J_CONTEXT_ROLE_TYPE, HABITAT4J_CONTEXT_ROLE_VENDOR, HABITAT4J_CONTEXT_ROLE_VERSION, HABITAT4J_DEFINITIONS_PACKAGE, HABITAT4J_GENERIC_VALUE_DEFAULT, HABITAT4J_GENERIC_VALUE_EMPTY_STRING, HABITAT4J_GENERIC_VALUE_FALSE, HABITAT4J_GENERIC_VALUE_NO, HABITAT4J_GENERIC_VALUE_OFF, HABITAT4J_GENERIC_VALUE_ON, HABITAT4J_GENERIC_VALUE_ONE, HABITAT4J_GENERIC_VALUE_TRUE, HABITAT4J_GENERIC_VALUE_YES, HABITAT4J_GENERIC_VALUE_ZERO, HABITAT4J_HIDDEN_FIELD_DECODED, HABITAT4J_HIDDEN_FIELD_DECODED_DECRYPTED, HABITAT4J_HIDDEN_FIELD_DECRYPTED, HABITAT4J_LOG4J_LOGGER, HABITAT4J_LOG4J_LOGMANAGER_CLASS, HABITAT4J_LOG4J_LOGMANAGER_GETLOGGER_METHOD, HABITAT4J_PRAGMA_ATTRIBUTE_NAME, HABITAT4J_PRAGMA_ATTRIBUTE_VALUE, HABITAT4J_PROPERTY_ARRAY_INSTANCE_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_ARRAY_INSTANCE_ATTRIBUTE_VALUE_APPEND, HABITAT4J_PROPERTY_ARRAY_INSTANCE_ATTRIBUTE_VALUE_DEFAULT, HABITAT4J_PROPERTY_ARRAY_INSTANCE_ATTRIBUTE_VALUE_PREPEND, HABITAT4J_PROPERTY_ARRAY_INSTANCE_ATTRIBUTE_VALUE_REPLACE, HABITAT4J_PROPERTY_ARRAY_ITEM_METHOD_PREFIX, HABITAT4J_PROPERTY_BEAN_ARRAY_INIT_METHOD_PREFIX, HABITAT4J_PROPERTY_BEAN_ARRAY_INSTANCE_ATTRIBUTE_VALUE_APPEND, HABITAT4J_PROPERTY_BEAN_ARRAY_INSTANCE_ATTRIBUTE_VALUE_DEFAULT, HABITAT4J_PROPERTY_BEAN_ARRAY_INSTANCE_ATTRIBUTE_VALUE_PREPEND, HABITAT4J_PROPERTY_BEAN_ARRAY_INSTANCE_ATTRIBUTE_VALUE_REPLACE, HABITAT4J_PROPERTY_BEAN_ARRAY_ITEM_INIT_METHOD_PREFIX, HABITAT4J_PROPERTY_BEAN_ARRAY_ITEM_SETTER_METHOD_PREFIX, HABITAT4J_PROPERTY_BEAN_ARRAY_SETTER_METHOD_PREFIX, HABITAT4J_PROPERTY_BEAN_DESCRIPTOR_CLASS_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_BEAN_DESCRIPTOR_COPY_METHOD_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_BEAN_DESCRIPTOR_COPY_METHOD_VALUE_DEFAULT, HABITAT4J_PROPERTY_BEAN_DESCRIPTOR_COPY_METHOD_VALUE_REFLECT, HABITAT4J_PROPERTY_BEAN_DESCRIPTOR_COPY_METHOD_VALUE_SERIALIZE, HABITAT4J_PROPERTY_BEAN_DESCRIPTOR_ID_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_BEAN_HASH_INIT_METHOD_PREFIX, HABITAT4J_PROPERTY_BEAN_HASH_INSTANCE_ATTRIBUTE_VALUE_DEFAULT, HABITAT4J_PROPERTY_BEAN_HASH_INSTANCE_ATTRIBUTE_VALUE_REPLACE, HABITAT4J_PROPERTY_BEAN_HASH_INSTANCE_ATTRIBUTE_VALUE_REVISE, HABITAT4J_PROPERTY_BEAN_HASH_ITEM_INIT_METHOD_PREFIX, HABITAT4J_PROPERTY_BEAN_HASH_ITEM_SETTER_METHOD_PREFIX, HABITAT4J_PROPERTY_BEAN_HASH_SETTER_METHOD_PREFIX, HABITAT4J_PROPERTY_BEAN_ID_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_BEAN_INIT_METHOD_PREFIX, HABITAT4J_PROPERTY_BEAN_INSTANCE_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_BEAN_INSTANCE_ATTRIBUTE_VALUE_DEFAULT, HABITAT4J_PROPERTY_BEAN_INSTANCE_ATTRIBUTE_VALUE_REPLACE, HABITAT4J_PROPERTY_BEAN_INSTANCE_ATTRIBUTE_VALUE_REVISE, HABITAT4J_PROPERTY_BEAN_NAME_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_BEAN_SETTER_METHOD_PREFIX, HABITAT4J_PROPERTY_BEAN_VALUE_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_DECODING_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_DECRYPTING_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_HASH_INSTANCE_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_HASH_INSTANCE_ATTRIBUTE_VALUE_DEFAULT, HABITAT4J_PROPERTY_HASH_INSTANCE_ATTRIBUTE_VALUE_REPLACE, HABITAT4J_PROPERTY_HASH_INSTANCE_ATTRIBUTE_VALUE_REVISE, HABITAT4J_PROPERTY_HASH_ITEM_METHOD_PREFIX, HABITAT4J_PROPERTY_HASH_KEY_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_HASH_TYPE_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_KIND_HABITAT4J, HABITAT4J_PROPERTY_KIND_SECURITY, HABITAT4J_PROPERTY_KIND_SYSTEM, HABITAT4J_PROPERTY_LIST_NAME_DEFAULT, HABITAT4J_PROPERTY_LIST_TO_STRING_ITEMS_PER_LINE_DEFAULT, HABITAT4J_PROPERTY_LIST_XSD_RESOURCE_PATH_DEFAULT, HABITAT4J_PROPERTY_NAME_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_TYPE_DELIMITER, HABITAT4J_PROPERTY_VALUE_ATTRIBUTE_NAME, HABITAT4J_PROPERTY_VALUE_SUBSTITUTION_DELIMITER, HABITAT4J_PROPERTY_VALUE_SUBSTITUTION_PREFIX, HABITAT4J_PROPERTY_VALUE_SUBSTITUTION_SUFFIX, HABITAT4J_ROLE_ATTRIBUTE_NAME, HABITAT4J_SAX_DRIVER_DEFAULT, HABITAT4J_SAX_DRIVER_SYSTEM_PROPERTY_NAME, HABITAT4J_SAX_SCHEMA_FEATURE, HABITAT4J_SAX_VALIDATION_FEATURE, HABITAT4J_SAX_XSD_LOCATION, HABITAT4J_SERVER_IDENTITY_FILE_PATH_DEFAULT, HABITAT4J_SERVER_IDENTITY_FILE_PATH_SYSTEM_PROPERTY_NAME, HABITAT4J_SERVER_IDENTITY_XSD_RESOURCE_PATH_DEFAULT, HABITAT4J_TEMP_PROPERTY_LIST_PREFIX, HABITAT4J_UNIX_OS_NAME_LIST_PROPERTY_NAME, HABITAT4J_VERSION, HABITAT4J_WINDOWS_OS_NAME_LIST_PROPERTY_NAME, HABITAT4J_XML_ELEMENT_DELIMITER, SAX_DRIVER_SYSTEM_PROPERTY_NAME, SERVER_IDENTITY_INSTANCE_OS_OTHER, SERVER_IDENTITY_INSTANCE_OS_UNIX, SERVER_IDENTITY_INSTANCE_OS_WINDOWS, SERVER_IDENTITY_MODE_FILE, SERVER_IDENTITY_MODE_JVM, SERVER_IDENTITY_MODE_JVM_ENVIRONMENT, SERVER_IDENTITY_MODE_JVM_INSTANCE_DESCRIPTION, SERVER_IDENTITY_MODE_JVM_INSTANCE_ENUMERATION, SERVER_IDENTITY_MODE_JVM_INSTANCE_NAME, SERVER_IDENTITY_MODE_NULL, SYSTEM_PROPERTY_OS_NAME
 
Constructor Summary
Habitat4JBootstrap()
           
 
Method Summary
protected static void configureApplicationName(java.lang.String applicationName)
           
protected static void configureLog4j(boolean log4jEnabled, java.lang.String logLevel)
           
protected static void configurePropertyListManager(java.lang.String applicationName, java.lang.String serverIdentityMode)
           
protected static void configurePropertyListXsdValidation(boolean xsdValidationEnabled)
           
protected static void configureServerIdentity(java.lang.String serverIdentityFilePath)
           
protected static void configureServerIdentityXsdValidation(boolean xsdValidationEnabled)
           
static java.lang.String createServerIdentityPath(java.lang.String serverIdentityFileName, java.lang.String[] directories)
          createServerIdentityPath() is a helper method for specifying multiple locations for a server-identity file.
static java.util.HashMap getDefaultBootstrapParamNameMap()
          getDefaultBootstrapParamNameMap provides a default HashMap of the default one-to-one mappings in defaultBootstrapParamNameArray.
protected static java.lang.String getMappedInitParamValue(java.util.Map bootstrapInitParams, java.util.Map bootstrapInitParamsNameMap, java.lang.String name)
           
static void initialize(java.util.Map bootstrapInitParams)
           
static void initialize(java.util.Map bootstrapInitParams, java.util.Map bootstrapInitParamsNameMap)
           
static void initialize(java.lang.String applicationName, java.lang.String bootstrapPropertyListPath)
          This initialize() method is the simplest to use, but has the least features.
static void initialize(java.lang.String applicationName, java.lang.String bootstrapPropertyListPath, boolean xsdValidationEnabled)
          To use this initialize() method, specify: applicationName - the name of your application bootstrapPropertyListPath - a path, either on the filesystem, or in the classpath (use slashes to delimit package paths) xsdValidationEnabled - a boolean value which determines whether Habitat4J should validate the server-identity and property-list files against the stock Habitat4J XSD files
static void initialize(java.lang.String applicationName, java.lang.String bootstrapPropertyListPath, boolean xsdValidationEnabled, boolean log4jEnabled)
          To use this initialize() method, specify: applicationName - the name of your application bootstrapPropertyListPath - a path, either on the filesystem, or in the classpath (use slashes to delimit package paths) xsdValidationEnabled - a boolean value which determines whether Habitat4J should validate the server-identity and property-list files against the stock Habitat4J XSD files log4jEnabled - a boolean value which determines whether Habitat4J should use log4j
static void initialize(java.lang.String applicationName, java.lang.String bootstrapPropertyListPath, boolean xsdValidationEnabled, boolean log4jEnabled, java.lang.String logLevel)
          To use this initialize() method, specify: applicationName - the name of your application bootstrapPropertyListPath - a path, either on the filesystem, or in the classpath (use slashes to delimit package paths) xsdValidationEnabled - a boolean value which determines whether Habitat4J should validate the server-identity and property-list files against the stock Habitat4J XSD files log4jEnabled - a boolean value which determines whether Habitat4J should use log4j logLevel - a String containing one of the following log levels: debug, info, warn, error, or fatal mainly used for setting Habitat4J's native logging level (non-log4j)
static void initialize(java.lang.String applicationName, java.lang.String bootstrapPropertyListPath, boolean xsdValidationEnabled, boolean log4jEnabled, java.lang.String logLevel, java.lang.String serverIdentityFilePath)
          To use this initialize() method, specify: applicationName - the name of your application bootstrapPropertyListPath - a path, either on the filesystem, or in the classpath (use slashes to delimit package paths) xsdValidationEnabled - a boolean value which determines whether Habitat4J should validate the server-identity and property-list files against the stock Habitat4J XSD files log4jEnabled - a boolean value which determines whether Habitat4J should use log4j logLevel - a String containing one of the following log levels: debug, info, warn, error, or fatal mainly used for setting Habitat4J's native logging level (non-log4j) serverIdentityFilePath - a String containing a single path or semicolon-delimited list of paths pointing to a server-identity.xml file or files
static void initialize(java.lang.String applicationName, java.lang.String bootstrapPropertyListPath, boolean xsdValidationEnabled, boolean log4jEnabled, java.lang.String logLevel, java.lang.String serverIdentityFilePath, java.lang.String serverIdentityMode, java.lang.Class appPropertyListLoaderClass)
          To use this initialize() method, specify: applicationName - the name of your application bootstrapPropertyListPath - a path, either on the filesystem, or in the classpath (use slashes to delimit package paths) xsdValidationEnabled - a boolean value which determines whether Habitat4J should validate the server-identity and property-list files against the stock Habitat4J XSD files log4jEnabled - a boolean value which determines whether Habitat4J should use log4j logLevel - a String containing one of the following log levels: debug, info, warn, error, or fatal mainly used for setting Habitat4J's native logging level (non-log4j) serverIdentityFilePath - a String containing a single path or semicolon-delimited list of paths pointing to a server-identity.xml file or files serverIdentityMode - a String containing the ServerIdentity mode of operation (NULL, JVM, FILE) appPropertyListLoaderClassName - a String containing the fully qualified class for the customized implementation of ApplicationPropertyListLoaderIF
static void initialize(java.lang.String applicationName, java.lang.String bootstrapPropertyListPath, boolean xsdValidationEnabled, boolean log4jEnabled, java.lang.String logLevel, java.lang.String serverIdentityFilePath, java.lang.String serverIdentityMode, java.lang.String appPropertyListLoaderClassName)
          To use this initialize() method, specify: applicationName - the name of your application bootstrapPropertyListPath - a path, either on the filesystem, or in the classpath (use slashes to delimit package paths) xsdValidationEnabled - a boolean value which determines whether Habitat4J should validate the server-identity and property-list files against the stock Habitat4J XSD files log4jEnabled - a boolean value which determines whether Habitat4J should use log4j logLevel - a String containing one of the following log levels: debug, info, warn, error, or fatal mainly used for setting Habitat4J's native logging level (non-log4j) serverIdentityFilePath - a String containing a single path or semicolon-delimited list of paths pointing to a server-identity.xml file or files serverIdentityMode - a String containing the ServerIdentity mode of operation (NULL, JVM, FILE) appPropertyListLoaderClassName - a String containing the fully qualified class for the customized implementation of ApplicationPropertyListLoaderIF
static void initializePropertyLists(java.util.Map bootstrapInitParams)
           
static void initializePropertyLists(java.util.Map bootstrapInitParams, java.util.Map bootstrapInitParamsNameMap)
           
static void initializePropertyLists(java.lang.String bootstrapPropertyListPath)
           
static void initializePropertyLists(java.lang.String bootstrapPropertyListPath, boolean xsdValidationEnabled)
           
static void initializePropertyLists(java.lang.String bootstrapPropertyListPath, boolean xsdValidationEnabled, java.lang.String appPropertyListLoaderClass)
           
static void initializeServerIdentity(java.util.Map bootstrapInitParams)
           
static void initializeServerIdentity(java.util.Map bootstrapInitParams, java.util.Map bootstrapInitParamsNameMap)
           
static void initializeServerIdentity(java.lang.String applicationName)
           
static void initializeServerIdentity(java.lang.String applicationName, boolean xsdValidationEnabled, boolean log4jEnabled, java.lang.String logLevel, java.lang.String serverIdentityFilePath)
           
static void initializeServerIdentity(java.lang.String applicationName, boolean xsdValidationEnabled, boolean log4jEnabled, java.lang.String logLevel, java.lang.String serverIdentityFilePath, java.lang.String serverIdentityMode)
           
static void initializeServerIdentity(java.lang.String applicationName, java.lang.String serverIdentityFilePath)
           
static void initializeServerIdentity(java.lang.String applicationName, java.lang.String serverIdentityFilePath, java.lang.String serverIdentityMode)
           
protected static void loadApplicationPropertyLists(java.lang.String applicationName, java.lang.Class appPropertyListLoaderClass)
           
protected static void loadApplicationPropertyLists(java.lang.String applicationName, java.lang.String appPropertyListLoaderClassName)
           
protected static void loadBootstrapPropertyList(java.lang.String bootstrapPropertyListPath)
           
protected static void loadServerIdentity()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static Habitat4JLogger logger

DEFAULT_BOOTSTRAP_PROPERTY_LIST_FILENAME

protected static final java.lang.String DEFAULT_BOOTSTRAP_PROPERTY_LIST_FILENAME
See Also:
Constant Field Values

DEFAULT_APPLICATION_PROPERTY_LIST_LOADER

protected static final java.lang.Class DEFAULT_APPLICATION_PROPERTY_LIST_LOADER

BOOTSTRAP_PARAM_APPLICATION_NAME

public static final java.lang.String BOOTSTRAP_PARAM_APPLICATION_NAME
See Also:
Constant Field Values

BOOTSTRAP_PARAM_BOOTSTRAP_PROPERTIES_PATH

public static final java.lang.String BOOTSTRAP_PARAM_BOOTSTRAP_PROPERTIES_PATH
See Also:
Constant Field Values

BOOTSTRAP_PARAM_XSD_VALIDATION_ENABLED

public static final java.lang.String BOOTSTRAP_PARAM_XSD_VALIDATION_ENABLED
See Also:
Constant Field Values

BOOTSTRAP_PARAM_LOG4J_ENABLED

public static final java.lang.String BOOTSTRAP_PARAM_LOG4J_ENABLED
See Also:
Constant Field Values

BOOTSTRAP_PARAM_LOG_LEVEL

public static final java.lang.String BOOTSTRAP_PARAM_LOG_LEVEL
See Also:
Constant Field Values

BOOTSTRAP_PARAM_SERVER_IDENTITY_FILE_PATH

public static final java.lang.String BOOTSTRAP_PARAM_SERVER_IDENTITY_FILE_PATH
See Also:
Constant Field Values

BOOTSTRAP_PARAM_SERVER_IDENTITY_MODE

public static final java.lang.String BOOTSTRAP_PARAM_SERVER_IDENTITY_MODE
See Also:
Constant Field Values

BOOTSTRAP_PARAM_APPLICATION_PROPERTY_LIST_LOADER_CLASS

public static final java.lang.String BOOTSTRAP_PARAM_APPLICATION_PROPERTY_LIST_LOADER_CLASS
See Also:
Constant Field Values

defaultBootstrapParamNameArray

protected static final java.lang.String[][] defaultBootstrapParamNameArray
Constructor Detail

Habitat4JBootstrap

public Habitat4JBootstrap()
Method Detail

getDefaultBootstrapParamNameMap

public static java.util.HashMap getDefaultBootstrapParamNameMap()
getDefaultBootstrapParamNameMap provides a default HashMap of the default one-to-one mappings in defaultBootstrapParamNameArray. It can be used as a starting point when creating a custom bootstrap parameter name HashMap.

Returns:
Returns a trivial map generated from the defaultBootstrapParamNameArray one-to-one map.

configureApplicationName

protected static void configureApplicationName(java.lang.String applicationName)
                                        throws Habitat4JBootstrapException
Parameters:
applicationName - - the name of the calling application
Throws:
Habitat4JBootstrapException

configureServerIdentityXsdValidation

protected static void configureServerIdentityXsdValidation(boolean xsdValidationEnabled)
Parameters:
xsdValidationEnabled - - boolean whether XSD validation should occur

configurePropertyListXsdValidation

protected static void configurePropertyListXsdValidation(boolean xsdValidationEnabled)
Parameters:
xsdValidationEnabled - - boolean whether XSD validation should occur

configureLog4j

protected static void configureLog4j(boolean log4jEnabled,
                                     java.lang.String logLevel)
Parameters:
log4jEnabled - - boolean whether log4j should be used for logging
logLevel - - a String containing either: "debug" "info" "warn" "error" or "fatal"

configureServerIdentity

protected static void configureServerIdentity(java.lang.String serverIdentityFilePath)
Parameters:
serverIdentityFilePath - - a String containing a single path or semicolon-delimited list of paths

configurePropertyListManager

protected static void configurePropertyListManager(java.lang.String applicationName,
                                                   java.lang.String serverIdentityMode)
Parameters:
applicationName - - the name of the calling application
serverIdentityMode - - the ServerIdentity mode to use

loadBootstrapPropertyList

protected static void loadBootstrapPropertyList(java.lang.String bootstrapPropertyListPath)
                                         throws Habitat4JBootstrapException
Parameters:
bootstrapPropertyListPath - - the file- or class-path to the bootstrap property file
Throws:
Habitat4JBootstrapException

loadApplicationPropertyLists

protected static void loadApplicationPropertyLists(java.lang.String applicationName,
                                                   java.lang.String appPropertyListLoaderClassName)
                                            throws Habitat4JBootstrapException
Parameters:
applicationName - - the name of the calling application
appPropertyListLoaderClassName - - a String containing the fully qualified class for the implementation of ApplicationPropertyListLoaderIF
Throws:
Habitat4JBootstrapException

loadApplicationPropertyLists

protected static void loadApplicationPropertyLists(java.lang.String applicationName,
                                                   java.lang.Class appPropertyListLoaderClass)
                                            throws Habitat4JBootstrapException
Parameters:
applicationName - - the name of the calling application
appPropertyListLoaderClass - - the Class object for the implementation of ApplicationPropertyListLoaderIF
Throws:
Habitat4JBootstrapException

loadServerIdentity

protected static void loadServerIdentity()
                                  throws Habitat4JBootstrapException
Throws:
Habitat4JBootstrapException

initializeServerIdentity

public static void initializeServerIdentity(java.lang.String applicationName,
                                            boolean xsdValidationEnabled,
                                            boolean log4jEnabled,
                                            java.lang.String logLevel,
                                            java.lang.String serverIdentityFilePath,
                                            java.lang.String serverIdentityMode)
                                     throws Habitat4JBootstrapException
Parameters:
applicationName - - the name of the calling application
xsdValidationEnabled - - boolean whether XSD validation should occur
log4jEnabled - - boolean whether log4j should be used for logging
logLevel - - a String containing either: "debug" "info" "warn" "error" or "fatal"
serverIdentityFilePath - - a String containing a single path or semicolon-delimited list of paths
serverIdentityMode - - a String containing the ServerIdentity mode of operation (NULL, JVM, FILE)
Throws:
Habitat4JBootstrapException

initializeServerIdentity

public static void initializeServerIdentity(java.lang.String applicationName,
                                            boolean xsdValidationEnabled,
                                            boolean log4jEnabled,
                                            java.lang.String logLevel,
                                            java.lang.String serverIdentityFilePath)
                                     throws Habitat4JBootstrapException
Parameters:
applicationName - - the name of the calling application
xsdValidationEnabled - - boolean whether XSD validation should occur
log4jEnabled - - boolean whether log4j should be used for logging
logLevel - - a String containing either: "debug" "info" "warn" "error" or "fatal"
serverIdentityFilePath - - a String containing a single path or semicolon-delimited list of paths
Throws:
Habitat4JBootstrapException

initializeServerIdentity

public static void initializeServerIdentity(java.lang.String applicationName,
                                            java.lang.String serverIdentityFilePath,
                                            java.lang.String serverIdentityMode)
                                     throws Habitat4JBootstrapException
Parameters:
applicationName - - the name of the calling application
serverIdentityFilePath - - a String containing a single path or semicolon-delimited list of paths
serverIdentityMode - - a String containing the ServerIdentity mode of operation (NULL, JVM, FILE)
Throws:
Habitat4JBootstrapException

initializeServerIdentity

public static void initializeServerIdentity(java.lang.String applicationName,
                                            java.lang.String serverIdentityFilePath)
                                     throws Habitat4JBootstrapException
Parameters:
applicationName - - the name of the calling application
serverIdentityFilePath - - a String containing a single path or semicolon-delimited list of paths
Throws:
Habitat4JBootstrapException

initializeServerIdentity

public static void initializeServerIdentity(java.lang.String applicationName)
                                     throws Habitat4JBootstrapException
Parameters:
applicationName - - the name of the calling application
Throws:
Habitat4JBootstrapException

initializePropertyLists

public static void initializePropertyLists(java.lang.String bootstrapPropertyListPath,
                                           boolean xsdValidationEnabled,
                                           java.lang.String appPropertyListLoaderClass)
                                    throws Habitat4JBootstrapException
Parameters:
bootstrapPropertyListPath -
xsdValidationEnabled - - boolean whether XSD validation should occur
appPropertyListLoaderClass -
Throws:
Habitat4JBootstrapException

initializePropertyLists

public static void initializePropertyLists(java.lang.String bootstrapPropertyListPath,
                                           boolean xsdValidationEnabled)
                                    throws Habitat4JBootstrapException
Parameters:
bootstrapPropertyListPath -
xsdValidationEnabled - - boolean whether XSD validation should occur
Throws:
Habitat4JBootstrapException

initializePropertyLists

public static void initializePropertyLists(java.lang.String bootstrapPropertyListPath)
                                    throws Habitat4JBootstrapException
Parameters:
bootstrapPropertyListPath -
Throws:
Habitat4JBootstrapException

initialize

public static void initialize(java.lang.String applicationName,
                              java.lang.String bootstrapPropertyListPath,
                              boolean xsdValidationEnabled,
                              boolean log4jEnabled,
                              java.lang.String logLevel,
                              java.lang.String serverIdentityFilePath,
                              java.lang.String serverIdentityMode,
                              java.lang.Class appPropertyListLoaderClass)
                       throws Habitat4JBootstrapException
To use this initialize() method, specify:

initialize

public static void initialize(java.lang.String applicationName,
                              java.lang.String bootstrapPropertyListPath,
                              boolean xsdValidationEnabled,
                              boolean log4jEnabled,
                              java.lang.String logLevel,
                              java.lang.String serverIdentityFilePath,
                              java.lang.String serverIdentityMode,
                              java.lang.String appPropertyListLoaderClassName)
                       throws Habitat4JBootstrapException
To use this initialize() method, specify:

initialize

public static void initialize(java.lang.String applicationName,
                              java.lang.String bootstrapPropertyListPath,
                              boolean xsdValidationEnabled,
                              boolean log4jEnabled,
                              java.lang.String logLevel,
                              java.lang.String serverIdentityFilePath)
                       throws Habitat4JBootstrapException
To use this initialize() method, specify:

initialize

public static void initialize(java.lang.String applicationName,
                              java.lang.String bootstrapPropertyListPath,
                              boolean xsdValidationEnabled,
                              boolean log4jEnabled,
                              java.lang.String logLevel)
                       throws Habitat4JBootstrapException
To use this initialize() method, specify:

initialize

public static void initialize(java.lang.String applicationName,
                              java.lang.String bootstrapPropertyListPath,
                              boolean xsdValidationEnabled,
                              boolean log4jEnabled)
                       throws Habitat4JBootstrapException
To use this initialize() method, specify:

Parameters:
applicationName - - the name of the calling application
bootstrapPropertyListPath - - the file- or class-path to the bootstrap property file
xsdValidationEnabled - - boolean whether XSD validation should occur
log4jEnabled - - boolean whether log4j should be used for logging
Throws:
Habitat4JBootstrapException

initialize

public static void initialize(java.lang.String applicationName,
                              java.lang.String bootstrapPropertyListPath,
                              boolean xsdValidationEnabled)
                       throws Habitat4JBootstrapException
To use this initialize() method, specify:

Parameters:
applicationName - - the name of the calling application
bootstrapPropertyListPath - - the file- or class-path to the bootstrap property file
xsdValidationEnabled - - boolean whether XSD validation should occur
Throws:
Habitat4JBootstrapException

initialize

public static void initialize(java.lang.String applicationName,
                              java.lang.String bootstrapPropertyListPath)
                       throws Habitat4JBootstrapException
This initialize() method is the simplest to use, but has the least features. Simply specify:

Parameters:
applicationName - - the name of the calling application
bootstrapPropertyListPath - - the file- or class-path to the bootstrap property file
Throws:
Habitat4JBootstrapException

getMappedInitParamValue

protected static java.lang.String getMappedInitParamValue(java.util.Map bootstrapInitParams,
                                                          java.util.Map bootstrapInitParamsNameMap,
                                                          java.lang.String name)
                                                   throws Habitat4JBootstrapException
Parameters:
bootstrapInitParams - - the Map instance of name/value pairs that contain bootstrap initialization parameter values
bootstrapInitParamsNameMap - - the Map instance of name/value pairs that contain initialization parameter name-to-name mappings
name - - the name in the name/value pair
Returns:
Returns the value in the name/value pair
Throws:
Habitat4JBootstrapException

initializeServerIdentity

public static void initializeServerIdentity(java.util.Map bootstrapInitParams,
                                            java.util.Map bootstrapInitParamsNameMap)
                                     throws Habitat4JBootstrapException
Parameters:
bootstrapInitParams - - the Map instance of name/value pairs that contain bootstrap initialization parameters
bootstrapInitParamsNameMap - - the Map instance of name/value pairs that contain initialization parameter name-to-name mappings
Throws:
Habitat4JBootstrapException

initializeServerIdentity

public static void initializeServerIdentity(java.util.Map bootstrapInitParams)
                                     throws Habitat4JBootstrapException
Parameters:
bootstrapInitParams - - the Map instance of name/value pairs that contain bootstrap initialization parameters
Throws:
Habitat4JBootstrapException

initializePropertyLists

public static void initializePropertyLists(java.util.Map bootstrapInitParams,
                                           java.util.Map bootstrapInitParamsNameMap)
                                    throws Habitat4JBootstrapException
Parameters:
bootstrapInitParams - - the Map instance of name/value pairs that contain bootstrap initialization parameters
bootstrapInitParamsNameMap - - the Map instance of name/value pairs that contain initialization parameter name-to-name mappings
Throws:
Habitat4JBootstrapException

initializePropertyLists

public static void initializePropertyLists(java.util.Map bootstrapInitParams)
                                    throws Habitat4JBootstrapException
Parameters:
bootstrapInitParams - - the Map instance of name/value pairs that contain bootstrap initialization parameters
Throws:
Habitat4JBootstrapException

initialize

public static void initialize(java.util.Map bootstrapInitParams,
                              java.util.Map bootstrapInitParamsNameMap)
                       throws Habitat4JBootstrapException
Parameters:
bootstrapInitParams - - the Map instance of name/value pairs that contain bootstrap initialization parameters
bootstrapInitParamsNameMap - - the Map instance of name/value pairs that contain initialization parameter name-to-name mappings
Throws:
Habitat4JBootstrapException

initialize

public static void initialize(java.util.Map bootstrapInitParams)
                       throws Habitat4JBootstrapException
Parameters:
bootstrapInitParams - - the Map instance of name/value pairs that contain bootstrap initialization parameters
Throws:
Habitat4JBootstrapException

createServerIdentityPath

public static java.lang.String createServerIdentityPath(java.lang.String serverIdentityFileName,
                                                        java.lang.String[] directories)
createServerIdentityPath() is a helper method for specifying multiple locations for a server-identity file.

Parameters:
serverIdentityFileName - - filename for server-identity file.
directories - - all directories where the server-identity file could exist.
Returns:
Returns a semicolon-delimited server-identity path.