|
Xindice API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xindice.util.Configuration
Configuration is a utility class that allows Configurable objects to easily manage configuration information in a simple and consistent fashion.
Configurable
Field Summary | |
static java.util.Map |
Modified
|
Constructor Summary | |
Configuration(org.w3c.dom.Document config)
|
|
Configuration(org.w3c.dom.Document config,
boolean readOnly)
|
|
Configuration(org.w3c.dom.Element config)
|
|
Configuration(org.w3c.dom.Element config,
boolean readOnly)
|
Method Summary | |
void |
add(Configuration newConfig)
add adds an existing Configuration node to this Configuration node. |
Configuration |
add(java.lang.String name)
add adds a new Configuration node to this Configuration node. |
void |
delete()
delete deletes this Configuration node from its parent Configuration. |
java.lang.String |
getAttribute(java.lang.String name)
getAttribute returns an attribute from the Configuration node. |
java.lang.String |
getAttribute(java.lang.String name,
java.lang.String defValue)
getAttribute returns an attribute from the Configuration node. |
boolean |
getBooleanAttribute(java.lang.String name)
getBooleanAttribute returns an attribute from the Configuration node. |
boolean |
getBooleanAttribute(java.lang.String name,
boolean defValue)
getBooleanAttribute returns an attribute from the Configuration node. |
boolean |
getBooleanValue(java.lang.String name)
getBooleanValue returns the value from the Configuration node. |
boolean |
getBooleanValue(java.lang.String name,
boolean defValue)
getBooleanValue returns the value from the Configuration node. |
byte |
getByteAttribute(java.lang.String name)
getByteAttribute returns an attribute from the Configuration node. |
byte |
getByteAttribute(java.lang.String name,
byte defValue)
getByteAttribute returns an attribute from the Configuration node. |
byte |
getByteValue(java.lang.String name)
getByteValue returns the value from the Configuration node. |
byte |
getByteValue(java.lang.String name,
byte defValue)
getByteValue returns the value from the Configuration node. |
char |
getCharAttribute(java.lang.String name)
getCharAttribute returns an attribute from the Configuration node. |
char |
getCharAttribute(java.lang.String name,
char defValue)
getCharAttribute returns an attribute from the Configuration node. |
char |
getCharValue(java.lang.String name)
getCharValue returns the value from the Configuration node. |
char |
getCharValue(java.lang.String name,
char defValue)
getCharValue returns the value from the Configuration node. |
Configuration |
getChild(java.lang.String name)
getChild returns the first child Configuration node that matches the specified name. |
Configuration |
getChild(java.lang.String name,
boolean create)
getChild returns the first child Configuration node that matches the specified name. |
Configuration[] |
getChildren()
getChildren returns the child Configuration nodes for this Configuration node. |
double |
getDoubleAttribute(java.lang.String name)
getDoubleAttribute returns an attribute from the Configuration node. |
double |
getDoubleAttribute(java.lang.String name,
double defValue)
getDoubleAttribute returns an attribute from the Configuration node. |
double |
getDoubleValue(java.lang.String name)
getDoubleValue returns the value from the Configuration node. |
double |
getDoubleValue(java.lang.String name,
double defValue)
getDoubleValue returns the value from the Configuration node. |
org.w3c.dom.Element |
getElement()
getElement returns the Element being managed by this Configuration. |
float |
getFloatAttribute(java.lang.String name)
getFloatAttribute returns an attribute from the Configuration node. |
float |
getFloatAttribute(java.lang.String name,
float defValue)
getFloatAttribute returns an attribute from the Configuration node. |
float |
getFloatValue(java.lang.String name)
getFloatValue returns the value from the Configuration node. |
float |
getFloatValue(java.lang.String name,
float defValue)
getFloatValue returns the value from the Configuration node. |
int |
getIntAttribute(java.lang.String name)
getIntAttribute returns an attribute from the Configuration node. |
int |
getIntAttribute(java.lang.String name,
int defValue)
getIntAttribute returns an attribute from the Configuration node. |
int |
getIntValue(java.lang.String name)
getIntValue returns the value from the Configuration node. |
int |
getIntValue(java.lang.String name,
int defValue)
getIntValue returns the value from the Configuration node. |
long |
getLongAttribute(java.lang.String name)
getLongAttribute returns an attribute from the Configuration node. |
long |
getLongAttribute(java.lang.String name,
long defValue)
getLongAttribute returns an attribute from the Configuration node. |
long |
getLongValue(java.lang.String name)
getLongValue returns the value from the Configuration node. |
long |
getLongValue(java.lang.String name,
long defValue)
getLongValue returns the value from the Configuration node. |
java.lang.String |
getName()
getName returns the name of the Configuration node. |
short |
getShortAttribute(java.lang.String name)
getShortAttribute returns an attribute from the Configuration node. |
short |
getShortAttribute(java.lang.String name,
short defValue)
getShortAttribute returns an attribute from the Configuration node. |
short |
getShortValue(java.lang.String name)
getShortValue returns the value from the Configuration node. |
short |
getShortValue(java.lang.String name,
short defValue)
getShortValue returns the value from the Configuration node. |
java.lang.String |
getValue()
getValue returns the value from the Configuration node. |
java.lang.String |
getValue(java.lang.String defValue)
getValue returns the value from the Configuration node. |
boolean |
hasAttributes()
hasAttributes returns whether or not the Configuration node has any attributes associated with it. |
boolean |
hasChildren()
hasChildren returns whether or not the Configuration node has child Configuration elements. |
boolean |
hasValue()
hasValue returns whether or not the Configuration node has a textual value associated with it. |
boolean |
isReadOnly()
isReadOnly returns whether or not this Configuration node is a read-only node. |
java.lang.String[] |
listAttributes()
listAttributes returns a list of the attribute names that exist for this Configuration node. |
void |
processChildren(ConfigurationCallback callback)
processChildren runs through the children of this Configuration and performs prcessing callbacks to the ConfigurationCallback object. |
void |
processChildren(java.lang.String name,
ConfigurationCallback callback)
processChildren runs through the children of this Configuration and performs prcessing callbacks to the ConfigurationCallback object. |
void |
removeAttribute(java.lang.String name)
removeAttribute removes the named attribute from this Configuration. |
void |
setAttribute(java.lang.String name,
boolean value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(java.lang.String name,
byte value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(java.lang.String name,
char value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(java.lang.String name,
double value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(java.lang.String name,
float value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(java.lang.String name,
int value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(java.lang.String name,
long value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(java.lang.String name,
short value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
setAttribute sets the attribute value for this Configuration. |
void |
setDirty()
|
void |
setValue(boolean value)
setValue sets the value of the Configuration node. |
void |
setValue(byte value)
setValue sets the value of the Configuration node. |
void |
setValue(char value)
setValue sets the value of the Configuration node. |
void |
setValue(double value)
setValue sets the value of the Configuration node. |
void |
setValue(float value)
setValue sets the value of the Configuration node. |
void |
setValue(int value)
setValue sets the value of the Configuration node. |
void |
setValue(long value)
setValue sets the value of the Configuration node. |
void |
setValue(short value)
setValue sets the value of the Configuration node. |
void |
setValue(java.lang.String value)
setValue sets the value of the Configuration node. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.util.Map Modified
Constructor Detail |
public Configuration(org.w3c.dom.Element config, boolean readOnly)
public Configuration(org.w3c.dom.Document config, boolean readOnly)
public Configuration(org.w3c.dom.Element config)
public Configuration(org.w3c.dom.Document config)
Method Detail |
public org.w3c.dom.Element getElement() throws ReadOnlyException
ReadOnlyException
- If the Configuration is Read-onlypublic java.lang.String getName()
public boolean hasAttributes()
public void setDirty()
public java.lang.String getAttribute(java.lang.String name, java.lang.String defValue)
name
- The attribute namedefValue
- The default valuepublic java.lang.String getAttribute(java.lang.String name)
name
- The attribute namepublic boolean getBooleanAttribute(java.lang.String name, boolean defValue)
name
- The attribute namedefValue
- The default valuepublic boolean getBooleanAttribute(java.lang.String name)
name
- The attribute namepublic int getIntAttribute(java.lang.String name, int defValue)
name
- The attribute namedefValue
- The default valuepublic int getIntAttribute(java.lang.String name)
name
- The attribute namepublic short getShortAttribute(java.lang.String name, short defValue)
name
- The attribute namedefValue
- The default valuepublic short getShortAttribute(java.lang.String name)
name
- The attribute namepublic long getLongAttribute(java.lang.String name, long defValue)
name
- The attribute namedefValue
- The default valuepublic long getLongAttribute(java.lang.String name)
name
- The attribute namepublic float getFloatAttribute(java.lang.String name, float defValue)
name
- The attribute namedefValue
- The default valuepublic float getFloatAttribute(java.lang.String name)
name
- The attribute namepublic double getDoubleAttribute(java.lang.String name, double defValue)
name
- The attribute namedefValue
- The default valuepublic double getDoubleAttribute(java.lang.String name)
name
- The attribute namepublic byte getByteAttribute(java.lang.String name, byte defValue)
name
- The attribute namedefValue
- The default valuepublic byte getByteAttribute(java.lang.String name)
name
- The attribute namepublic char getCharAttribute(java.lang.String name, char defValue)
name
- The attribute namedefValue
- The default valuepublic char getCharAttribute(java.lang.String name)
name
- The attribute namepublic java.lang.String[] listAttributes()
public boolean hasValue()
public java.lang.String getValue(java.lang.String defValue)
defValue
- The default valuepublic java.lang.String getValue()
public boolean getBooleanValue(java.lang.String name, boolean defValue)
defValue
- The default valuepublic boolean getBooleanValue(java.lang.String name)
public int getIntValue(java.lang.String name, int defValue)
defValue
- The default valuepublic int getIntValue(java.lang.String name)
public short getShortValue(java.lang.String name, short defValue)
defValue
- The default valuepublic short getShortValue(java.lang.String name)
public long getLongValue(java.lang.String name, long defValue)
defValue
- The default valuepublic long getLongValue(java.lang.String name)
public float getFloatValue(java.lang.String name, float defValue)
defValue
- The default valuepublic float getFloatValue(java.lang.String name)
public double getDoubleValue(java.lang.String name, double defValue)
defValue
- The default valuepublic double getDoubleValue(java.lang.String name)
public byte getByteValue(java.lang.String name, byte defValue)
defValue
- The default valuepublic byte getByteValue(java.lang.String name)
public char getCharValue(java.lang.String name, char defValue)
defValue
- The default valuepublic char getCharValue(java.lang.String name)
public boolean hasChildren()
public Configuration[] getChildren()
public void processChildren(ConfigurationCallback callback)
callback
- The callback objectpublic void processChildren(java.lang.String name, ConfigurationCallback callback)
callback
- The callback objectname
- The Configuration name to processpublic Configuration getChild(java.lang.String name, boolean create) throws ReadOnlyException
name
- The Configuration node namecreate
- Create Configuration if it doesn't existReadOnlyException
- if the Configuration is read-onlypublic Configuration getChild(java.lang.String name)
name
- The Configuration node namepublic boolean isReadOnly()
public Configuration add(java.lang.String name) throws ReadOnlyException
name
- The name of the Configuration nodeReadOnlyException
- if the Configuration is read-onlypublic void add(Configuration newConfig) throws ReadOnlyException
config
- The Configuration node to addReadOnlyException
- if the Configuration is read-onlypublic void delete() throws ReadOnlyException
ReadOnlyException
- if the Configuration is read-onlypublic void removeAttribute(java.lang.String name) throws ReadOnlyException
name
- The attribute nameReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(java.lang.String name, java.lang.String value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute valueReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(java.lang.String name, boolean value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute valueReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(java.lang.String name, int value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute valueReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(java.lang.String name, short value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute valueReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(java.lang.String name, long value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute valueReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(java.lang.String name, float value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute valueReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(java.lang.String name, double value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute valueReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(java.lang.String name, byte value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute valueReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(java.lang.String name, char value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute valueReadOnlyException
- if the Configuration is read-onlypublic void setValue(java.lang.String value) throws ReadOnlyException
value
- The New ValueReadOnlyException
- if the Configuration is read-onlypublic void setValue(boolean value) throws ReadOnlyException
value
- The New ValueReadOnlyException
- if the Configuration is read-onlypublic void setValue(int value) throws ReadOnlyException
value
- The New ValueReadOnlyException
- if the Configuration is read-onlypublic void setValue(short value) throws ReadOnlyException
value
- The New ValueReadOnlyException
- if the Configuration is read-onlypublic void setValue(long value) throws ReadOnlyException
value
- The New ValueReadOnlyException
- if the Configuration is read-onlypublic void setValue(float value) throws ReadOnlyException
value
- The New ValueReadOnlyException
- if the Configuration is read-onlypublic void setValue(double value) throws ReadOnlyException
value
- The New ValueReadOnlyException
- if the Configuration is read-onlypublic void setValue(byte value) throws ReadOnlyException
value
- The New ValueReadOnlyException
- if the Configuration is read-onlypublic void setValue(char value) throws ReadOnlyException
value
- The New ValueReadOnlyException
- if the Configuration is read-only
|
Xindice API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |