com.sun.xml.registry.ebxml.util
Class ProviderProperties

java.lang.Object
  extended bycom.sun.xml.registry.ebxml.util.ProviderProperties

public class ProviderProperties
extends java.lang.Object

Abstraction for Registry Configuration properties. Initial implementation just uses Java Property file, future implementation might acquire configuration info from XML. Thus, all java property methods are called via this abstraction. Registry Property File Search Order 1. If Property "jaxr-ebxml.properties", this value is used as the filename to load the jaxr properties from. Skip to step 3 if this property is set and the properties successfully loaded. 2. If file Property{user.home}/.jaxr-ebxml.properties exists, the properties are loaded from here. 3. System default properties are read from the CLASSPATH. The first file named com/sun/jaxr/util/jaxr-ebxml.properties will be used to set default Registry properties. These properties are overriden by the same named property set by either steps 1 or 2. When adding a new property, be sure to set a default value for the property in DEFAULT_SYSTEM_PROPERTY_FILE. Property Priority 1. Highest priority: any java system properties including command line properties set with -D 2. Medium priority: any properties set in {user.home}/.jaxr-ebxml.properties 3. Lowest priority: any properties set in the Registry default property file


Method Summary
static ProviderProperties getInstance()
          Implement Singleton class, this method is only way to get this object.
 java.util.Properties getProperties()
          Get properties
 java.lang.String getProperty(java.lang.String propertyName)
          Provide a backdoor to get a property without adding a method to access the property.
 java.lang.String getProperty(java.lang.String propertyName, java.lang.String def)
          Method Declaration.
 java.util.Iterator getPropertyNamesStartingWith(java.lang.String prefix)
           
 void mergeProperties(java.util.Properties p)
          Merge properties with existing properties.
 void put(java.lang.Object key, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ProviderProperties getInstance()
Implement Singleton class, this method is only way to get this object.


mergeProperties

public void mergeProperties(java.util.Properties p)
Merge properties with existing properties.

Parameters:
p - New properties

getProperties

public java.util.Properties getProperties()
Get properties

Returns:
Properties May be null

getProperty

public java.lang.String getProperty(java.lang.String propertyName)
Provide a backdoor to get a property without adding a method to access the property.


getProperty

public java.lang.String getProperty(java.lang.String propertyName,
                                    java.lang.String def)
Method Declaration.

Parameters:
propertyName -
def -
Returns:
See Also:

getPropertyNamesStartingWith

public java.util.Iterator getPropertyNamesStartingWith(java.lang.String prefix)

put

public void put(java.lang.Object key,
                java.lang.Object value)
See Also:
Hashtable.put(Object,Object)


Copyright © 2001-2004 OASIS. All Rights Reserved.