| 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() |
XmlConfig(Element elementByPath) |
XmlConfig(XmlConfig parent,
Element elementByPath) |
| 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() |
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() |
Element |
getXmlElement() |
boolean |
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) |
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) |
void |
writeConfig(Writer configStream,
boolean intend) |
setStringgetExtracted, getExtracted, getExtracted, getInputStream, keysgetBoolean, getBoolean, getCalendar, getDate, getDouble, getFloat, getInt, getLong, getNumber, getProperty, getString, getString, iterator, setBoolean, setCalendar, setDate, setDouble, setFloat, setInt, setLong, setNumberbase, base, createBase, forkBase, installBase, isBase, leaveBase, toStringprotected Element element
protected boolean changed
protected XmlConfig parent
protected String name
public XmlConfig()
public XmlConfig(Element elementByPath)
public Document getDocument()
public WritableResourceNode getNode(String key)
ResourceNodegetNode in class ResourceNodepublic WritableResourceNode[] getNodes()
ResourceNodegetNodes in class ResourceNodepublic WritableResourceNode[] getNodes(String key)
ResourceNodegetNodes in class ResourceNodepublic String[] getNodeKeys()
ResourceNodegetNodeKeys in class ResourceNodepublic String[] getPropertyKeys()
ResourceNodegetPropertyKeys in class ResourceNodepublic void removeProperty(String name)
IPropertiesremoveProperty in class IPropertiespublic void setProperty(String key, Object val)
IPropertiessetProperty in class IPropertiespublic void writeConfig(Writer configStream, boolean intend) throws Exception
Exceptionpublic XmlConfig createConfig(String name)
WritableResourceNodecreateConfig in class WritableResourceNodepublic String getProperty(String key)
IPropertiesgetProperty in class IPropertiespublic boolean isProperty(String name)
IPropertiesisProperty in class IPropertiespublic boolean isConfigChanged()
public String getName()
ResourceNodegetName in class ResourceNodepublic int moveConfig(ResourceNode config, int newPos) throws de.mhus.lib.errors.MException
WritableResourceNodemoveConfig 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_LASTde.mhus.lib.errors.MException - if editing is not possible or the position is out of rangepublic void removeConfig(ResourceNode config) throws de.mhus.lib.errors.MException
WritableResourceNoderemoveConfig in class WritableResourceNodeconfig - The config object which should be removed.de.mhus.lib.errors.MException - if editing is not possiblepublic boolean isEditable()
IPropertiesisEditable in class IPropertiespublic WritableResourceNode getParent()
ResourceNodegetParent in class ResourceNodepublic Element getXmlElement()
public InputStream getInputStream(String key)
ResourceNodegetInputStream in class ResourceNodekey - Name of a rendition or null for the default contentpublic URL getUrl()
getUrl in class ResourceNodeCopyright © 2014. All rights reserved.