T
- The actual (sub-) type of the Properties
to be decorated.public abstract class AbstractResourcePropertiesDecorator<T extends ResourceProperties> extends AbstractPropertiesDecorator<T> implements ResourceProperties
ResourceProperties
and delegates method calls
to them ResourceProperties
.ResourceProperties.MutableResoureProperties, ResourceProperties.ResourcePropertiesBuilder
Properties.MutableProperties, Properties.PropertiesBuilder
org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
org.refcodes.structure.PathMap.MutablePathMap<T>, org.refcodes.structure.PathMap.PathMapBuilder<T>
org.refcodes.structure.Dictionary.MutableDictionary<K,V>
org.refcodes.structure.Keys.MutableKeys<K,V>, org.refcodes.structure.Keys.MutableValues<K,V>
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
org.refcodes.mixin.TypeAccessor.TypeMutator<T>, org.refcodes.mixin.TypeAccessor.TypeProperty<T>
org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
_properties
DEFAULT_COMMENT
Modifier | Constructor and Description |
---|---|
protected |
AbstractResourcePropertiesDecorator()
Make sure to set the _properties member variable!
|
|
AbstractResourcePropertiesDecorator(T aProperties)
Decorates the provided
ResourceProperties with additional
behavior or functionality. |
Modifier and Type | Method and Description |
---|---|
Properties |
reload()
Reloads the
ResourceProperties from the resource to which the
ResourceProperties are attached to (such as a File as of
ResourceProperties.MutableResoureProperties.loadFrom(File) or
ResourceProperties.MutableResoureProperties.saveTo(File) ). |
Properties |
reload(ReloadMode aReloadMode)
Reloads the
ResourceProperties from the resource to which the
ResourceProperties are attached to (such as a File as of
ResourceProperties.MutableResoureProperties.loadFrom(File) or
ResourceProperties.MutableResoureProperties.saveTo(File) ). |
childrenOf, containsKey, get, getDelimiter, isEmpty, keySet, retrieveFrom, retrieveTo, size, toDataStructure, values
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
childrenOf, containsValue, getDelimiter, getType, retrieve, retrieveFrom, retrieveTo, toMap, toProperties, toPropertyPath
toInstance, toInstance, toType, toType
directories, directories, entries, entries, fromExternalKey, getArray, getArray, getRootPath, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toDataStructure, toExternalKey, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPath
containsKey, get, getBoolean, getBoolean, getByte, getByte, getCharacter, getCharacter, getDouble, getDouble, getFloat, getFloat, getInteger, getInteger, getLong, getLong, getShort, getShort, use, useBoolean, useBoolean, useByte, useByte, useDouble, useDouble, useFloat, useFloat, useInteger, useInteger, useLong, useLong, useShort, useShort
protected AbstractResourcePropertiesDecorator()
public AbstractResourcePropertiesDecorator(T aProperties)
ResourceProperties
with additional
behavior or functionality. Changes applied to the provided
ResourceProperties
affect the decorator.aProperties
- The ResourceProperties
to be decorated.public Properties reload() throws IOException, IllegalStateException, ParseException
ResourceProperties
from the resource to which the
ResourceProperties
are attached to (such as a File
as of
ResourceProperties.MutableResoureProperties.loadFrom(File)
or
ResourceProperties.MutableResoureProperties.saveTo(File)
).
In case the resource (such as an InputStream
) does not support
reloading, then an IllegalStateException
is thrown.
Properties existing in the attached resource as well in the
Properties
itself are replaced. Properties existing in the
attached resource but not(!) in the Properties
itself are not(!)
removed. Use ResourceProperties.reload(ReloadMode)
with an argument of
true
(~ orphan removal) to remove properties not existing in
the resource.reload
in interface ResourceProperties
Properties
as loaded from the resource and applied to
this instance.IOException
- thrown in case accessing the resource encountered an
I/O problem.IllegalStateException
- in case the attached resource does not
support reloading.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.public Properties reload(ReloadMode aReloadMode) throws IOException, IllegalStateException, ParseException
ResourceProperties
from the resource to which the
ResourceProperties
are attached to (such as a File
as of
ResourceProperties.MutableResoureProperties.loadFrom(File)
or
ResourceProperties.MutableResoureProperties.saveTo(File)
).
In case the resource (such as an InputStream
) does not support
reloading, then an IllegalStateException
is thrown.
Properties existing in the attached resource as well in the
Properties
itself are replaced.
When "orphan removal" is set to false
, then properties
existing in the attached resource but not(!) in the Properties
itself are not(!) removed. When "orphan removal" is set to
true
, then properties existing in the attached resource but
not(!) in the Properties
itself are(!) removed.reload
in interface ResourceProperties
aReloadMode
- when set to ReloadMode.ORPHAN_REMOVAL
, then
properties existing in the attached resource but not(!) in the
Properties
itself are(!) removed. Else properties not
existing in the attached resource are kept.Properties
as loaded from the resource and applied to
this instance.IOException
- thrown in case accessing the resource encountered an
I/O problem.IllegalStateException
- in case the attached resource does not
support reloading.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.Copyright © 2018. All rights reserved.