|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.qabase.Configurator
public abstract class Configurator
Configurator that retrieve the Nitido Configuration files.
Constructor Summary | |
---|---|
protected |
Configurator(java.lang.String instanceName,
Configurator inConfig)
Copy Constructor that is called by getInstance( String, Configurator). |
|
Configurator(java.lang.String instanceName,
java.lang.String identifier)
Default constructor. |
Method Summary | |
---|---|
abstract void |
append(Configurator appendConfig)
Append the information from the specified incoming configurator. |
abstract void |
append(java.lang.String identifier)
Append to the Configurator with the information specified by the identifier. |
protected abstract Configurator |
clone(java.lang.String instanceName)
Create a cloned configurator with the same properties settings, but with the specified instanceName. |
static Configurator |
getInstance(java.lang.String instanceName,
Configurator inConfig)
|
static Configurator |
getInstance(java.lang.String classname,
java.lang.String instanceName,
java.lang.String identifier)
Return an instance of the specified Configurator. |
static java.util.Enumeration |
getInstanceNames()
|
abstract java.util.Properties |
getProperties(java.lang.String section)
Retrieve the Properties associated to the section. |
abstract java.lang.String |
getProperty(java.lang.String key)
Retrieve the specified property value from the default section. |
abstract java.lang.String |
getProperty(java.lang.String section,
java.lang.String key)
Retrieve the specified property value. |
abstract java.util.Enumeration |
getPropertyNames(java.lang.String section)
Get all property names stored under the specific section. |
abstract java.lang.String |
getPropertyWithDefault(java.lang.String key,
java.lang.String defaultValue)
Retrieve the specified property value from the default section. |
abstract java.lang.String |
getPropertyWithDefault(java.lang.String section,
java.lang.String key,
java.lang.String defaultValue)
Retrieve the specified property value. |
abstract java.util.Enumeration |
getSectionNames()
Retrieve all section names stored by this Configurator instance. |
abstract void |
prepend(Configurator prependConfig)
Prepend the information from the specified incoming configurator. |
abstract void |
prepend(java.lang.String prependIdentifier)
Prepend to the Configurator with the information specificed by the prependIdentifier. |
abstract void |
setProperty(java.lang.String section,
java.lang.String name,
java.lang.String value)
Set a specific property value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Configurator(java.lang.String instanceName, java.lang.String identifier)
All extended implementaiton of this class must have a constructor with this signature (i.e. taking in parameters instanceName and identifier).
Note: Both parameters are not really used by this constructor it's just here to inidicate to developers that the extended class must have this parameter.
protected Configurator(java.lang.String instanceName, Configurator inConfig)
All extended implementation of this class must have a constructor with this signature (i.e. taking in parameters instanceName and origConfig)
The content of the Configurator must be copy over from the origConfig to this new Configurator. (i.e. even if they are of the same class, you can't simply copy the member fields. You should use the getProperties to clone the Properties and copy to the new Configurator.
Method Detail |
---|
public static Configurator getInstance(java.lang.String classname, java.lang.String instanceName, java.lang.String identifier) throws ConfiguratorException
classname
- the classname of the instance.instanceName
- the instance name.identifier
- The system property to find the default login property.
ConfiguratorException
- If some of the important settings are incorrect, such as
the specified Configurator class is not found.public static Configurator getInstance(java.lang.String instanceName, Configurator inConfig)
public static java.util.Enumeration getInstanceNames()
public abstract java.lang.String getProperty(java.lang.String key)
key
- the key of the property.
public abstract java.lang.String getProperty(java.lang.String section, java.lang.String key)
section
- the section name.key
- the key of the property.
public abstract java.lang.String getPropertyWithDefault(java.lang.String key, java.lang.String defaultValue)
key
- the key of the property.defaultValue
- the default value to be returned in case the property is not found.
public abstract java.lang.String getPropertyWithDefault(java.lang.String section, java.lang.String key, java.lang.String defaultValue)
section
- the section namekey
- the key of the property
public abstract void append(Configurator appendConfig)
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.
appendConfig
- the Configurator object whose value is going to be appended to this
Configurator.prepend( Configurator )
public abstract void append(java.lang.String identifier)
identifier
- The string which has the information required by the Configurator
implementation.public abstract void prepend(Configurator prependConfig)
In other words, this method will not affect any property values that are already stored in this object before its invocation.
append( Configurator )
public abstract void prepend(java.lang.String prependIdentifier)
In other words, this method will not affect any property values that are already stored in this object before its invocation.
append( String )
public abstract void setProperty(java.lang.String section, java.lang.String name, java.lang.String value)
section
- the section namename
- the name of the propertyvalue
- the value of the propertypublic abstract java.util.Properties getProperties(java.lang.String section)
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.
section
- the section name
setProperty( String, String, String )
public abstract java.util.Enumeration getSectionNames()
public abstract java.util.Enumeration getPropertyNames(java.lang.String section)
section
- the section name.
protected abstract Configurator clone(java.lang.String instanceName)
|
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.