public class XmlConfig extends IConfig
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
changed |
protected Element |
element |
protected String |
name |
protected XmlConfig |
parent |
MOVE_DOWN, MOVE_FIRST, MOVE_LAST, MOVE_UPcompiledCache, compiler| Constructor and Description |
|---|
XmlConfig()
Constructor for XmlConfig.
|
XmlConfig(Element elementByPath)
Constructor for XmlConfig.
|
XmlConfig(XmlConfig parent,
Element elementByPath)
Constructor for XmlConfig.
|
| Modifier and Type | Method and Description |
|---|---|
XmlConfig |
createConfig(String name)
Create a new config and append it at the end of the list.
|
boolean |
equals(Object obj) |
Document |
getDocument()
getDocument.
|
InputStream |
getInputStream(String key)
Return the input stream of a content resource.
|
String |
getName()
Return a name of this config element could also be null.
|
WritableResourceNode |
getNode(String key)
Returns a inner configuration by the name.
|
String[] |
getNodeKeys()
Return all possible, existing inner configuration names.
|
WritableResourceNode[] |
getNodes()
Return all inner configurations ignoring the name.
|
WritableResourceNode[] |
getNodes(String key)
Return all inner configurations by the given name.
|
WritableResourceNode |
getParent()
return the parent config if possible.
|
String |
getProperty(String key)
Overwrite this function to provide values in string format.
|
String[] |
getPropertyKeys()
Return all existing keys.
|
URL |
getUrl()
getUrl.
|
Element |
getXmlElement()
getXmlElement.
|
boolean |
isConfigChanged()
isConfigChanged.
|
boolean |
isEditable()
Overwrite this function and return true if the property set can be edited.
|
boolean |
isProperty(String name)
Return true if the property exists.
|
int |
moveConfig(ResourceNode config,
int newPos)
Move the position of the configuration in the hole set of configurations.
|
void |
readConfig(Reader file)
readConfig.
|
void |
removeConfig(ResourceNode config)
Remove a config element from the set.
|
void |
removeProperty(String name)
Remove the property field in the list of properties.
|
void |
setProperty(String key,
Object val)
Overwrite this function to allow changes in properties.
|
void |
writeConfig(Writer configStream)
writeConfig.
|
void |
writeConfig(Writer configStream,
boolean intend)
writeConfig.
|
hasContent, isValidesetStringgetExtracted, getExtracted, getExtracted, getInputStream, getNodeByPath, keysgetBoolean, getBoolean, getCalendar, getDate, getDouble, getFloat, getInt, getLong, getNumber, getProperty, getString, getString, iterator, setBoolean, setCalendar, setDate, setDouble, setFloat, setInt, setLong, setNumber, toMapbase, base, createBase, forkBase, installBase, isBase, leaveBase, toStringclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorprotected Element element
protected boolean changed
protected XmlConfig parent
protected String name
public XmlConfig()
Constructor for XmlConfig.
public XmlConfig(Element elementByPath)
Constructor for XmlConfig.
elementByPath - a Element object.public WritableResourceNode getNode(String key)
getNode in class ResourceNodekey - a String object.ResourceNode object.public WritableResourceNode[] getNodes()
getNodes in class ResourceNodeResourceNode objects.public WritableResourceNode[] getNodes(String key)
getNodes in class ResourceNodekey - a String object.ResourceNode objects.public String[] getNodeKeys()
getNodeKeys in class ResourceNodeString objects.public String[] getPropertyKeys()
getPropertyKeys in class ResourceNodeString objects.public void removeProperty(String name)
removeProperty in class IPropertiesname - a String object.public void setProperty(String key, Object val)
setProperty in class IPropertieskey - a String object.val - a Object object.public void writeConfig(Writer configStream, boolean intend) throws Exception
writeConfig.
public XmlConfig createConfig(String name)
createConfig in class WritableResourceNodename - a String object.WritableResourceNode object.public String getProperty(String key)
getProperty in class IPropertieskey - a String object.public boolean isProperty(String name)
isProperty in class IPropertiesname - a String object.public boolean isConfigChanged()
isConfigChanged.
public String getName()
getName in class ResourceNodeString object.public int moveConfig(ResourceNode config, int newPos) throws MException
moveConfig in class WritableResourceNodeconfig - The config object which you want to movenewPos - Absolute new position or one of the move operators MOVE_UP, MOVE_DOWN, MOVE_FIRST, MOVE_LASTMException - if editing is not possible or the position is out of rangepublic void removeConfig(ResourceNode config) throws MException
removeConfig in class WritableResourceNodeconfig - The config object which should be removed.MException - if editing is not possiblepublic boolean isEditable()
isEditable in class IPropertiespublic WritableResourceNode getParent()
getParent in class ResourceNodeResourceNode object.public InputStream getInputStream(String key)
getInputStream in class ResourceNodekey - Name of a rendition or null for the default contentInputStream object.public URL getUrl()
getUrl.
getUrl in class ResourceNodeURL object.Copyright © 2016. All Rights Reserved.