public class PropertiesConfig extends IConfig implements IFlatConfig
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
changed |
protected String |
name |
protected Properties |
properties |
MOVE_DOWN, MOVE_FIRST, MOVE_LAST, MOVE_UPcompiledCache, compiler| Constructor and Description |
|---|
PropertiesConfig() |
PropertiesConfig(Properties config) |
PropertiesConfig(String fill) |
| Modifier and Type | Method and Description |
|---|---|
void |
configRemoved() |
WritableResourceNode |
createConfig(String key)
Create a new config and append it at the end of the list.
|
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.
|
ResourceNode |
getNode(String key)
Returns a inner configuration by the name.
|
String[] |
getNodeKeys()
Return all possible, existing inner configuration names.
|
ResourceNode[] |
getNodes()
Return all inner configurations ignoring the name.
|
ResourceNode[] |
getNodes(String key)
Return all inner configurations by the given name.
|
WritableResourceNode |
getParent()
return the parent config if possible.
|
String |
getProperty(String name)
Overwrite this function to provide values in string format.
|
String[] |
getPropertyKeys()
Return all existing keys.
|
URL |
getUrl() |
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 key)
Remove the property field in the list of properties.
|
void |
setProperty(String key,
Object value)
Overwrite this function to allow changes in properties.
|
void |
writeConfig(Writer os) |
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 Properties properties
protected boolean changed
protected String name
public PropertiesConfig()
public PropertiesConfig(Properties config)
public PropertiesConfig(String fill)
public void writeConfig(Writer os) throws IOException
IOExceptionpublic void readConfig(Reader file) throws IOException
IOExceptionpublic void configRemoved()
public ResourceNode getNode(String key)
ResourceNodegetNode in class ResourceNodepublic ResourceNode[] getNodes(String key)
ResourceNodegetNodes in class ResourceNodepublic ResourceNode[] getNodes()
ResourceNodegetNodes in class ResourceNodepublic String[] getNodeKeys()
ResourceNodegetNodeKeys in class ResourceNodepublic String[] getPropertyKeys()
ResourceNodegetPropertyKeys in class ResourceNodepublic String getProperty(String name)
IPropertiesgetProperty in class IPropertiespublic boolean isProperty(String name)
IPropertiesisProperty in class IPropertiespublic void removeProperty(String key)
IPropertiesremoveProperty in class IPropertiespublic void setProperty(String key, Object value)
IPropertiessetProperty in class IPropertiespublic boolean isConfigChanged()
public String getName()
ResourceNodegetName in class ResourceNodepublic WritableResourceNode createConfig(String key) throws de.mhus.lib.errors.MException
WritableResourceNodecreateConfig in class WritableResourceNodede.mhus.lib.errors.MException - if editing is not possiblepublic 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 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.