Class AbstractResourcePropertiesDecorator<T extends ResourceProperties>

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.refcodes.structure.CanonicalMap

        org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
      • Nested classes/interfaces inherited from interface org.refcodes.mixin.DelimiterAccessor

        org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
      • Nested classes/interfaces inherited from interface org.refcodes.structure.Dictionary

        org.refcodes.structure.Dictionary.MutableDictionary<K extends java.lang.Object,V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface org.refcodes.structure.Keys

        org.refcodes.structure.Keys.MutableKeys<K extends java.lang.Object,V extends java.lang.Object>, org.refcodes.structure.Keys.MutableValues<K extends java.lang.Object,V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface org.refcodes.structure.PathMap

        org.refcodes.structure.PathMap.MutablePathMap<T extends java.lang.Object>, org.refcodes.structure.PathMap.PathMapBuilder<T extends java.lang.Object>
      • Nested classes/interfaces inherited from interface org.refcodes.structure.PropertiesAccessorMixin

        org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T extends java.lang.Object>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
      • Nested classes/interfaces inherited from interface org.refcodes.mixin.TypeAccessor

        org.refcodes.mixin.TypeAccessor.TypeMutator<T extends java.lang.Object>, org.refcodes.mixin.TypeAccessor.TypeProperty<T extends java.lang.Object>
    • Constructor Detail

      • AbstractResourcePropertiesDecorator

        protected AbstractResourcePropertiesDecorator()
        Make sure to set the getProperties() member variable!
      • AbstractResourcePropertiesDecorator

        public AbstractResourcePropertiesDecorator​(T aProperties)
        Decorates the provided ResourceProperties with additional behavior or functionality. Changes applied to the provided ResourceProperties affect the decorator.
        Parameters:
        aProperties - The ResourceProperties to be decorated.
    • Method Detail

      • reload

        public Properties reload​(ReloadMode aReloadMode)
                          throws java.io.IOException,
                                 java.lang.IllegalStateException,
                                 java.text.ParseException
        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)). 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.
        Specified by:
        reload in interface ResourceProperties
        Parameters:
        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.
        Returns:
        The Properties as loaded from the resource and applied to this instance.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.