Flushable
, Map<String,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<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<String,String>
, org.refcodes.structure.Dictionary.MutableDictionary<String,String>
, org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<String,String,org.refcodes.structure.PathMap.PathMapBuilder<String>>
, org.refcodes.structure.Keys<String,String>
, org.refcodes.structure.Keys.MutableKeys<String,String>
, org.refcodes.structure.Keys.MutableValues<String,String>
, org.refcodes.structure.PathMap<String>
, org.refcodes.structure.PathMap.MutablePathMap<String>
, org.refcodes.structure.PathMap.PathMapBuilder<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
public class ObfuscationResourcePropertiesBuilderDecorator extends AbstractObfuscationResourcePropertiesBuilderDecorator implements ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
ObfuscationResourcePropertiesBuilderDecorator
represents a
decorator for ResourceProperties.ResourcePropertiesBuilder
instances by implementing the
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
interface.
Properties marked in the resource as "to be decrypted" are decrypted (e.g.
with a host individual key). Those encrypted properties are decrypted
"on-the-fly" (in memory only) upon accessing the according property.
Retrieving a value via AbstractObfuscationResourcePropertiesBuilderDecorator.get(Object)
(or the like), which is prefixed
with "decrypt:" (default), will be decrypted accordingly before passed back
to the caller. The prefix may be changed by invoking the according
implementaion's constructor or the according methods.
Properties marked in the resource as "to be encrypted" by being prefixed with
"encrypt:" (default) are encrypted (e.g. with a host individual key) when
being added and instead are prefixed with "decrypt:" (default). Retrieving a
value via AbstractObfuscationResourcePropertiesBuilderDecorator.get(Object)
(or the like), which is prefixed with
"decrypt:" (default), will be decrypted accordingly before passed back to the
caller. The prefix may be changed by invoking the according implementaion's
constructor.
If the encapsulated ResourceProperties.ResourcePropertiesBuilder
instance can be flushed
as of Flushable.isFlushable()
, then any properties
which have been encrypted as of the "encrypt:" prefix (default) upon
instantiation are written back to the resource, though this time encrypted,
having now the prefix "decrypt:" (default).
By default (if not configured otherwise) the prefix Prefix.DECRYPT
is
used as decrypt prefix (as of Prefix.getPrefix()
). Also by default
(if not configured otherwise) the prefix Prefix.ENCRYPT
is used as
encrypt prefix (as of Prefix.getPrefix()
) constructor or the
according methods.org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
org.refcodes.mixin.DecryptPrefixAccessor.DecryptPrefixBuilder<B extends org.refcodes.mixin.DecryptPrefixAccessor.DecryptPrefixBuilder<B>>, org.refcodes.mixin.DecryptPrefixAccessor.DecryptPrefixMutator, org.refcodes.mixin.DecryptPrefixAccessor.DecryptPrefixProperty
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.structure.Dictionary.MutableDictionary<K extends Object,V extends Object>
org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<K extends Object,V extends Object,B extends org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<K,V,B>>
org.refcodes.mixin.EncryptPrefixAccessor.EncryptPrefixBuilder<B extends org.refcodes.mixin.EncryptPrefixAccessor.EncryptPrefixBuilder<B>>, org.refcodes.mixin.EncryptPrefixAccessor.EncryptPrefixMutator, org.refcodes.mixin.EncryptPrefixAccessor.EncryptPrefixProperty
org.refcodes.component.Flushable.FlushBuilder<B extends org.refcodes.component.Flushable.FlushBuilder<B>>
ObfuscationProperties.MutableObfuscationProperties, ObfuscationProperties.ObfuscationPropertiesBuilder
ObfuscationResourceProperties.MutableObfuscationResourceProperties, ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
org.refcodes.structure.PathMap.MutablePathMap<T extends Object>, org.refcodes.structure.PathMap.PathMapBuilder<T extends Object>
org.refcodes.configuration.Properties.MutableProperties, org.refcodes.configuration.Properties.PropertiesBuilder
org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T extends Object>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
_decryptPrefix, _encryptPrefix
Constructor | Description |
---|---|
ObfuscationResourcePropertiesBuilderDecorator(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties) |
Decorates the provided
ResourceProperties.ResourcePropertiesBuilder with additional
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder behavior or functionality. |
ObfuscationResourcePropertiesBuilderDecorator(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties,
String aSecret) |
Decorates the provided
ResourceProperties.ResourcePropertiesBuilder with additional
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder behavior or functionality. |
ObfuscationResourcePropertiesBuilderDecorator(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties,
String aDecryptPrefix,
String aEncryptPrefix) |
Decorates the provided
ResourceProperties.ResourcePropertiesBuilder with additional
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder behavior or functionality. |
ObfuscationResourcePropertiesBuilderDecorator(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties,
String aDecryptPrefix,
String aEncryptPrefix,
String aSecret) |
Decorates the provided
ResourceProperties.ResourcePropertiesBuilder with additional
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder behavior or functionality. |
ObfuscationResourcePropertiesBuilderDecorator(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties,
String aDecryptPrefix,
String aEncryptPrefix,
org.refcodes.runtime.SystemContext aObfuscationMode) |
Decorates the provided
ResourceProperties.ResourcePropertiesBuilder with additional
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder behavior or functionality. |
ObfuscationResourcePropertiesBuilderDecorator(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties,
org.refcodes.runtime.SystemContext aObfuscationMode) |
Decorates the provided
ResourceProperties.ResourcePropertiesBuilder with additional
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder behavior or functionality. |
encryptAll, encryptSet, get, getDecryptPrefix, getEncryptPrefix, put, setDecryptPrefix, setEncryptPrefix
clear, containsValue, entrySet, putAll, remove
childrenOf, containsKey, getDelimiter, getProperties, isEmpty, keySet, retrieveFrom, retrieveTo, setProperties, size, toDataStructure, values
flush, isFlushable, loadFrom, loadFrom, reload, reload, saveTo, saveTo, seekFrom, toSerialized
toInstance, toInstance, toType, toType
withInsert, withInsert, withInsertFrom, withInsertTo
insert, insert, insertFrom, insertTo, putAll, toDump, toSourceCode, toSourceCode
setDecryptPrefix
setEncryptPrefix
withFlush, withFlushUnchecked
withDecryptPrefix, withEncryptPrefix, withInsert, withInsert, withInsertFrom, withInsertTo, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withPut, withPut, withPutBoolean, withPutByte, withPutDouble, withPutFloat, withPutInteger, withPutLong, withPutShort, withRemoveFrom, withSeekFrom, withSeekFrom, withSeekFrom, withSeekFrom, withSeekFrom, withSeekFrom
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
insert, insert, insert, insert, insertFrom, insertFrom, insertTo, insertTo, put, putArray, putArray, removeAll
withInsert, withInsert, withInsertFrom, withInsertTo
childrenOf, getDelimiter, getType, retrieve, retrieveFrom, retrieveTo, toMap, toProperties, toPropertyPath
containsValue, delete, delete, insert, insert, insertFrom, insertTo, put, putAll, putAll, putAll
withInsert, withInsert, withInsertFrom, withInsertTo
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
withPut
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, toSerialized, toSerialized
public ObfuscationResourcePropertiesBuilderDecorator(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties) throws org.refcodes.component.OpenException
ResourceProperties.ResourcePropertiesBuilder
with additional
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
behavior or functionality.
Changes applied to the provided ResourceProperties.ResourcePropertiesBuilder
affect
the decorator. A host specific secret is used to encrypt and decrypt the
according properties.aProperties
- The ResourceProperties.ResourcePropertiesBuilder
to be decorated.org.refcodes.component.OpenException
- Thrown in case opening the resources for writing
back encrypted properties failed.public ObfuscationResourcePropertiesBuilderDecorator(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties, String aDecryptPrefix, String aEncryptPrefix) throws org.refcodes.component.OpenException
ResourceProperties.ResourcePropertiesBuilder
with additional
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
behavior or functionality.
Changes applied to the provided ResourceProperties.ResourcePropertiesBuilder
affect
the decorator. A host specific secret is used to encrypt and decrypt the
according properties.aProperties
- The ResourceProperties.ResourcePropertiesBuilder
to be decorated.aDecryptPrefix
- The decrypt prefix to be used for values which are
to be decrypted, e.g. "decrypt:".aEncryptPrefix
- The decrypt prefix to be used. for values which are
to be encrypted, e.g. "encrypt:".org.refcodes.component.OpenException
- Thrown in case opening the resources for writing
back encrypted properties failed.public ObfuscationResourcePropertiesBuilderDecorator(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties, String aDecryptPrefix, String aEncryptPrefix, org.refcodes.runtime.SystemContext aObfuscationMode) throws org.refcodes.component.OpenException
ResourceProperties.ResourcePropertiesBuilder
with additional
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
behavior or functionality.
Changes applied to the provided ResourceProperties
affect the
decorator. A host specific secret is used to encrypt and decrypt the
according properties.aProperties
- The ResourceProperties.ResourcePropertiesBuilder
to be decorated.aDecryptPrefix
- The decrypt prefix to be used for values which are
to be decrypted, e.g. "decrypt:".aEncryptPrefix
- The decrypt prefix to be used. for values which are
to be encrypted, e.g. "encrypt:".aObfuscationMode
- The SystemContext
specifies which level
of obfuscation is to be used when encountering upon obfuscated
properties: E.g. obfuscation may be bound to the host, the
"secret" used for obfuscation being the same for all applications
on the same host or obfuscation may be bound to the application,
being different for different applications on the same host.org.refcodes.component.OpenException
- Thrown in case opening the resources for writing
back encrypted properties failed.public ObfuscationResourcePropertiesBuilderDecorator(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties, String aDecryptPrefix, String aEncryptPrefix, String aSecret) throws org.refcodes.component.OpenException
ResourceProperties.ResourcePropertiesBuilder
with additional
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
behavior or functionality.
Changes applied to the provided ResourceProperties.ResourcePropertiesBuilder
affect
the decorator. The given secret is used to encrypt and decrypt the
according properties.aProperties
- The ResourceProperties
to be decorated.aDecryptPrefix
- The decrypt prefix to be used for values which are
to be decrypted, e.g. "decrypt:".aEncryptPrefix
- The decrypt prefix to be used. for values which are
to be encrypted, e.g. "encrypt:".aSecret
- The secret to use when encrypting and decrypting the
according properties.org.refcodes.component.OpenException
- Thrown in case opening the resources for writing
back encrypted properties failed.public ObfuscationResourcePropertiesBuilderDecorator(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties, org.refcodes.runtime.SystemContext aObfuscationMode) throws org.refcodes.component.OpenException
ResourceProperties.ResourcePropertiesBuilder
with additional
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
behavior or functionality.
Changes applied to the provided ResourceProperties
affect the
decorator. A host specific secret is used to encrypt and decrypt the
according properties.aProperties
- The ResourceProperties.ResourcePropertiesBuilder
to be decorated.aObfuscationMode
- The SystemContext
specifies which level
of obfuscation is to be used when encountering upon obfuscated
properties: E.g. obfuscation may be bound to the host, the
"secret" used for obfuscation being the same for all applications
on the same host or obfuscation may be bound to the application,
being different for different applications on the same host.org.refcodes.component.OpenException
- Thrown in case opening the resources for writing
back encrypted properties failed.public ObfuscationResourcePropertiesBuilderDecorator(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties, String aSecret) throws org.refcodes.component.OpenException
ResourceProperties.ResourcePropertiesBuilder
with additional
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
behavior or functionality.
Changes applied to the provided ResourceProperties.ResourcePropertiesBuilder
affect
the decorator. The given secret is used to encrypt and decrypt the
according properties.aProperties
- The ResourceProperties
to be decorated.aSecret
- The secret to use when encrypting and decrypting the
according properties.org.refcodes.component.OpenException
- Thrown in case opening the resources for writing
back encrypted properties failed.Copyright © 2018. All rights reserved.