|
Xindice API version 1.2m1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | 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
Constructor Summary | |
Configuration(org.w3c.dom.Document config)
Create read only configuration out of Document |
|
Configuration(org.w3c.dom.Document config,
boolean readOnly)
|
|
Configuration(org.w3c.dom.Element config)
Create read only configuration out of Element |
|
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(String name)
add adds a new Configuration node to this Configuration node. |
void |
delete()
delete deletes this Configuration node from its parent Configuration. |
String |
getAttribute(String name)
getAttribute returns an attribute from the Configuration node. |
String |
getAttribute(String name,
String defValue)
getAttribute returns an attribute from the Configuration node. |
boolean |
getBooleanAttribute(String name)
getBooleanAttribute returns an attribute from the Configuration node. |
boolean |
getBooleanAttribute(String name,
boolean defValue)
getBooleanAttribute returns an attribute from the Configuration node. |
boolean |
getBooleanValue()
getBooleanValue returns the value from the Configuration node. |
boolean |
getBooleanValue(boolean defValue)
getBooleanValue returns the value from the Configuration node. |
byte |
getByteAttribute(String name)
getByteAttribute returns an attribute from the Configuration node. |
byte |
getByteAttribute(String name,
byte defValue)
getByteAttribute returns an attribute from the Configuration node. |
byte |
getByteValue()
getByteValue returns the value from the Configuration node. |
byte |
getByteValue(byte defValue)
getByteValue returns the value from the Configuration node. |
char |
getCharAttribute(String name)
getCharAttribute returns an attribute from the Configuration node. |
char |
getCharAttribute(String name,
char defValue)
getCharAttribute returns an attribute from the Configuration node. |
char |
getCharValue()
getCharValue returns the value from the Configuration node. |
char |
getCharValue(char defValue)
getCharValue returns the value from the Configuration node. |
Configuration |
getChild(String name)
getChild returns the first child Configuration node that matches the specified name. |
Configuration |
getChild(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. |
Configuration[] |
getChildren(String name)
getChildren returns all children Configuration nodes that matches the specified name. |
double |
getDoubleAttribute(String name)
getDoubleAttribute returns an attribute from the Configuration node. |
double |
getDoubleAttribute(String name,
double defValue)
getDoubleAttribute returns an attribute from the Configuration node. |
double |
getDoubleValue()
getDoubleValue returns the value from the Configuration node. |
double |
getDoubleValue(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(String name)
getFloatAttribute returns an attribute from the Configuration node. |
float |
getFloatAttribute(String name,
float defValue)
getFloatAttribute returns an attribute from the Configuration node. |
float |
getFloatValue()
getFloatValue returns the value from the Configuration node. |
float |
getFloatValue(float defValue)
getFloatValue returns the value from the Configuration node. |
int |
getIntAttribute(String name)
getIntAttribute returns an attribute from the Configuration node. |
int |
getIntAttribute(String name,
int defValue)
getIntAttribute returns an attribute from the Configuration node. |
int |
getIntValue()
getIntValue returns the value from the Configuration node. |
int |
getIntValue(int defValue)
getIntValue returns the value from the Configuration node. |
long |
getLongAttribute(String name)
getLongAttribute returns an attribute from the Configuration node. |
long |
getLongAttribute(String name,
long defValue)
getLongAttribute returns an attribute from the Configuration node. |
long |
getLongValue()
getLongValue returns the value from the Configuration node. |
long |
getLongValue(long defValue)
getLongValue returns the value from the Configuration node. |
String |
getName()
getName returns the name of the Configuration node. |
short |
getShortAttribute(String name)
getShortAttribute returns an attribute from the Configuration node. |
short |
getShortAttribute(String name,
short defValue)
getShortAttribute returns an attribute from the Configuration node. |
short |
getShortValue()
getShortValue returns the value from the Configuration node. |
short |
getShortValue(short defValue)
getShortValue returns the value from the Configuration node. |
String |
getValue()
getValue returns the value from the Configuration node. |
String |
getValue(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 |
isDirty()
|
boolean |
isReadOnly()
isReadOnly returns whether or not this Configuration node is a read-only node. |
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(String name,
ConfigurationCallback callback)
processChildren runs through the children of this Configuration and performs prcessing callbacks to the ConfigurationCallback object. |
void |
removeAttribute(String name)
removeAttribute removes the named attribute from this Configuration. |
void |
resetDirty()
|
void |
setAttribute(String name,
boolean value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(String name,
byte value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(String name,
char value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(String name,
double value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(String name,
float value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(String name,
int value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(String name,
long value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(String name,
short value)
setAttribute sets the attribute value for this Configuration. |
void |
setAttribute(String name,
String value)
setAttribute sets the attribute value for this Configuration. |
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(String value)
setValue sets the value of the Configuration node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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)
config
- Configuration elementpublic Configuration(org.w3c.dom.Document config)
config
- Configuration documentMethod Detail |
public void resetDirty()
public boolean isDirty()
public org.w3c.dom.Element getElement() throws ReadOnlyException
ReadOnlyException
- If the Configuration is Read-onlypublic String getName()
public boolean hasAttributes()
public String getAttribute(String name, String defValue)
name
- The attribute namedefValue
- The default value
public String getAttribute(String name)
name
- The attribute name
public boolean getBooleanAttribute(String name, boolean defValue)
name
- The attribute namedefValue
- The default value
public boolean getBooleanAttribute(String name)
name
- The attribute name
public int getIntAttribute(String name, int defValue)
name
- The attribute namedefValue
- The default value
public int getIntAttribute(String name)
name
- The attribute name
public short getShortAttribute(String name, short defValue)
name
- The attribute namedefValue
- The default value
public short getShortAttribute(String name)
name
- The attribute name
public long getLongAttribute(String name, long defValue)
name
- The attribute namedefValue
- The default value
public long getLongAttribute(String name)
name
- The attribute name
public float getFloatAttribute(String name, float defValue)
name
- The attribute namedefValue
- The default value
public float getFloatAttribute(String name)
name
- The attribute name
public double getDoubleAttribute(String name, double defValue)
name
- The attribute namedefValue
- The default value
public double getDoubleAttribute(String name)
name
- The attribute name
public byte getByteAttribute(String name, byte defValue)
name
- The attribute namedefValue
- The default value
public byte getByteAttribute(String name)
name
- The attribute name
public char getCharAttribute(String name, char defValue)
name
- The attribute namedefValue
- The default value
public char getCharAttribute(String name)
name
- The attribute name
public String[] listAttributes()
public boolean hasValue()
public String getValue(String defValue)
defValue
- The default value
public String getValue()
public boolean getBooleanValue(boolean defValue)
defValue
- The default value
public boolean getBooleanValue()
public int getIntValue(int defValue)
defValue
- The default value
public int getIntValue()
public short getShortValue(short defValue)
defValue
- The default value
public short getShortValue()
public long getLongValue(long defValue)
defValue
- The default value
public long getLongValue()
public float getFloatValue(float defValue)
defValue
- The default value
public float getFloatValue()
public double getDoubleValue(double defValue)
defValue
- The default value
public double getDoubleValue()
public byte getByteValue(byte defValue)
defValue
- The default value
public byte getByteValue()
public char getCharValue(char defValue)
defValue
- The default value
public char getCharValue()
public boolean hasChildren()
public Configuration[] getChildren()
public void processChildren(ConfigurationCallback callback)
callback
- The callback objectpublic void processChildren(String name, ConfigurationCallback callback)
callback
- The callback objectname
- The Configuration name to processpublic Configuration[] getChildren(String name)
name
- The Configuration node name
public Configuration getChild(String name, boolean create) throws ReadOnlyException
name
- The Configuration node namecreate
- Create Configuration if it doesn't exist
ReadOnlyException
- if the Configuration is read-onlypublic Configuration getChild(String name)
name
- The Configuration node name
public boolean isReadOnly()
public Configuration add(String name) throws ReadOnlyException
name
- The name of the Configuration node
ReadOnlyException
- if the Configuration is read-onlypublic void add(Configuration newConfig) throws ReadOnlyException
newConfig
- The Configuration node to add
ReadOnlyException
- if the Configuration is read-onlypublic void delete() throws ReadOnlyException
ReadOnlyException
- if the Configuration is read-onlypublic void removeAttribute(String name) throws ReadOnlyException
name
- The attribute name
ReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(String name, String value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute value
ReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(String name, boolean value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute value
ReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(String name, int value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute value
ReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(String name, short value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute value
ReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(String name, long value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute value
ReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(String name, float value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute value
ReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(String name, double value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute value
ReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(String name, byte value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute value
ReadOnlyException
- if the Configuration is read-onlypublic void setAttribute(String name, char value) throws ReadOnlyException
name
- The attribute namevalue
- The attribute value
ReadOnlyException
- if the Configuration is read-onlypublic void setValue(String value) throws ReadOnlyException
value
- The New Value
ReadOnlyException
- if the Configuration is read-onlypublic void setValue(boolean value) throws ReadOnlyException
value
- The New Value
ReadOnlyException
- if the Configuration is read-onlypublic void setValue(int value) throws ReadOnlyException
value
- The New Value
ReadOnlyException
- if the Configuration is read-onlypublic void setValue(short value) throws ReadOnlyException
value
- The New Value
ReadOnlyException
- if the Configuration is read-onlypublic void setValue(long value) throws ReadOnlyException
value
- The New Value
ReadOnlyException
- if the Configuration is read-onlypublic void setValue(float value) throws ReadOnlyException
value
- The New Value
ReadOnlyException
- if the Configuration is read-onlypublic void setValue(double value) throws ReadOnlyException
value
- The New Value
ReadOnlyException
- if the Configuration is read-onlypublic void setValue(byte value) throws ReadOnlyException
value
- The New Value
ReadOnlyException
- if the Configuration is read-onlypublic void setValue(char value) throws ReadOnlyException
value
- The New Value
ReadOnlyException
- if the Configuration is read-only
|
Xindice API version 1.2m1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |