Package de.mhus.lib.core.directory
Class WritableResourceNode<W extends WritableResourceNode<W>>
- java.lang.Object
-
- de.mhus.lib.core.MLog
-
- de.mhus.lib.core.lang.MObject
-
- de.mhus.lib.core.AbstractProperties
-
- de.mhus.lib.core.directory.ResourceNode<W>
-
- de.mhus.lib.core.directory.WritableResourceNode<W>
-
- All Implemented Interfaces:
ILog,IProperties,IReadProperties,MNlsProvider,Nls,Serializable,Iterable<Map.Entry<String,Object>>,Map<String,Object>
- Direct Known Subclasses:
IConfig
public abstract class WritableResourceNode<W extends WritableResourceNode<W>> extends ResourceNode<W>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intMOVE_DOWNstatic intMOVE_FIRSTstatic intMOVE_LASTstatic intMOVE_UP-
Fields inherited from class de.mhus.lib.core.directory.ResourceNode
compiledCache, compiler
-
-
Constructor Summary
Constructors Constructor Description WritableResourceNode()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract WritableResourceNode<W>createConfig(String key)Create a new config and append it at the end of the list.abstract intmoveConfig(W config, int newPos)Move the position of the configuration in the hole set of configurations.abstract voidremoveConfig(W config)Remove a config element from the set.voidsetString(String name, String value)-
Methods inherited from class de.mhus.lib.core.directory.ResourceNode
containsValue, dump, entrySet, getExtracted, getExtracted, getExtracted, getInputStream, getInputStream, getName, getNode, getNodeByPath, getNodeKeys, getNodes, getNodes, getParent, getPropertyKeys, getRenditionProperties, getRenditionProperties, getRenditions, getUrl, hasContent, isValid, keys, size, values
-
Methods inherited from class de.mhus.lib.core.AbstractProperties
containsKey, get, getBoolean, getBoolean, getCalendar, getDate, getDouble, getFloat, getFormatted, getInt, getLong, getNumber, getProperty, getString, getString, isEditable, isEmpty, isProperty, iterator, keySet, put, putAll, putReadProperties, remove, removeProperty, setBoolean, setCalendar, setDate, setDouble, setFloat, setInt, setLong, setNumber, setProperty, toMap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.mhus.lib.core.IProperties
clear
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Field Detail
-
MOVE_UP
public static final int MOVE_UP
- See Also:
- Constant Field Values
-
MOVE_DOWN
public static final int MOVE_DOWN
- See Also:
- Constant Field Values
-
MOVE_FIRST
public static final int MOVE_FIRST
- See Also:
- Constant Field Values
-
MOVE_LAST
public static final int MOVE_LAST
- See Also:
- Constant Field Values
-
-
Method Detail
-
createConfig
public abstract WritableResourceNode<W> createConfig(String key) throws de.mhus.lib.errors.MException
Create a new config and append it at the end of the list. After creation the element is already at the end of the list.- Parameters:
key-- Returns:
- new config node
- Throws:
de.mhus.lib.errors.MException- if editing is not possible
-
moveConfig
public abstract int moveConfig(W config, int newPos) throws de.mhus.lib.errors.MException
Move the position of the configuration in the hole set of configurations. If the config is not part of the set it will throw an exception. The first position is 0.- Parameters:
config- The config object which you want to movenewPos- Absolute new position or one of the move operators MOVE_UP, MOVE_DOWN, MOVE_FIRST, MOVE_LAST- Returns:
- The new pos of the config
- Throws:
de.mhus.lib.errors.MException- if editing is not possible or the position is out of range
-
removeConfig
public abstract void removeConfig(W config) throws de.mhus.lib.errors.MException
Remove a config element from the set. If the config element is not part of the set it will not throw an error.- Parameters:
config- The config object which should be removed.- Throws:
de.mhus.lib.errors.MException- if editing is not possible
-
setString
public void setString(String name, String value)
- Specified by:
setStringin interfaceIProperties- Overrides:
setStringin classAbstractProperties
-
-