public class DirectoryToConfigWrapper extends IConfig
DirectoryToConfigWrapper class.
MOVE_DOWN, MOVE_FIRST, MOVE_LAST, MOVE_UPcompiledCache, compiler| Constructor and Description |
|---|
DirectoryToConfigWrapper(WritableResourceNode node)
Constructor for DirectoryToConfigWrapper.
|
| Modifier and Type | Method and Description |
|---|---|
WritableResourceNode |
createConfig(String key)
Create a new config and append it at the end of the list.
|
boolean |
equals(Object obj) |
boolean |
getBoolean(String name,
boolean def)
getBoolean.
|
Calendar |
getCalendar(String name)
getCalendar.
|
Date |
getDate(String name)
getDate.
|
double |
getDouble(String name,
double def)
getDouble.
|
String |
getExtracted(String key)
Returns a compiled and executed string.
|
String |
getExtracted(String key,
String def)
getExtracted.
|
float |
getFloat(String name,
float def)
getFloat.
|
InputStream |
getInputStream(String key)
Return the input stream of a content resource.
|
int |
getInt(String name,
int def)
getInt.
|
long |
getLong(String name,
long def)
getLong.
|
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.
|
Number |
getNumber(String name,
Number def)
getNumber.
|
ResourceNode |
getParent()
return the parent config if possible.
|
Object |
getProperty(String name)
Overwrite this function to provide values in string format.
|
int |
getProperty(String name,
int def)
getProperty.
|
String[] |
getPropertyKeys()
Return all existing keys.
|
String |
getString(String name,
String def)
getString.
|
URL |
getUrl()
getUrl.
|
int |
hashCode() |
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.
|
Iterator<Map.Entry<String,Object>> |
iterator() |
Set<String> |
keys()
keys.
|
int |
moveConfig(ResourceNode config,
int newPos)
Move the position of the configuration in the hole set of configurations.
|
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 |
setBoolean(String name,
boolean value)
setBoolean.
|
void |
setCalendar(String name,
Calendar value)
setCalendar.
|
void |
setDate(String name,
Date value)
setDate.
|
void |
setDouble(String name,
double value)
setDouble.
|
void |
setFloat(String name,
float value)
setFloat.
|
void |
setInt(String name,
int value)
setInt.
|
void |
setLong(String name,
long value)
setLong.
|
void |
setNumber(String name,
Number value)
setNumber.
|
void |
setProperty(String key,
Object value)
Overwrite this function to allow changes in properties.
|
void |
setString(String name,
String value)
setString.
|
String |
toString() |
hasContent, isValidegetExtracted, getInputStream, getNodeByPathgetBoolean, getString, toMapbase, base, createBase, forkBase, installBase, isBase, leaveBaseclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic DirectoryToConfigWrapper(WritableResourceNode node)
Constructor for DirectoryToConfigWrapper.
node - a WritableResourceNode object.public Object getProperty(String name)
getProperty in class IPropertiesname - a String object.public WritableResourceNode createConfig(String key) throws MException
createConfig in class WritableResourceNodekey - a String object.WritableResourceNode object.MException - if editing is not possiblepublic int getProperty(String name, int def) throws MException
getProperty.
getProperty in class IPropertiesname - a String object.def - a int.MException - if any.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 String getString(String name, String def)
getString.
getString in class IPropertiesname - a String object.def - a String object.String object.public String[] getPropertyKeys()
getPropertyKeys in class ResourceNodeString objects.public ResourceNode getNode(String key)
getNode in class ResourceNodekey - a String object.ResourceNode object.public boolean getBoolean(String name, boolean def)
getBoolean.
getBoolean in class IPropertiesname - a String object.def - a boolean.public void removeConfig(ResourceNode config) throws MException
removeConfig in class WritableResourceNodeconfig - The config object which should be removed.MException - if editing is not possiblepublic ResourceNode[] getNodes()
getNodes in class ResourceNodeResourceNode objects.public int getInt(String name, int def)
getInt.
getInt in class IPropertiesname - a String object.def - a int.public ResourceNode[] getNodes(String key)
getNodes in class ResourceNodekey - a String object.ResourceNode objects.public void setString(String name, String value)
setString.
setString in class WritableResourceNodename - a String object.value - a String object.public long getLong(String name, long def)
getLong.
getLong in class IPropertiesname - a String object.def - a long.public String[] getNodeKeys()
getNodeKeys in class ResourceNodeString objects.public String getName() throws MException
getName in class ResourceNodeString object.MException - if any.public float getFloat(String name, float def)
getFloat.
getFloat in class IPropertiesname - a String object.def - a float.public InputStream getInputStream(String key)
getInputStream in class ResourceNodekey - Name of a rendition or null for the default contentInputStream object.public String getExtracted(String key) throws MException
getExtracted in class ResourceNodekey - a String object.String object.MException - if any.StringCompilerpublic double getDouble(String name, double def)
getDouble.
getDouble in class IPropertiesname - a String object.def - a double.public Calendar getCalendar(String name) throws MException
getCalendar.
getCalendar in class IPropertiesname - a String object.Calendar object.MException - if any.public String getExtracted(String key, String def) throws MException
getExtracted.
getExtracted in class ResourceNodekey - a String object.def - a String object.String object.MException - if any.public Date getDate(String name)
getDate.
getDate in class IPropertiesname - a String object.Date object.public ResourceNode getParent()
getParent in class ResourceNodeResourceNode object.public Set<String> keys()
keys.
keys in class ResourceNodeSet object.public void setInt(String name, int value)
setInt.
setInt in class IPropertiesname - a String object.value - a int.public void setLong(String name, long value)
setLong.
setLong in class IPropertiesname - a String object.value - a long.public void setDouble(String name, double value)
setDouble.
setDouble in class IPropertiesname - a String object.value - a double.public void setFloat(String name, float value)
setFloat.
setFloat in class IPropertiesname - a String object.value - a float.public void setBoolean(String name, boolean value)
setBoolean.
setBoolean in class IPropertiesname - a String object.value - a boolean.public void setCalendar(String name, Calendar value)
setCalendar.
setCalendar in class IPropertiesname - a String object.value - a Calendar object.public void setDate(String name, Date value)
setDate.
setDate in class IPropertiesname - a String object.value - a Date object.public void setNumber(String name, Number value)
setNumber.
setNumber in class IPropertiesname - a String object.value - a Number object.public Number getNumber(String name, Number def)
getNumber.
getNumber in class IPropertiesname - a String object.def - a Number object.Number object.public boolean isProperty(String name)
isProperty in class IPropertiesname - a String object.public void removeProperty(String key)
removeProperty in class IPropertieskey - a String object.public void setProperty(String key, Object value)
setProperty in class IPropertieskey - a String object.value - a Object object.public boolean isEditable()
isEditable in class IPropertiespublic URL getUrl()
getUrl.
getUrl in class ResourceNodeURL object.Copyright © 2016. All Rights Reserved.