Class AbstractObfuscationPropertiesBuilderDecorator
- java.lang.Object
-
- org.refcodes.configuration.AbstractPropertiesDecorator<T>
-
- org.refcodes.configuration.AbstractPropertiesBuilderDecorator<org.refcodes.configuration.Properties.PropertiesBuilder>
-
- org.refcodes.configuration.ext.obfuscation.AbstractObfuscationPropertiesBuilderDecorator
-
- All Implemented Interfaces:
java.util.Map<java.lang.String,T>
,ObfuscationProperties
,ObfuscationProperties.MutableObfuscationProperties
,ObfuscationProperties.ObfuscationPropertiesBuilder
,org.refcodes.configuration.Properties
,org.refcodes.configuration.Properties.MutableProperties
,org.refcodes.configuration.Properties.PropertiesBuilder
,org.refcodes.mixin.AnnotatorAccessor
,org.refcodes.mixin.DecryptPrefixAccessor
,org.refcodes.mixin.DecryptPrefixAccessor.DecryptPrefixBuilder<java.lang.String>
,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<java.lang.String>
,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,T>
,org.refcodes.structure.Dictionary.MutableDictionary<java.lang.String,T>
,org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<java.lang.String,T,org.refcodes.structure.PathMap.PathMapBuilder<T>>
,org.refcodes.structure.Keys<java.lang.String,T>
,org.refcodes.structure.Keys.MutableKeys<java.lang.String,T>
,org.refcodes.structure.Keys.MutableValues<java.lang.String,T>
,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<java.lang.String>
,org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin
,org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
- Direct Known Subclasses:
ObfuscationPropertiesBuilderDecorator
public abstract class AbstractObfuscationPropertiesBuilderDecorator extends org.refcodes.configuration.AbstractPropertiesBuilderDecorator<org.refcodes.configuration.Properties.PropertiesBuilder> implements ObfuscationProperties.ObfuscationPropertiesBuilder
Base implementation for aObfuscationProperties.ObfuscationPropertiesBuilder
flavor.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.AnnotatorAccessor
org.refcodes.mixin.AnnotatorAccessor.AnnotatorBuilder<B extends org.refcodes.mixin.AnnotatorAccessor.AnnotatorBuilder<B>>, org.refcodes.mixin.AnnotatorAccessor.AnnotatorMutator, org.refcodes.mixin.AnnotatorAccessor.AnnotatorProperty
-
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.configuration.ext.obfuscation.ObfuscationProperties
ObfuscationProperties.MutableObfuscationProperties, ObfuscationProperties.ObfuscationPropertiesBuilder
-
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
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
_decryptPrefix
protected java.lang.String
_encryptPrefix
-
Constructor Summary
Constructors Constructor Description AbstractObfuscationPropertiesBuilderDecorator(org.refcodes.configuration.Properties.PropertiesBuilder aProperties)
Decorates the providedProperties
with additionalObfuscationProperties
behavior or functionality.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
encryptAll()
Encrypts all values prefixed accordingly as returned bygetEncryptPrefix()
.protected java.util.Set<java.lang.String>
encryptSet()
Returns aSet
of all the keys which's values are to be encrypted, e.g. which's values are prefixed with the prefix as returned bygetEncryptPrefix()
.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, getAnnotator, getDelimiter, getProperties, isEmpty, keySet, retrieveFrom, retrieveTo, setProperties, size, toDataStructure, values
-
Methods inherited from interface org.refcodes.structure.CanonicalMap
getBoolean, getBoolean, getBooleanOr, getBooleanOr, getByte, getByte, getByteOr, getByteOr, getCharacter, getCharacter, getCharacterOr, getCharacterOr, getDouble, getDouble, getDoubleOr, getDoubleOr, getFloat, getFloat, getFloatOr, getFloatOr, getInteger, getInteger, getIntegerOr, getIntegerOr, getLong, getLong, getLongOr, getLongOr, getShort, getShort, getShortOr, getShortOr, toInstance, toInstance, toMap, toProperties, toType, toType
-
Methods inherited from interface org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
withMerge, withMerge, withMergeBetween, withMergeBetween, withMergeBetween, withMergeBetween, withMergeBetween, withMergeBetween, withMergeBetween, withMergeBetween, withMergeBetween, withMergeBetween, withMergeFrom, withMergeFrom, withMergeFrom, withMergeFrom, withMergeFrom, withMergeFrom, withMergeFrom, withMergeFrom, withMergeFrom, withMergeFrom, withMergeTo, withMergeTo, withMergeTo, withMergeTo, withMergeTo, withMergeTo, withMergeTo, withMergeTo, withMergeTo, withMergeTo
-
Methods inherited from interface org.refcodes.structure.CanonicalMap.MutableCanonicalMap
insert, insertBetween, insertFrom, insertTo, put, put, putAll, putBoolean, putBoolean, putByte, putByte, putDouble, putDouble, putFloat, putFloat, putInteger, putInteger, putLong, putLong, putShort, putShort, removeFrom, toDump, toSourceCode, toSourceCode
-
Methods inherited from interface org.refcodes.configuration.ext.obfuscation.ObfuscationProperties.ObfuscationPropertiesBuilder
withDecryptPrefix, withEncryptPrefix, withInsert, withInsertBetween, withInsertFrom, withInsertTo, withPut, withPut, withPut, withPut, withPut, withPutBoolean, withPutBoolean, withPutBoolean, withPutByte, withPutByte, withPutByte, withPutDouble, withPutDouble, withPutDouble, withPutFloat, withPutFloat, withPutFloat, withPutInteger, withPutInteger, withPutInteger, withPutLong, withPutLong, withPutLong, withPutShort, withPutShort, withPutShort, withRemoveFrom
-
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
children, children, children, children, children, children, containsKey, containsKey, containsKey, dirs, dirs, dirs, dirs, dirs, dirs, findPaths, fromExternalPath, get, get, get, getArray, getArray, getArray, getArray, getArray, getArrayIndexes, getArrayIndexes, getArrayIndexes, getArrayIndexes, getArrayIndexes, getDirAt, getDirAt, getDirAt, getDirAt, getDirIndexes, getDirIndexes, getDirIndexes, getDirIndexes, getDirIndexes, getRootPath, getValueAt, getValueAt, getValueAt, getValueAt, getValueAt, getValueAt, hasChildren, hasChildren, hasChildren, hasChildren, hasChildren, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasParentPath, hasPath, hasPath, hasPath, hasPath, hasValueAt, hasValueAt, hasValueAt, hasValueAt, hasValueAt, hasValueAt, hasValueAt, hasValueAt, isArray, isArray, isArray, isArray, isArray, isArray, isArrayIndex, isArrayIndex, isArrayIndex, isArrayIndex, isArrayIndex, isArrayIndex, isChild, isChild, isChild, isChild, isDir, isDir, isDir, isDir, isDir, isDirIndex, isDirIndex, isDirIndex, isDirIndex, isDirIndex, isEqualTo, isLeaf, isLeaf, isLeaf, isLeaf, isLeaf, isRootPath, keySet, lastArrayIndex, lastArrayIndex, lastArrayIndex, lastArrayIndex, lastArrayIndex, lastArrayIndex, lastDirIndex, lastDirIndex, lastDirIndex, lastDirIndex, lastDirIndex, lastDirIndex, leaves, leaves, leaves, leaves, leaves, leaves, nextArrayIndex, nextArrayIndex, nextArrayIndex, nextArrayIndex, nextArrayIndex, nextArrayIndex, nextDirIndex, nextDirIndex, nextDirIndex, nextDirIndex, nextDirIndex, nextDirIndex, paths, paths, paths, paths, paths, paths, queryPaths, queryPaths, queryPaths, queryPaths, queryPaths, sortedKeys, toDataStructure, toDataStructure, toExternalPath, toLeaf, toMap, toNormalizedPath, toParentPath, toPath, toPath, toPath, toPathElements, toPathList, toPathStack, toPropertyPath
-
Methods inherited from interface org.refcodes.structure.PathMap.MutablePathMap
appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendValueTo, appendValueTo, appendValueTo, appendValueTo, appendValueTo, appendValueTo, delete, delete, delete, delete, insert, insert, insertBetween, insertBetween, insertBetween, insertBetween, insertBetween, insertBetween, insertBetween, insertBetween, insertBetween, insertBetween, insertFrom, insertFrom, insertFrom, insertFrom, insertFrom, insertFrom, insertFrom, insertFrom, insertFrom, insertFrom, insertTo, insertTo, insertTo, insertTo, insertTo, insertTo, insertTo, insertTo, insertTo, insertTo, merge, merge, mergeBetween, mergeBetween, mergeBetween, mergeBetween, mergeBetween, mergeBetween, mergeBetween, mergeBetween, mergeBetween, mergeBetween, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeTo, mergeTo, mergeTo, mergeTo, mergeTo, mergeTo, mergeTo, mergeTo, mergeTo, mergeTo, put, putArray, putArray, putArray, putArray, putArray, putArray, putArray, putArray, putArray, putArray, putArray, putArray, putValueAt, putValueAt, putValueAt, putValueAt, putValueAt, remove, remove, remove, removeValueAt, removeValueAt, removeValueAt, removeValueAt, removeValueAt
-
Methods inherited from interface org.refcodes.configuration.Properties
getAnnotator, getDelimiter, getType, query, query, query, query, queryBetween, queryBetween, queryBetween, queryBetween, queryBetween, queryFrom, queryFrom, queryFrom, queryFrom, queryFrom, queryTo, queryTo, queryTo, queryTo, queryTo, retrieveBetween, retrieveBetween, retrieveBetween, retrieveBetween, retrieveBetween, retrieveFrom, retrieveFrom, retrieveFrom, retrieveFrom, retrieveFrom, retrieveTo, retrieveTo, retrieveTo, retrieveTo, retrieveTo
-
Methods inherited from interface org.refcodes.configuration.Properties.MutableProperties
containsValue, delete, delete, getDirAt, getDirAt, insert, insertBetween, insertFrom, insertTo, put, putAll, putAll, putAll, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, removeAll, removeAll, removeAll, removeAll, removeAll, removeDirAt, removeDirAt, removeDirAt, removeDirAt, removeDirAt, removeFrom, removeFrom, removeFrom, removeFrom, removePaths, removePaths
-
Methods inherited from interface org.refcodes.configuration.Properties.PropertiesBuilder
withInsert, withInsertBetween, withInsertBetween, withInsertBetween, withInsertBetween, withInsertBetween, withInsertBetween, withInsertBetween, withInsertBetween, withInsertBetween, withInsertFrom, withInsertFrom, withInsertFrom, withInsertFrom, withInsertFrom, withInsertFrom, withInsertFrom, withInsertFrom, withInsertFrom, withInsertTo, withInsertTo, withInsertTo, withInsertTo, withInsertTo, withInsertTo, withInsertTo, withInsertTo, withInsertTo, withPut, withPutBoolean, withPutBoolean, withPutByte, withPutByte, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDouble, withPutDouble, withPutFloat, withPutFloat, withPutInteger, withPutInteger, withPutLong, withPutLong, withPutShort, withPutShort, withRemoveFrom, withRemoveFrom, withRemoveFrom, withRemoveFrom
-
Methods inherited from interface org.refcodes.structure.PropertiesAccessorMixin
asArray, asArray, asArray, asArray, asBooleanArray, asBooleanArray, asBooleanArray, asBooleanArray, asByteArray, asByteArray, asByteArray, asByteArray, asCharacterArray, asCharacterArray, asCharacterArray, asCharacterArray, asDoubleArray, asDoubleArray, asDoubleArray, asDoubleArray, asFloatArray, asFloatArray, asFloatArray, asFloatArray, asIntegerArray, asIntegerArray, asIntegerArray, asIntegerArray, asLongArray, asLongArray, asLongArray, asLongArray, asShortArray, asShortArray, asShortArray, asShortArray, getBoolean, getBoolean, getBooleanOr, getBooleanOr, getByte, getByte, getByteOr, getByteOr, getCharacter, getCharacter, getCharacterOr, getCharacterOr, getDouble, getDouble, getDoubleOr, getDoubleOr, getFloat, getFloat, getFloatOr, getFloatOr, getInteger, getInteger, getIntegerOr, getIntegerOr, getLong, getLong, getLongOr, getLongOr, getShort, getShort, getShortOr, getShortOr
-
-
-
-
Constructor Detail
-
AbstractObfuscationPropertiesBuilderDecorator
public AbstractObfuscationPropertiesBuilderDecorator(org.refcodes.configuration.Properties.PropertiesBuilder aProperties)
Decorates the providedProperties
with additionalObfuscationProperties
behavior or functionality. Changes applied to the providedProperties
affect the decorator.- Parameters:
aProperties
- TheProperties
to be decorated.
-
-
Method Detail
-
getEncryptPrefix
public java.lang.String getEncryptPrefix()
- Specified by:
getEncryptPrefix
in interfaceorg.refcodes.mixin.EncryptPrefixAccessor
-
setEncryptPrefix
public void setEncryptPrefix(java.lang.String aEncryptPrefix)
- Specified by:
setEncryptPrefix
in interfaceorg.refcodes.mixin.EncryptPrefixAccessor.EncryptPrefixMutator
-
getDecryptPrefix
public java.lang.String getDecryptPrefix()
- Specified by:
getDecryptPrefix
in interfaceorg.refcodes.mixin.DecryptPrefixAccessor
-
setDecryptPrefix
public void setDecryptPrefix(java.lang.String aDecryptPrefix)
- Specified by:
setDecryptPrefix
in interfaceorg.refcodes.mixin.DecryptPrefixAccessor.DecryptPrefixMutator
-
get
public java.lang.String get(java.lang.Object aKey)
- Specified by:
get
in interfaceorg.refcodes.structure.Keys<java.lang.String,T extends java.lang.Object>
- Specified by:
get
in interfacejava.util.Map<java.lang.String,T extends java.lang.Object>
- Overrides:
get
in classorg.refcodes.configuration.AbstractPropertiesDecorator<org.refcodes.configuration.Properties.PropertiesBuilder>
-
put
public java.lang.String put(java.lang.String aKey, java.lang.String aValue)
- Specified by:
put
in interfaceorg.refcodes.structure.Keys.MutableValues<java.lang.String,T extends java.lang.Object>
- Specified by:
put
in interfacejava.util.Map<java.lang.String,T extends java.lang.Object>
- Overrides:
put
in classorg.refcodes.configuration.AbstractPropertiesBuilderDecorator<org.refcodes.configuration.Properties.PropertiesBuilder>
-
encryptAll
protected boolean encryptAll()
Encrypts all values prefixed accordingly as returned bygetEncryptPrefix()
. 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 save the properties yourself to persist the changes.- Returns:
- True when properties have been changed (encrypted) by this method.
-
encryptSet
protected java.util.Set<java.lang.String> encryptSet()
Returns aSet
of all the keys which's values are to be encrypted, e.g. which's values are prefixed with the prefix as returned bygetEncryptPrefix()
.- Returns:
- The key
Set
of all to be encrypted values.
-
-