Class AbstractObfuscationResourcePropertiesBuilderDecorator

  • All Implemented Interfaces:
    java.io.Flushable, java.util.Map<java.lang.String,java.lang.String>, org.refcodes.component.Flushable, org.refcodes.component.Flushable.FlushBuilder<org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder>, ObfuscationProperties, ObfuscationProperties.MutableObfuscationProperties, ObfuscationProperties.ObfuscationPropertiesBuilder, ObfuscationResourceProperties, ObfuscationResourceProperties.MutableObfuscationResourceProperties, ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder, org.refcodes.configuration.Properties, org.refcodes.configuration.Properties.MutableProperties, org.refcodes.configuration.Properties.PropertiesBuilder, org.refcodes.configuration.ResourceProperties, org.refcodes.configuration.ResourceProperties.MutableResoureProperties, org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder, org.refcodes.mixin.DecryptPrefixAccessor, org.refcodes.mixin.DecryptPrefixAccessor.DecryptPrefixBuilder<ObfuscationProperties.ObfuscationPropertiesBuilder>, org.refcodes.mixin.DecryptPrefixAccessor.DecryptPrefixMutator, org.refcodes.mixin.DecryptPrefixAccessor.DecryptPrefixProperty, org.refcodes.mixin.DelimiterAccessor, org.refcodes.mixin.Dumpable, org.refcodes.mixin.EncryptPrefixAccessor, org.refcodes.mixin.EncryptPrefixAccessor.EncryptPrefixBuilder<ObfuscationProperties.ObfuscationPropertiesBuilder>, org.refcodes.mixin.EncryptPrefixAccessor.EncryptPrefixMutator, org.refcodes.mixin.EncryptPrefixAccessor.EncryptPrefixProperty, org.refcodes.mixin.TypeAccessor<java.lang.String>, org.refcodes.structure.CanonicalMap, org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMap, org.refcodes.structure.Clearable, org.refcodes.structure.Containable, org.refcodes.structure.Dictionary<java.lang.String,java.lang.String>, org.refcodes.structure.Dictionary.MutableDictionary<java.lang.String,java.lang.String>, org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<java.lang.String,java.lang.String,org.refcodes.structure.PathMap.PathMapBuilder<java.lang.String>>, org.refcodes.structure.Keys<java.lang.String,java.lang.String>, org.refcodes.structure.Keys.MutableKeys<java.lang.String,java.lang.String>, org.refcodes.structure.Keys.MutableValues<java.lang.String,java.lang.String>, org.refcodes.structure.PathMap<java.lang.String>, org.refcodes.structure.PathMap.MutablePathMap<java.lang.String>, org.refcodes.structure.PathMap.PathMapBuilder<java.lang.String>, org.refcodes.structure.PropertiesAccessorMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
    Direct Known Subclasses:
    ObfuscationResourcePropertiesBuilderDecorator

    public abstract class AbstractObfuscationResourcePropertiesBuilderDecorator
    extends org.refcodes.configuration.AbstractResourcePropertiesBuilderDecorator<org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder>
    implements ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
    • 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.DecryptPrefixAccessor

        org.refcodes.mixin.DecryptPrefixAccessor.DecryptPrefixBuilder<B extends org.refcodes.mixin.DecryptPrefixAccessor.DecryptPrefixBuilder<B>>, org.refcodes.mixin.DecryptPrefixAccessor.DecryptPrefixMutator, org.refcodes.mixin.DecryptPrefixAccessor.DecryptPrefixProperty
      • 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.Dictionary.MutableDictionary

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

        org.refcodes.mixin.EncryptPrefixAccessor.EncryptPrefixBuilder<B extends org.refcodes.mixin.EncryptPrefixAccessor.EncryptPrefixBuilder<B>>, org.refcodes.mixin.EncryptPrefixAccessor.EncryptPrefixMutator, org.refcodes.mixin.EncryptPrefixAccessor.EncryptPrefixProperty
      • Nested classes/interfaces inherited from interface org.refcodes.component.Flushable

        org.refcodes.component.Flushable.FlushBuilder<B extends org.refcodes.component.Flushable.FlushBuilder<B>>
      • 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.configuration.Properties

        org.refcodes.configuration.Properties.MutableProperties, org.refcodes.configuration.Properties.PropertiesBuilder
      • 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.configuration.ResourceProperties

        org.refcodes.configuration.ResourceProperties.MutableResoureProperties, org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder
      • 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>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String _decryptPrefix  
      protected java.lang.String _encryptPrefix  
      • Fields inherited from interface org.refcodes.configuration.ResourceProperties

        VALUE_ATTRIBUTES
      • Fields inherited from interface org.refcodes.configuration.ResourceProperties.MutableResoureProperties

        DEFAULT_COMMENT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean encryptAll()
      Encrypts all values prefixed accordingly as returned by getEncryptPrefix().
      protected java.util.Set<java.lang.String> encryptSet()
      Returns a Set of all the keys which's values are to be encrypted, e.g. which's values are prefixed with the prefix as returned by getEncryptPrefix().
      java.lang.String get​(java.lang.Object aKey)
      java.lang.String getDecryptPrefix()
      java.lang.String getEncryptPrefix()
      java.lang.String put​(java.lang.String aKey, java.lang.String aValue)
      void setDecryptPrefix​(java.lang.String aDecryptPrefix)
      void setEncryptPrefix​(java.lang.String aEncryptPrefix)
      • Methods inherited from class org.refcodes.configuration.AbstractPropertiesBuilderDecorator

        clear, containsValue, entrySet, putAll, remove
      • Methods inherited from class org.refcodes.configuration.AbstractPropertiesDecorator

        containsKey, getDelimiter, getProperties, isEmpty, keySet, setProperties, size, toDataStructure, values
      • Methods inherited from class org.refcodes.configuration.AbstractResourcePropertiesBuilderDecorator

        childrenOf, flush, isFlushable, loadFrom, loadFrom, reload, reload, retrieveFrom, retrieveTo, saveTo, saveTo, seekFrom, toSerialized
      • Methods inherited from interface org.refcodes.structure.CanonicalMap

        toInstance, toInstance, toType, toType
      • Methods inherited from interface org.refcodes.structure.CanonicalMap.CanonicalMapBuilder

        withInsert, withInsert, withInsertFrom, withInsertTo
      • Methods inherited from interface org.refcodes.structure.CanonicalMap.MutableCanonicalMap

        insert, insert, insertFrom, insertTo, putAll, toDump, toSourceCode, toSourceCode
      • Methods inherited from interface org.refcodes.structure.Clearable

        clear
      • Methods inherited from interface org.refcodes.structure.Containable

        isEmpty, size
      • Methods inherited from interface org.refcodes.mixin.Dumpable

        toDump
      • Methods inherited from interface org.refcodes.component.Flushable

        flushUnchecked, isFlushable
      • Methods inherited from interface org.refcodes.component.Flushable.FlushBuilder

        withFlush, withFlushUnchecked
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.refcodes.structure.PathMap

        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
      • Methods inherited from interface org.refcodes.structure.PathMap.MutablePathMap

        insert, insert, insert, insert, insertFrom, insertFrom, insertTo, insertTo, put, putArray, putArray, removeAll
      • Methods inherited from interface org.refcodes.structure.PathMap.PathMapBuilder

        withInsert, withInsert, withInsertFrom, withInsertTo
      • Methods inherited from interface org.refcodes.configuration.Properties

        getDelimiter, getType, toMap, toProperties, toPropertyPath
      • Methods inherited from interface org.refcodes.configuration.Properties.MutableProperties

        containsValue, delete, delete, insert, insert, insertFrom, insertTo, put, putAll, putAll, putAll
      • Methods inherited from interface org.refcodes.configuration.Properties.PropertiesBuilder

        childrenOf, retrieve, retrieveFrom, retrieveTo, withInsert, withInsert, withInsertFrom, withInsertTo
      • Methods inherited from interface org.refcodes.structure.PropertiesAccessorMixin

        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
      • Methods inherited from interface org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin

        withPut
      • Methods inherited from interface org.refcodes.configuration.ResourceProperties

        reload, reload
      • Methods inherited from interface org.refcodes.configuration.ResourceProperties.MutableResoureProperties

        fileTo, fileTo, fileTo, fileTo, fileTo, fileTo, fileTo, fileTo, flush, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, parseFrom, parseFrom, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, seekFrom, seekFrom, seekFrom, seekFrom, seekFrom, seekFrom, seekFrom, seekFrom, seekFrom, toSerialized, toSerialized
      • Methods inherited from interface org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder

        withSeekFrom
    • Field Detail

      • _decryptPrefix

        protected java.lang.String _decryptPrefix
      • _encryptPrefix

        protected java.lang.String _encryptPrefix
    • Constructor Detail

      • AbstractObfuscationResourcePropertiesBuilderDecorator

        public AbstractObfuscationResourcePropertiesBuilderDecorator​(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties)
        Decorates the provided ResourceProperties.ResourcePropertiesBuilder with additional ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder behavior or functionality. Changes applied to the provided ResourceProperties.ResourcePropertiesBuilder affect the decorator.
        Parameters:
        aProperties - The ResourceProperties to be decorated.
    • Method Detail

      • getEncryptPrefix

        public java.lang.String getEncryptPrefix()
        Specified by:
        getEncryptPrefix in interface org.refcodes.mixin.EncryptPrefixAccessor
      • setEncryptPrefix

        public void setEncryptPrefix​(java.lang.String aEncryptPrefix)
        Specified by:
        setEncryptPrefix in interface org.refcodes.mixin.EncryptPrefixAccessor.EncryptPrefixMutator
      • getDecryptPrefix

        public java.lang.String getDecryptPrefix()
        Specified by:
        getDecryptPrefix in interface org.refcodes.mixin.DecryptPrefixAccessor
      • setDecryptPrefix

        public void setDecryptPrefix​(java.lang.String aDecryptPrefix)
        Specified by:
        setDecryptPrefix in interface org.refcodes.mixin.DecryptPrefixAccessor.DecryptPrefixMutator
      • get

        public java.lang.String get​(java.lang.Object aKey)
        Specified by:
        get in interface org.refcodes.structure.Keys<java.lang.String,java.lang.String>
        Specified by:
        get in interface java.util.Map<java.lang.String,java.lang.String>
        Overrides:
        get in class org.refcodes.configuration.AbstractPropertiesDecorator<org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder>
      • put

        public java.lang.String put​(java.lang.String aKey,
                                    java.lang.String aValue)
        Specified by:
        put in interface org.refcodes.structure.Keys.MutableValues<java.lang.String,java.lang.String>
        Specified by:
        put in interface java.util.Map<java.lang.String,java.lang.String>
        Overrides:
        put in class org.refcodes.configuration.AbstractPropertiesBuilderDecorator<org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder>
      • encryptAll

        protected boolean encryptAll()
        Encrypts all values prefixed accordingly as returned by getEncryptPrefix(). The properties do not contain any "to-be-encrypted" values any more, them values then are encrypted. The changes are only done "in-memory" and are not applied to the resource. You must AbstractResourcePropertiesBuilderDecorator.flush() or otherwise save the properties to make the changes being reflected in the corresponding resources.
        Returns:
        True when properties have been changed (encrypted) by this method.
      • encryptSet

        protected java.util.Set<java.lang.String> encryptSet()
        Returns a Set of all the keys which's values are to be encrypted, e.g. which's values are prefixed with the prefix as returned by getEncryptPrefix().
        Returns:
        The key Set of all to be encrypted values.