Class DefaultLazyPropertyDetector
- java.lang.Object
-
- com.ulisesbocchio.jasyptspringboot.detector.DefaultLazyPropertyDetector
-
- All Implemented Interfaces:
EncryptablePropertyDetector
public class DefaultLazyPropertyDetector extends Object implements EncryptablePropertyDetector
Default Lazy property detector that delegates to a customEncryptablePropertyDetectorbean or initializes a defaultDefaultPropertyDetector.- Version:
- $Id: $Id
- Author:
- Ulises Bocchio
-
-
Constructor Summary
Constructors Constructor Description DefaultLazyPropertyDetector(org.springframework.core.env.ConfigurableEnvironment environment)Constructor for DefaultLazyPropertyDetector.DefaultLazyPropertyDetector(org.springframework.core.env.ConfigurableEnvironment environment, String customDetectorBeanName, boolean isCustom, org.springframework.beans.factory.BeanFactory bf)Constructor for DefaultLazyPropertyDetector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisEncrypted(String property)Returns whether a property is encrypted or not.StringunwrapEncryptedValue(String property)Returns the portion of the property that is actually the encrypted value without any extra metadata such as prefixes and suffixes.
-
-
-
Constructor Detail
-
DefaultLazyPropertyDetector
public DefaultLazyPropertyDetector(org.springframework.core.env.ConfigurableEnvironment environment, String customDetectorBeanName, boolean isCustom, org.springframework.beans.factory.BeanFactory bf)Constructor for DefaultLazyPropertyDetector.
- Parameters:
environment- aConfigurableEnvironmentobjectcustomDetectorBeanName- aStringobjectisCustom- a booleanbf- aBeanFactoryobject
-
DefaultLazyPropertyDetector
public DefaultLazyPropertyDetector(org.springframework.core.env.ConfigurableEnvironment environment)
Constructor for DefaultLazyPropertyDetector.
- Parameters:
environment- aConfigurableEnvironmentobject
-
-
Method Detail
-
isEncrypted
public boolean isEncrypted(String property)
Returns whether a property is encrypted or not. Usually based on prefixes and suffixes.- Specified by:
isEncryptedin interfaceEncryptablePropertyDetector- Parameters:
property- the property value to check whether is encrypted or not.- Returns:
- true if the property is encrypted.
-
unwrapEncryptedValue
public String unwrapEncryptedValue(String property)
Returns the portion of the property that is actually the encrypted value without any extra metadata such as prefixes and suffixes.- Specified by:
unwrapEncryptedValuein interfaceEncryptablePropertyDetector- Parameters:
property- the property value to extract the encrypted value.- Returns:
- the encrypted portion of the property value.
-
-