org.productivity.java.habitat4j.common
Class PropertyList

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable
          extended by org.productivity.java.habitat4j.common.PropertyList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map, Habitat4JConstants

public class PropertyList
extends java.util.Hashtable
implements Habitat4JConstants

This class provides name/value pair Hashtables for property lists maintained by Habitat4J. Access directly to a PropertyList is not typical - the getters and setters in PropertyListManager are used instead.

## 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: PropertyList.html,v 1.2 2008/11/24 15:15:06 cvs Exp $
Author:
Justin Yunke <habitat4j@productivity.org>
See Also:
Serialized Form

Field Summary
static java.lang.Class[] emptyClassArray
           
static java.lang.Object[] emptyObjectArray
           
protected  Habitat4JLogger logger
           
static java.lang.Class[] singleCharClassArray
           
static java.lang.Class[] singleStringClassArray
           
 
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
PropertyList(java.lang.String listName, java.util.Hashtable globalPropertyBeanDefinitions, java.util.Hashtable globalDecoderDefinitions, java.util.Hashtable globalDecryptorDefinitions, java.lang.Object globalReloadEventHandler)
           
 
Method Summary
 void addDecoderDefinition(java.lang.String id, java.lang.Object object)
          This method handles the addition of a Decoder definition.
 void addDecryptionDefinition(java.lang.String id, java.lang.Object object)
          This method handles the addition of a Decryptor definition.
 void addPropertyBeanCopyMethodDefinition(java.lang.Class clazz, java.lang.String cloneMethodType)
          This method handles the addition of a PropertyBean copyMethod definition.
 void addPropertyBeanDefinition(java.lang.String id, java.lang.Object object)
          This method handles the addition of a PropertyBean definition.
protected  void checkThatPropertyExists(java.lang.String name)
           
protected  java.lang.Object cloneObject(java.lang.Object object, java.lang.String methodName)
           
protected  java.util.HashSet convertPropertyHashtableToHashSet(PropertyHash table)
           
 void flagDecodedProperty(java.lang.String name)
          This method sets the flag that indicates a property was decoded at load time.
 void flagDecryptedProperty(java.lang.String name)
          This method sets the flag that indicates a property was decrypted at load time.
static long getCurrentLastModified(java.lang.String fileName)
           
 DecoderIF getDecoderInstance(java.lang.String appName, java.lang.String id)
           
 DecryptorIF getDecryptorInstance(java.lang.String appName, java.lang.String id)
           
 java.lang.String getListModifiedBy()
           
 java.lang.String getListName()
           
 int getListReloadSerial()
           
 java.lang.String getListVersion()
           
 java.lang.Object getNewPropertyBeanInstance(java.lang.String id)
           
 java.lang.String getPragmaDefinition(java.lang.String name)
          This method handles the retrieval of a PropertyList-local pragma definition.
 java.util.Hashtable getPragmaDefinitions()
           
 java.util.Enumeration getProperties()
          This method returns an Enumeration of all property names.
 java.lang.String getProperty(java.lang.String name)
          This method gets a property consisting of a String value.
 java.lang.String[] getPropertyArray(java.lang.String name)
          This method gets a property consisting of an array of String values.
 int getPropertyAsInt(java.lang.String name)
           
 java.lang.Object getPropertyBean(java.lang.String name, boolean returnCopy)
          This method gets a property consisting of a PropertyBean.
 java.lang.Object[] getPropertyBeanArray(java.lang.String name, boolean returnCopy)
          This method gets a property consisting of an array of PropertyBean Objects.
protected  PropertyBeanArrayVector getPropertyBeanArrayCopy(PropertyBeanArrayVector vector)
           
protected  java.lang.Object getPropertyBeanCopy(java.lang.Object bean)
           
protected  java.lang.Object getPropertyBeanCopyViaReflection(java.lang.Object bean)
           
protected  java.lang.Object getPropertyBeanCopyViaSerialization(java.lang.Object bean)
          getPropertyBeanCopyViaSerialization(Object) uses serialization to copy (clone) an Object.
 PropertyBeanHash getPropertyBeanHash(java.lang.String name, boolean returnCopy)
          This method gets a property consisting of an array of PropertyBean Objects.
protected  PropertyBeanHash getPropertyBeanHashCopy(PropertyBeanHash hash)
           
 java.lang.Object getPropertyBeanHashValue(java.lang.String name, java.lang.String value, boolean returnCopy)
          This method gets a property consisting of an array of PropertyBean Objects.
 java.lang.Class getPropertyClass(java.lang.String name)
          This method gets a property's class.
 java.lang.String getPropertyClassName(java.lang.String name)
          This method gets a property's classname.
 PropertyHash getPropertyHash(java.lang.String name)
          This method gets a property consisting of a hash of String values.
 java.util.HashSet getPropertyHashSet(java.lang.String name)
          This method gets a property consisting of a hash of String values.
 java.lang.String getPropertyHashValue(java.lang.String name, java.lang.String key)
          This method gets a keyed property from a hash of String values.
 long getPropertyListFileLastLoaded()
           
 long getPropertyListFileLastModified()
           
 java.lang.String getPropertyListFilePath()
           
 ReloadEventHandlerIF getReloadDefinitionInstance()
           
 java.lang.Object getReloadEventHandler()
           
 int getToStringItemsPerLine()
           
 boolean hasReloadEventHandler()
           
 boolean isDecodedProperty(java.lang.String name)
           
 boolean isDecoderIdValid(java.lang.String id)
          This method is used to determine whether a Decoder identifier is valid.
 boolean isDecryptedProperty(java.lang.String name)
           
 boolean isDecryptorIdValid(java.lang.String id)
          This method is used to determine whether a Decryptor identifier is valid.
 boolean isPropertyABean(java.lang.String name)
          This method is used to determine whether a property contains an implementation of the Object interface.
 boolean isPropertyABeanArray(java.lang.String name)
          This method returns whether a property contains an array of PropertyBean Objects.
 boolean isPropertyABeanHash(java.lang.String name)
          This method returns whether a property contains a hash of PropertyBean Objects.
 boolean isPropertyAHash(java.lang.String name)
          This method returns whether a property contains a hash of Strings.
 boolean isPropertyAnArray(java.lang.String name)
          This method returns whether a property contains an array of Strings.
 boolean isPropertyAString(java.lang.String name)
          This method returns whether a property contains a String (name/value pair).
 boolean isPropertyBeanIdValid(java.lang.String id)
          This method is used to determine whether a PropertyBean identifier is valid.
 boolean isPropertyHashValue(java.lang.String name, java.lang.String key)
          This method gets a keyed property from a hash of String values.
 boolean isPropertyTrue(java.lang.String name)
           
 boolean isReloadable()
           
 boolean isReloadBlock()
           
 boolean isShouldCopyCloneableObjects()
           
 boolean isShouldCopyStringObjects()
           
 boolean isShouldCopyWrapperObjects()
           
 boolean isShouldSuppressPropertyBeanCopyWarnings()
           
 void setListModifiedBy(java.lang.String listModifiedBy)
           
 void setListName(java.lang.String listName)
           
 void setListReloadSerial(int listReloadSerial)
           
 void setListVersion(java.lang.String listVersion)
           
 void setPragmaDefinition(java.lang.String name, java.lang.String value)
          This method handles the setting of a PropertyList-local pragma definition.
 void setProperty(java.lang.String name, java.lang.String value)
          This method sets a property name/value pair.
 void setPropertyListFileLastLoaded(long propertyListFileLastLoaded)
           
 void setPropertyListFileLastModified(long propertyListFileLastModified)
           
 void setPropertyListFilePath(java.lang.String propertyListFilePath)
           
 void setReloadBlock(boolean reloadBlock)
           
 void setReloadEventHandler(java.lang.Object reloadEventHandler)
           
 void setShouldCopyCloneableObjects(boolean shouldCopyCloneableObjects)
           
 void setShouldCopyStringObjects(boolean shouldCopyStringObjects)
           
 void setShouldCopyWrapperObjects(boolean shouldCopyWrapperObjects)
           
 void setShouldSuppressPropertyBeanCopyWarnings(boolean shouldSuppressPropertyBeanCopyWarnings)
           
 void setToStringItemsPerLine(int toStringItemsPerLine)
           
 boolean shouldReload()
           
protected  void throwPropertyNotAvailableException(java.lang.String name, java.lang.String reason)
           
protected  void throwPropertyNotAvailableExceptionForBadType(java.lang.String name, java.lang.String correctType)
           
 java.lang.String toString()
          This method provides a human-readable dump of all properties, but will NOT display any values that were decoded or decrypted at load time.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

emptyObjectArray

public static final java.lang.Object[] emptyObjectArray

emptyClassArray

public static final java.lang.Class[] emptyClassArray

singleStringClassArray

public static final java.lang.Class[] singleStringClassArray

singleCharClassArray

public static final java.lang.Class[] singleCharClassArray

logger

protected Habitat4JLogger logger
Constructor Detail

PropertyList

public PropertyList(java.lang.String listName,
                    java.util.Hashtable globalPropertyBeanDefinitions,
                    java.util.Hashtable globalDecoderDefinitions,
                    java.util.Hashtable globalDecryptorDefinitions,
                    java.lang.Object globalReloadEventHandler)
Method Detail

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
This method sets a property name/value pair.

Parameters:
name - - the name of the property to get
value - - the value of the property to set

getProperty

public java.lang.String getProperty(java.lang.String name)
                             throws PropertyNotAvailableException
This method gets a property consisting of a String value.

Parameters:
name - - the name of the property to get
Returns:
Returns the value of the property based on the provided name.
Throws:
PropertyNotAvailableException

getPropertyAsInt

public int getPropertyAsInt(java.lang.String name)
                     throws PropertyNotAvailableException
Parameters:
name - - the name of the property to get
Returns:
Returns a primitive int value.
Throws:
PropertyNotAvailableException

isPropertyTrue

public boolean isPropertyTrue(java.lang.String name)
                       throws PropertyNotAvailableException
Parameters:
name - - the name of the property to get
Returns:
Returns a primitive boolean value if the the value of the property matches trimmed/case-insensitive "true," "on," or "1".
Throws:
PropertyNotAvailableException

getPropertyArray

public java.lang.String[] getPropertyArray(java.lang.String name)
                                    throws PropertyNotAvailableException
This method gets a property consisting of an array of String values.

Parameters:
name - - the name of the property to get
Returns:
Returns the value of the property based on the provided name.
Throws:
PropertyNotAvailableException

getPropertyHash

public PropertyHash getPropertyHash(java.lang.String name)
                             throws PropertyNotAvailableException
This method gets a property consisting of a hash of String values.

Parameters:
name - - the name of the property to get
Returns:
Returns the value of the property based on the provided name.
Throws:
PropertyNotAvailableException

getPropertyHashValue

public java.lang.String getPropertyHashValue(java.lang.String name,
                                             java.lang.String key)
                                      throws PropertyNotAvailableException
This method gets a keyed property from a hash of String values.

Parameters:
name - - the name of the property to get
key - - the name of the property to get
Returns:
Returns the value of the property based on the provided name.
Throws:
PropertyNotAvailableException

isPropertyHashValue

public boolean isPropertyHashValue(java.lang.String name,
                                   java.lang.String key)
                            throws PropertyNotAvailableException
This method gets a keyed property from a hash of String values.

Parameters:
name - - the name of the property to get
key - - the name of the property to get
Returns:
Returns the value of the property based on the provided name.
Throws:
PropertyNotAvailableException

convertPropertyHashtableToHashSet

protected java.util.HashSet convertPropertyHashtableToHashSet(PropertyHash table)
Parameters:
table - - the PropertyHashTable to convert
Returns:
Returns a HashSet version of the PropertyHash

getPropertyHashSet

public java.util.HashSet getPropertyHashSet(java.lang.String name)
                                     throws PropertyNotAvailableException
This method gets a property consisting of a hash of String values.

Parameters:
name - - the name of the property to get
Returns:
Returns the value of the property based on the provided name.
Throws:
PropertyNotAvailableException

getPropertyBeanArrayCopy

protected PropertyBeanArrayVector getPropertyBeanArrayCopy(PropertyBeanArrayVector vector)
Parameters:
vector - - the PropertyBeanArrayVector to copy (clone)
Returns:
Returns a new instance of PropertyBeanArrayVector which includes copies (clones) of all PropertyBean Objects within the provided vector

getPropertyBeanHashCopy

protected PropertyBeanHash getPropertyBeanHashCopy(PropertyBeanHash hash)
Parameters:
hash - - the PropertyBeanHash to copy (clone)
Returns:
Returns a new instance of PropertyBeanHash which includes copies (clones) of all PropertyBean Objects within the provided hash

cloneObject

protected java.lang.Object cloneObject(java.lang.Object object,
                                       java.lang.String methodName)
Parameters:
object - - the Object to clone
methodName - - the methodName to use in logging
Returns:
Returns a clone of an Object, if it's either a supported Habitat4J type, or an implementation of Cloneable with a working "clone()" method.

getPropertyBeanCopyViaReflection

protected java.lang.Object getPropertyBeanCopyViaReflection(java.lang.Object bean)
                                                     throws PropertyNotAvailableException
Parameters:
bean - - the Object instance to copy (clone)
Returns:
Returns a copy (clone) of a Object.
Throws:
PropertyNotAvailableException

getPropertyBeanCopyViaSerialization

protected java.lang.Object getPropertyBeanCopyViaSerialization(java.lang.Object bean)
                                                        throws PropertyNotAvailableException
getPropertyBeanCopyViaSerialization(Object) uses serialization to copy (clone) an Object.

Parameters:
bean - - the Object instance to copy (clone)
Returns:
Returns a copy (clone) of a Object.
Throws:
PropertyNotAvailableException

getPropertyBeanCopy

protected java.lang.Object getPropertyBeanCopy(java.lang.Object bean)
                                        throws PropertyNotAvailableException
Parameters:
bean - - the Object instance to copy (clone)
Returns:
Returns a copy (clone) of a Object.
Throws:
PropertyNotAvailableException

getPropertyBean

public java.lang.Object getPropertyBean(java.lang.String name,
                                        boolean returnCopy)
                                 throws PropertyNotAvailableException
This method gets a property consisting of a PropertyBean.

Parameters:
name - - the name of the property to get
returnCopy - - whether or not to return a copy of the PropertyBean
Returns:
Returns an instance of a PropertyBean based on the Object interface.
Throws:
PropertyNotAvailableException

getPropertyBeanArray

public java.lang.Object[] getPropertyBeanArray(java.lang.String name,
                                               boolean returnCopy)
                                        throws PropertyNotAvailableException
This method gets a property consisting of an array of PropertyBean Objects.

Parameters:
name - - the name of the property
returnCopy - - whether or not to return a copy of the PropertyBean array
Returns:
Returns an array of PropertyBean Objects.
Throws:
PropertyNotAvailableException

getPropertyBeanHash

public PropertyBeanHash getPropertyBeanHash(java.lang.String name,
                                            boolean returnCopy)
                                     throws PropertyNotAvailableException
This method gets a property consisting of an array of PropertyBean Objects.

Parameters:
name - - the name of the property
returnCopy - - whether or not to return a copy of the PropertyBean array
Returns:
Returns an array of PropertyBean Objects.
Throws:
PropertyNotAvailableException

getPropertyBeanHashValue

public java.lang.Object getPropertyBeanHashValue(java.lang.String name,
                                                 java.lang.String value,
                                                 boolean returnCopy)
                                          throws PropertyNotAvailableException
This method gets a property consisting of an array of PropertyBean Objects.

Parameters:
name - - the name of the property
value - - the key to lookup in the hashtable
returnCopy - - whether or not to return a copy of the PropertyBean array
Returns:
Returns an array of PropertyBean Objects.
Throws:
PropertyNotAvailableException

getPropertyClass

public java.lang.Class getPropertyClass(java.lang.String name)
                                 throws PropertyNotAvailableException
This method gets a property's class.

Parameters:
name - the name of the property for which to get the class
Returns:
Returns the class of the property based on the provided name.
Throws:
PropertyNotAvailableException

getPropertyClassName

public java.lang.String getPropertyClassName(java.lang.String name)
                                      throws PropertyNotAvailableException
This method gets a property's classname.

Parameters:
name - the name of the property for which to get the classname
Returns:
Returns the classname of the property based on the provided name.
Throws:
PropertyNotAvailableException

isPropertyAString

public boolean isPropertyAString(java.lang.String name)
                          throws PropertyNotAvailableException
This method returns whether a property contains a String (name/value pair).

Parameters:
name - the name of the property
Returns:
Returns whether the property specified by name contains a String.
Throws:
PropertyNotAvailableException

isPropertyAnArray

public boolean isPropertyAnArray(java.lang.String name)
                          throws PropertyNotAvailableException
This method returns whether a property contains an array of Strings.

Parameters:
name - the name of the property
Returns:
Returns whether the property specified by name contains an array of Strings.
Throws:
PropertyNotAvailableException

isPropertyAHash

public boolean isPropertyAHash(java.lang.String name)
                        throws PropertyNotAvailableException
This method returns whether a property contains a hash of Strings.

Parameters:
name - the name of the property
Returns:
Returns whether the property specified by name contains an array of Strings.
Throws:
PropertyNotAvailableException

isPropertyABean

public boolean isPropertyABean(java.lang.String name)
                        throws PropertyNotAvailableException
This method is used to determine whether a property contains an implementation of the Object interface.

Parameters:
name - - the name of the property
Returns:
Returns whether a property contains a PropertyBean instance.
Throws:
PropertyNotAvailableException

isPropertyABeanArray

public boolean isPropertyABeanArray(java.lang.String name)
                             throws PropertyNotAvailableException
This method returns whether a property contains an array of PropertyBean Objects.

Parameters:
name - the name of the property
Returns:
Returns whether the property specified by name contains an array of PropertyBean Objects.
Throws:
PropertyNotAvailableException

isPropertyABeanHash

public boolean isPropertyABeanHash(java.lang.String name)
                            throws PropertyNotAvailableException
This method returns whether a property contains a hash of PropertyBean Objects.

Parameters:
name - the name of the property
Returns:
Returns whether the property specified by name contains a hash of PropertyBean Objects.
Throws:
PropertyNotAvailableException

getProperties

public java.util.Enumeration getProperties()
This method returns an Enumeration of all property names.

Returns:
Returns an Enumeration of all property names.

getPropertyListFilePath

public java.lang.String getPropertyListFilePath()
Returns:
Returns the file path for this PropertyList object.

setPropertyListFilePath

public void setPropertyListFilePath(java.lang.String propertyListFilePath)
Parameters:
propertyListFilePath -

getPropertyListFileLastModified

public long getPropertyListFileLastModified()
Returns:
Returns the propertyListFileLastModified.

setPropertyListFileLastModified

public void setPropertyListFileLastModified(long propertyListFileLastModified)
Parameters:
propertyListFileLastModified - The propertyListFileLastModifiedDate to set.

isReloadable

public boolean isReloadable()
Returns:
Returns whether this PropertyList is able to be reloaded.

shouldReload

public boolean shouldReload()
Returns:
Returns whether this PropertyList should be reloaded, based on the last modified time/date stamp of the file.

getCurrentLastModified

public static long getCurrentLastModified(java.lang.String fileName)
Parameters:
fileName -
Returns:
Returns the last modified file date/time stamp from the operating system.

getPropertyListFileLastLoaded

public long getPropertyListFileLastLoaded()
Returns:
Returns the propertyListFileLastLoaded.

setPropertyListFileLastLoaded

public void setPropertyListFileLastLoaded(long propertyListFileLastLoaded)
Parameters:
propertyListFileLastLoaded - The propertyListFileLastLoaded to set.

addPropertyBeanDefinition

public void addPropertyBeanDefinition(java.lang.String id,
                                      java.lang.Object object)
This method handles the addition of a PropertyBean definition.

Parameters:
id - - the identifier of the property bean definition
object - - the Class or Object of the property bean definition

addPropertyBeanCopyMethodDefinition

public void addPropertyBeanCopyMethodDefinition(java.lang.Class clazz,
                                                java.lang.String cloneMethodType)
This method handles the addition of a PropertyBean copyMethod definition.

Parameters:
clazz - - the class of the property bean definition
byte - - the Class or Object of the property bean definition

addDecoderDefinition

public void addDecoderDefinition(java.lang.String id,
                                 java.lang.Object object)
This method handles the addition of a Decoder definition.

Parameters:
id - - the identifier of the decoding definition
object - - the Class or Object of the decoding definition

addDecryptionDefinition

public void addDecryptionDefinition(java.lang.String id,
                                    java.lang.Object object)
This method handles the addition of a Decryptor definition.

Parameters:
id - - the identifier of the decryptor definition
object - - the Class or Object of the decryptor definition

setPragmaDefinition

public void setPragmaDefinition(java.lang.String name,
                                java.lang.String value)
This method handles the setting of a PropertyList-local pragma definition. If null or "" is passed in via the value parameter, the pragma definition will be removed.

Parameters:
name - - the name of the pragma definition
value - - the value of the pragma definition

getPragmaDefinition

public java.lang.String getPragmaDefinition(java.lang.String name)
This method handles the retrieval of a PropertyList-local pragma definition.

Parameters:
name - - the name of the pragma definition
Returns:
Returns the pragma definition value.

getPragmaDefinitions

public java.util.Hashtable getPragmaDefinitions()
Returns:
Returns all PropertyList-specific pragma definitions.

isPropertyBeanIdValid

public boolean isPropertyBeanIdValid(java.lang.String id)
This method is used to determine whether a PropertyBean identifier is valid.

Parameters:
id - - the identifier of the property bean definition
Returns:
Returns whether a PropertyBean identifier is valid.

isDecoderIdValid

public boolean isDecoderIdValid(java.lang.String id)
This method is used to determine whether a Decoder identifier is valid.

Parameters:
id - - the identifier of the decoding definition
Returns:
Returns whether a decoding identifier is valid.

isDecryptorIdValid

public boolean isDecryptorIdValid(java.lang.String id)
This method is used to determine whether a Decryptor identifier is valid.

Parameters:
id - - the identifier of the decryptor definition
Returns:
Returns whether a decryptor identifier is valid.

getNewPropertyBeanInstance

public java.lang.Object getNewPropertyBeanInstance(java.lang.String id)
Parameters:
id - - the PropertyBean identifier
Returns:
Returns a new instance of a PropertyBean Object.

getDecoderInstance

public DecoderIF getDecoderInstance(java.lang.String appName,
                                    java.lang.String id)
                             throws DecoderException
Parameters:
appName - - the name of the calling application
id - - the Decoder identifier
Returns:
Returns an instance of a DecoderIF implementation.
Throws:
DecoderException

getDecryptorInstance

public DecryptorIF getDecryptorInstance(java.lang.String appName,
                                        java.lang.String id)
                                 throws DecryptorException
Parameters:
appName - - the name of the calling application
id - - the Decryptor identifier
Returns:
Returns an instance of a DecryptorIF implementation.
Throws:
DecryptorException

flagDecodedProperty

public void flagDecodedProperty(java.lang.String name)
This method sets the flag that indicates a property was decoded at load time.

Parameters:
name - - the property name

flagDecryptedProperty

public void flagDecryptedProperty(java.lang.String name)
This method sets the flag that indicates a property was decrypted at load time.

Parameters:
name - - the property name

isDecodedProperty

public boolean isDecodedProperty(java.lang.String name)
Parameters:
name - - the property name
Returns:
Returns whether a property was decoded at load time.

isDecryptedProperty

public boolean isDecryptedProperty(java.lang.String name)
Parameters:
name -
Returns:
Returns whether a property was decrypted at load time.

toString

public java.lang.String toString()
This method provides a human-readable dump of all properties, but will NOT display any values that were decoded or decrypted at load time.

Overrides:
toString in class java.util.Hashtable
Returns:
Returns a human-readable dump of all properties in the form of a String.

setReloadEventHandler

public void setReloadEventHandler(java.lang.Object reloadEventHandler)
Parameters:
reloadEventHandler - - the reloadEventHandler to set.

getReloadEventHandler

public java.lang.Object getReloadEventHandler()

hasReloadEventHandler

public boolean hasReloadEventHandler()

getReloadDefinitionInstance

public ReloadEventHandlerIF getReloadDefinitionInstance()
Returns:
Returns the implementation of ReloadEventHandlerIF associated with this Property-List.

isReloadBlock

public boolean isReloadBlock()
Returns:
Returns the reloadBlock.

setReloadBlock

public void setReloadBlock(boolean reloadBlock)
Parameters:
reloadBlock - - the reloadBlock to set.

getListModifiedBy

public java.lang.String getListModifiedBy()
Returns:
Returns the listModifiedBy.

setListModifiedBy

public void setListModifiedBy(java.lang.String listModifiedBy)
Parameters:
listModifiedBy - - the listModifiedBy to set.

getListReloadSerial

public int getListReloadSerial()
Returns:
Returns the listReloadSerial.

setListReloadSerial

public void setListReloadSerial(int listReloadSerial)
Parameters:
listReloadSerial - - the listReloadSerial to set.

getListVersion

public java.lang.String getListVersion()
Returns:
Returns the listVersion.

setListVersion

public void setListVersion(java.lang.String listVersion)
Parameters:
listVersion - - the listVersion to set.

getListName

public java.lang.String getListName()
Returns:
Returns the listName.

setListName

public void setListName(java.lang.String listName)
Parameters:
listName - - the listName to set.

throwPropertyNotAvailableExceptionForBadType

protected void throwPropertyNotAvailableExceptionForBadType(java.lang.String name,
                                                            java.lang.String correctType)
                                                     throws PropertyNotAvailableException
Parameters:
name - - name of the Property to describe in the PropertyNotAvailableException
correctType -
Throws:
PropertyNotAvailableException

throwPropertyNotAvailableException

protected void throwPropertyNotAvailableException(java.lang.String name,
                                                  java.lang.String reason)
                                           throws PropertyNotAvailableException
Parameters:
name - - name of the Property to describe in the PropertyNotAvailableException
reason - - textual reason to describe in the PropertyNotAvailableException
Throws:
PropertyNotAvailableException

checkThatPropertyExists

protected void checkThatPropertyExists(java.lang.String name)
                                throws PropertyNotAvailableException
Parameters:
name - - name of the Property to describe in the PropertyNotAvailableException
Throws:
PropertyNotAvailableException

isShouldCopyCloneableObjects

public boolean isShouldCopyCloneableObjects()
Returns:
Returns whether the cloneObject() method will clone Objects implementing the Cloneable interface.

setShouldCopyCloneableObjects

public void setShouldCopyCloneableObjects(boolean shouldCopyCloneableObjects)
Parameters:
shouldCopyCloneableObjects - - sets whether the cloneObject() method should clone Objects implementing the Cloneable interface

isShouldCopyWrapperObjects

public boolean isShouldCopyWrapperObjects()
Returns:
Returns whether the cloneObject() method will clone Wrapper Objects.

setShouldCopyWrapperObjects

public void setShouldCopyWrapperObjects(boolean shouldCopyWrapperObjects)
Parameters:
shouldCopyWrapperObjects - - sets whether the cloneObject() method should clone Wrapper Objects

isShouldCopyStringObjects

public boolean isShouldCopyStringObjects()
Returns:
Returns whether the cloneObject() method will clone String Objects.

setShouldCopyStringObjects

public void setShouldCopyStringObjects(boolean shouldCopyStringObjects)
Parameters:
shouldCopyStringObjects - - sets whether the cloneObject() method should clone String Objects

isShouldSuppressPropertyBeanCopyWarnings

public boolean isShouldSuppressPropertyBeanCopyWarnings()
Returns:
Returns whether "WARN" logging during property bean copy should be suppressed.

setShouldSuppressPropertyBeanCopyWarnings

public void setShouldSuppressPropertyBeanCopyWarnings(boolean shouldSuppressPropertyBeanCopyWarnings)
Parameters:
shouldSuppressPropertyBeanCopyWarnings - - sets whether "WARN" logging during property bean copy should be suppressed

getToStringItemsPerLine

public int getToStringItemsPerLine()
Returns:
Returns number of toString() items per line.

setToStringItemsPerLine

public void setToStringItemsPerLine(int toStringItemsPerLine)
Parameters:
toStringItemsPerLine - - the number of toString() items per line.