| java.lang.Object net.myvietnam.mvncore.configuration.AbstractConfiguration net.myvietnam.mvncore.configuration.BaseConfiguration net.myvietnam.mvncore.configuration.BasePathConfiguration net.myvietnam.mvncore.configuration.XMLConfiguration net.myvietnam.mvncore.configuration.DOM4JConfiguration
DOM4JConfiguration | public class DOM4JConfiguration extends XMLConfiguration (Code) | | Reads a XML configuration file.
To retrieve the value of an attribute of an element, use
X.Y.Z[@attribute] . The '@' symbol was chosen for
consistency with XPath.
Setting property values will NOT automatically persist
changes to disk, unless autoSave=true .
author: Kelvin Tan author: Daniel Rall since: 0.8.1 |
Method Summary | |
public void | addProperty(String name, Object value) Calls super method, and also ensures the underlying
Document is modified so changes are persisted when saved. | public void | clearProperty(String name) Calls super method, and also ensures the underlying
Document is modified so changes are persisted when saved. | public File | getFile() Returns the file. | public String | getFileName() Returns the fileName. | public void | load() | public synchronized void | save() | public void | setAutoSave(boolean autoSave) If true, changes are automatically persisted. | public void | setFile(File file) Sets the file. | public void | setFileName(String fileName) | public void | setProperty(String name, Object value) Calls super method, and also ensures the underlying
Document is modified so changes are persisted when saved. |
DOM4JConfiguration | public DOM4JConfiguration()(Code) | | Empty construtor. You must provide a file/fileName
and call the load method
|
DOM4JConfiguration | public DOM4JConfiguration(File file) throws Exception(Code) | | Attempts to load the XML file.
Parameters: file - File object representing the XML file. exception: Exception - If error reading data source. |
addProperty | public void addProperty(String name, Object value)(Code) | | Calls super method, and also ensures the underlying
Document is modified so changes are persisted when saved.
Parameters: name - Parameters: value - |
clearProperty | public void clearProperty(String name)(Code) | | Calls super method, and also ensures the underlying
Document is modified so changes are persisted when saved.
Parameters: name - The name of the property to clear. |
getFile | public File getFile()(Code) | | Returns the file.
File |
getFileName | public String getFileName()(Code) | | Returns the fileName.
String |
setAutoSave | public void setAutoSave(boolean autoSave)(Code) | | If true, changes are automatically persisted.
Parameters: autoSave - |
setFile | public void setFile(File file)(Code) | | Sets the file.
Parameters: file - The file to set |
setProperty | public void setProperty(String name, Object value)(Code) | | Calls super method, and also ensures the underlying
Document is modified so changes are persisted when saved.
Parameters: name - Parameters: value - |
Methods inherited from net.myvietnam.mvncore.configuration.AbstractConfiguration | public void addProperty(String key, Object token)(Code)(Java Doc) abstract protected void addPropertyDirect(String key, Object obj)(Code)(Java Doc) abstract public void clearProperty(String key)(Code)(Java Doc) abstract public boolean containsKey(String key)(Code)(Java Doc) public boolean getBoolean(String key)(Code)(Java Doc) public boolean getBoolean(String key, boolean defaultValue)(Code)(Java Doc) public Boolean getBoolean(String key, Boolean defaultValue)(Code)(Java Doc) public byte getByte(String key)(Code)(Java Doc) public byte getByte(String key, byte defaultValue)(Code)(Java Doc) public Byte getByte(String key, Byte defaultValue)(Code)(Java Doc) public double getDouble(String key)(Code)(Java Doc) public double getDouble(String key, double defaultValue)(Code)(Java Doc) public Double getDouble(String key, Double defaultValue)(Code)(Java Doc) public float getFloat(String key)(Code)(Java Doc) public float getFloat(String key, float defaultValue)(Code)(Java Doc) public Float getFloat(String key, Float defaultValue)(Code)(Java Doc) public int getInt(String key)(Code)(Java Doc) public int getInt(String key, int defaultValue)(Code)(Java Doc) public Integer getInteger(String key, Integer defaultValue)(Code)(Java Doc) abstract public Iterator getKeys()(Code)(Java Doc) public Iterator getKeys(String prefix)(Code)(Java Doc) public long getLong(String key)(Code)(Java Doc) public long getLong(String key, long defaultValue)(Code)(Java Doc) public Long getLong(String key, Long defaultValue)(Code)(Java Doc) public Properties getProperties(String key)(Code)(Java Doc) public Properties getProperties(String key, Properties defaults)(Code)(Java Doc) public Object getProperty(String key)(Code)(Java Doc) abstract protected Object getPropertyDirect(String key)(Code)(Java Doc) public short getShort(String key)(Code)(Java Doc) public short getShort(String key, short defaultValue)(Code)(Java Doc) public Short getShort(String key, Short defaultValue)(Code)(Java Doc) public String getString(String key)(Code)(Java Doc) public String getString(String key, String defaultValue)(Code)(Java Doc) public String[] getStringArray(String key)(Code)(Java Doc) public Vector getVector(String key)(Code)(Java Doc) public Vector getVector(String key, Vector defaultValue)(Code)(Java Doc) protected String interpolate(String base)(Code)(Java Doc) protected String interpolateHelper(String base, List priorVariables)(Code)(Java Doc) abstract public boolean isEmpty()(Code)(Java Doc) protected List processString(String token)(Code)(Java Doc) public void setProperty(String key, Object value)(Code)(Java Doc) public Configuration subset(String prefix)(Code)(Java Doc) final protected Boolean testBoolean(String value)(Code)(Java Doc)
|
|
|