|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.qabase.Configurator
com.nitido.qabase.FileConfigurator
public class FileConfigurator
This Configurator implementation will retrieve the settings directly from the URL specified.
Field Summary | |
---|---|
protected java.lang.String |
_instanceName
|
protected java.util.Hashtable |
_sections
|
static java.lang.String |
SECTION_DEFAULT
The name of the default section used by the Configurator. |
static java.lang.String |
SECTION_LOGGER_ROOT
The section for Log4j's Root Category settings. |
Constructor Summary | |
---|---|
protected |
FileConfigurator(java.lang.String instanceName,
Configurator inConfig)
Copy Constructor. |
|
FileConfigurator(java.lang.String instanceName,
java.lang.String identifier)
Default constructor. |
Method Summary | |
---|---|
void |
append(Configurator appendConfig)
Append the information from the specified incoming configurator. |
void |
append(java.lang.String identifier)
Append to the Configurator with the information specified by the identifier. |
protected Configurator |
clone(java.lang.String instanceName)
Create a cloned configurator with the same properties settings, but with the specified instanceName. |
java.util.Properties |
getProperties(java.lang.String section)
Retrieve the Properties associated to the section. |
java.lang.String |
getProperty(java.lang.String key)
Retrieve the specified property value from the default section. |
java.lang.String |
getProperty(java.lang.String section,
java.lang.String key)
Retrieve the specified property value. |
java.util.Enumeration |
getPropertyNames(java.lang.String section)
Get all property names stored under the specific section. |
java.lang.String |
getPropertyWithDefault(java.lang.String key,
java.lang.String defaultValue)
Retrieve the specified property value from the default section. |
java.lang.String |
getPropertyWithDefault(java.lang.String section,
java.lang.String key,
java.lang.String defaultValue)
Retrieve the specified property value. |
java.util.Enumeration |
getSectionNames()
Retrieve all section names stored by this Configurator instance. |
void |
prepend(Configurator prependConfig)
Prepend the information from the specified incoming configurator. |
void |
prepend(java.lang.String identifier)
Prepend to the Configurator with the information specificed by the prependIdentifier. |
void |
setProperty(java.lang.String section,
java.lang.String name,
java.lang.String value)
Set a specific property value. |
Methods inherited from class com.nitido.qabase.Configurator |
---|
getInstance, getInstance, getInstanceNames |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Hashtable _sections
protected java.lang.String _instanceName
public static final java.lang.String SECTION_DEFAULT
public static final java.lang.String SECTION_LOGGER_ROOT
Constructor Detail |
---|
public FileConfigurator(java.lang.String instanceName, java.lang.String identifier)
instanceName
- the name of this Configurator instance.identifier
- the identifier string. (The URL)append( String )
protected FileConfigurator(java.lang.String instanceName, Configurator inConfig)
Method Detail |
---|
protected Configurator clone(java.lang.String instanceName)
Configurator
clone
in class Configurator
public java.lang.String getProperty(java.lang.String key)
Configurator
getProperty
in class Configurator
key
- the key of the property.
public java.lang.String getProperty(java.lang.String section, java.lang.String key)
Configurator
getProperty
in class Configurator
section
- the section name.key
- the key of the property.
public java.lang.String getPropertyWithDefault(java.lang.String key, java.lang.String defaultValue)
Configurator
getPropertyWithDefault
in class Configurator
key
- the key of the property.defaultValue
- the default value to be returned in case the property is not found.
public java.lang.String getPropertyWithDefault(java.lang.String section, java.lang.String key, java.lang.String defaultValue)
Configurator
getPropertyWithDefault
in class Configurator
section
- the section namekey
- the key of the property
public void append(Configurator appendConfig)
Configurator
In other words, all the property values stored in this oject before will remain the same only if the appendConfig has no value associated to the same property.
append
in class Configurator
appendConfig
- the Configurator object whose value is going to be appended to this
Configurator.Configurator.prepend( Configurator )
public void prepend(Configurator prependConfig)
Configurator
In other words, this method will not affect any property values that are already stored in this object before its invocation.
prepend
in class Configurator
Configurator.append( Configurator )
public void append(java.lang.String identifier)
Configurator
append
in class Configurator
identifier
- The string which has the information required by the Configurator
implementation.public void prepend(java.lang.String identifier)
Configurator
In other words, this method will not affect any property values that are already stored in this object before its invocation.
prepend
in class Configurator
Configurator.append( String )
public void setProperty(java.lang.String section, java.lang.String name, java.lang.String value)
Configurator
setProperty
in class Configurator
section
- the section namename
- the name of the propertyvalue
- the value of the propertypublic java.util.Properties getProperties(java.lang.String section)
Configurator
REMINDER: The Properties object returned by this method should be a cloned version of the one stored by the Configurator. Thus, developers are free to do whatever he/she want on the returned Properties object without worrying screwing up other modules using the same Configurator.
If the developer need to set a property value that affect the whole system, the setProperty( action, name, value ) should be invoked instead.
getProperties
in class Configurator
section
- the section name
Configurator.setProperty( String, String, String )
public java.util.Enumeration getSectionNames()
Configurator
getSectionNames
in class Configurator
public java.util.Enumeration getPropertyNames(java.lang.String section)
Configurator
getPropertyNames
in class Configurator
section
- the section name.
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.