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 custom EncryptablePropertyDetector bean or initializes a default DefaultPropertyDetector.
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

    Modifier and Type
    Method
    Description
    boolean
    isEncrypted(String property)
    Returns whether a property is encrypted or not.
    Returns the portion of the property that is actually the encrypted value without any extra metadata such as prefixes and suffixes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultLazyPropertyDetector

      public DefaultLazyPropertyDetector(org.springframework.core.env.ConfigurableEnvironment environment, String customDetectorBeanName, boolean isCustom, org.springframework.beans.factory.BeanFactory bf)

      Constructor for DefaultLazyPropertyDetector.

      Parameters:
      environment - a ConfigurableEnvironment object
      customDetectorBeanName - a String object
      isCustom - a boolean
      bf - a BeanFactory object
    • DefaultLazyPropertyDetector

      public DefaultLazyPropertyDetector(org.springframework.core.env.ConfigurableEnvironment environment)

      Constructor for DefaultLazyPropertyDetector.

      Parameters:
      environment - a ConfigurableEnvironment object
  • Method Details

    • isEncrypted

      public boolean isEncrypted(String property)
      Returns whether a property is encrypted or not. Usually based on prefixes and suffixes.
      Specified by:
      isEncrypted in interface EncryptablePropertyDetector
      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:
      unwrapEncryptedValue in interface EncryptablePropertyDetector
      Parameters:
      property - the property value to extract the encrypted value.
      Returns:
      the encrypted portion of the property value.