Class ObfuscationPropertiesSugar
- java.lang.Object
-
- org.refcodes.configuration.PropertiesSugar
-
- org.refcodes.configuration.ext.obfuscation.ObfuscationPropertiesSugar
-
public class ObfuscationPropertiesSugar extends org.refcodes.configuration.PropertiesSugar
Declarative syntactic sugar which may be statically imported in order to allow declarative definitions for the construction ofObfuscationProperties
(and the like).
-
-
Constructor Summary
Constructors Constructor Description ObfuscationPropertiesSugar()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ObfuscationProperties
obfuscate(org.refcodes.configuration.Properties aProperties)
Create anObfuscationProperties
by decorating the providedProperties
with obfuscation functionality.static ObfuscationProperties.ObfuscationPropertiesBuilder
obfuscate(org.refcodes.configuration.Properties.PropertiesBuilder aProperties)
Create anObfuscationProperties.ObfuscationPropertiesBuilder
by decorating the providedProperties.PropertiesBuilder
with obfuscation functionality.static ObfuscationProperties.ObfuscationPropertiesBuilder
obfuscate(org.refcodes.configuration.Properties.PropertiesBuilder aProperties, java.lang.String aSecret)
Create anObfuscationProperties.ObfuscationPropertiesBuilder
by decorating the providedProperties.PropertiesBuilder
with obfuscation functionality.static ObfuscationProperties.ObfuscationPropertiesBuilder
obfuscate(org.refcodes.configuration.Properties.PropertiesBuilder aProperties, org.refcodes.runtime.SystemContext aObfuscationMode)
Create anObfuscationProperties.ObfuscationPropertiesBuilder
by decorating the providedProperties.PropertiesBuilder
with obfuscation functionality.static ObfuscationProperties
obfuscate(org.refcodes.configuration.Properties aProperties, java.lang.String aSecret)
Create anObfuscationProperties
by decorating the providedProperties
with obfuscation functionality.static ObfuscationProperties
obfuscate(org.refcodes.configuration.Properties aProperties, org.refcodes.runtime.SystemContext aObfuscationMode)
Create anObfuscationProperties
by decorating the providedProperties
with obfuscation functionality.static ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
obfuscate(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties)
Create anObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
by decorating the providedResourceProperties.ResourcePropertiesBuilder
with obfuscation functionality.static ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
obfuscate(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties, java.lang.String aSecret)
Create anObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
by decorating the providedResourceProperties.ResourcePropertiesBuilder
with obfuscation functionality.static ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
obfuscate(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties, org.refcodes.runtime.SystemContext aObfuscationMode)
Create anObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
by decorating the providedResourceProperties.ResourcePropertiesBuilder
with obfuscation functionality.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class org.refcodes.configuration.PropertiesSugar
fileToJavaProperties, fileToJavaProperties, fileToJsonProperties, fileToJsonProperties, fileToTomlProperties, fileToTomlProperties, fileToXmlProperties, fileToXmlProperties, fileToYamlProperties, fileToYamlProperties, from, from, fromEnvironmentVariables, fromProfile, fromProfile, fromProperties, fromSystemProperties, loadFromJavaProperties, loadFromJavaProperties, loadFromJavaProperties, loadFromJavaProperties, loadFromJsonProperties, loadFromJsonProperties, loadFromJsonProperties, loadFromJsonProperties, loadFromTomlProperties, loadFromTomlProperties, loadFromTomlProperties, loadFromTomlProperties, loadFromXmlProperties, loadFromXmlProperties, loadFromXmlProperties, loadFromXmlProperties, loadFromYamlProperties, loadFromYamlProperties, loadFromYamlProperties, loadFromYamlProperties, saveToJavaProperties, saveToJavaProperties, saveToJavaProperties, saveToJsonProperties, saveToJsonProperties, saveToJsonProperties, saveToTomlProperties, saveToTomlProperties, saveToTomlProperties, saveToXmlProperties, saveToXmlProperties, saveToXmlProperties, saveToYamlProperties, saveToYamlProperties, saveToYamlProperties, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, seekFromJavaProperties, seekFromJavaProperties, seekFromJsonProperties, seekFromJsonProperties, seekFromTomlProperties, seekFromTomlProperties, seekFromXmlProperties, seekFromXmlProperties, seekFromYamlProperties, seekFromYamlProperties, toNormalized, toNormalized, toPrecedence, toPropertiesBuilder, toPropertiesBuilder, toProperty
-
-
-
-
Method Detail
-
obfuscate
public static ObfuscationProperties obfuscate(org.refcodes.configuration.Properties aProperties)
Create anObfuscationProperties
by decorating the providedProperties
with obfuscation functionality.- Parameters:
aProperties
- TheProperties
to be decorated withObfuscationProperties
functionality.- Returns:
- The according obfuscating
ObfuscationProperties
.
-
obfuscate
public static ObfuscationProperties.ObfuscationPropertiesBuilder obfuscate(org.refcodes.configuration.Properties.PropertiesBuilder aProperties)
Create anObfuscationProperties.ObfuscationPropertiesBuilder
by decorating the providedProperties.PropertiesBuilder
with obfuscation functionality.- Parameters:
aProperties
- TheProperties.PropertiesBuilder
to be decorated withObfuscationProperties.ObfuscationPropertiesBuilder
functionality.- Returns:
- The according obfuscating
ObfuscationProperties.ObfuscationPropertiesBuilder
.
-
obfuscate
public static ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder obfuscate(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties) throws org.refcodes.component.OpenException
Create anObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
by decorating the providedResourceProperties.ResourcePropertiesBuilder
with obfuscation functionality.- Parameters:
aProperties
- TheResourceProperties.ResourcePropertiesBuilder
to be decorated withObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
functionality.- Returns:
- The according obfuscating
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
. - Throws:
org.refcodes.component.OpenException
- Thrown in case opening the resources for writing back encrypted properties failed.
-
obfuscate
public static ObfuscationProperties obfuscate(org.refcodes.configuration.Properties aProperties, org.refcodes.runtime.SystemContext aObfuscationMode)
Create anObfuscationProperties
by decorating the providedProperties
with obfuscation functionality.- Parameters:
aProperties
- TheProperties
to be decorated withObfuscationProperties
functionality.aObfuscationMode
- TheSystemContext
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.- Returns:
- The according obfuscating
ObfuscationProperties
.
-
obfuscate
public static ObfuscationProperties.ObfuscationPropertiesBuilder obfuscate(org.refcodes.configuration.Properties.PropertiesBuilder aProperties, org.refcodes.runtime.SystemContext aObfuscationMode)
Create anObfuscationProperties.ObfuscationPropertiesBuilder
by decorating the providedProperties.PropertiesBuilder
with obfuscation functionality.- Parameters:
aProperties
- TheProperties.PropertiesBuilder
to be decorated withObfuscationProperties.ObfuscationPropertiesBuilder
functionality.aObfuscationMode
- TheSystemContext
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.- Returns:
- The according obfuscating
ObfuscationProperties.ObfuscationPropertiesBuilder
.
-
obfuscate
public static ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder obfuscate(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties, org.refcodes.runtime.SystemContext aObfuscationMode) throws org.refcodes.component.OpenException
Create anObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
by decorating the providedResourceProperties.ResourcePropertiesBuilder
with obfuscation functionality.- Parameters:
aProperties
- TheResourceProperties.ResourcePropertiesBuilder
to be decorated withObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
functionality.aObfuscationMode
- TheSystemContext
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.- Returns:
- The according obfuscating
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
. - Throws:
org.refcodes.component.OpenException
- Thrown in case opening the resources for writing back encrypted properties failed.
-
obfuscate
public static ObfuscationProperties obfuscate(org.refcodes.configuration.Properties aProperties, java.lang.String aSecret)
Create anObfuscationProperties
by decorating the providedProperties
with obfuscation functionality.- Parameters:
aProperties
- TheProperties
to be decorated withObfuscationProperties
functionality.aSecret
- The secret to use when encrypting and decrypting the according properties.- Returns:
- The according obfuscating
ObfuscationProperties
.
-
obfuscate
public static ObfuscationProperties.ObfuscationPropertiesBuilder obfuscate(org.refcodes.configuration.Properties.PropertiesBuilder aProperties, java.lang.String aSecret)
Create anObfuscationProperties.ObfuscationPropertiesBuilder
by decorating the providedProperties.PropertiesBuilder
with obfuscation functionality.- Parameters:
aProperties
- TheProperties.PropertiesBuilder
to be decorated withObfuscationProperties.ObfuscationPropertiesBuilder
functionality.aSecret
- The secret to use when encrypting and decrypting the according properties.- Returns:
- The according obfuscating
ObfuscationProperties.ObfuscationPropertiesBuilder
.
-
obfuscate
public static ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder obfuscate(org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder aProperties, java.lang.String aSecret) throws org.refcodes.component.OpenException
Create anObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
by decorating the providedResourceProperties.ResourcePropertiesBuilder
with obfuscation functionality.- Parameters:
aProperties
- TheResourceProperties.ResourcePropertiesBuilder
to be decorated withObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
functionality.aSecret
- The secret to use when encrypting and decrypting the according properties.- Returns:
- The according obfuscating
ObfuscationResourceProperties.ObfuscationResourcePropertiesBuilder
. - Throws:
org.refcodes.component.OpenException
- Thrown in case opening the resources for writing back encrypted properties failed.
-
-