Class EnvironmentStringPBEConfig
- java.lang.Object
-
- org.jasypt.encryption.pbe.config.SimplePBEConfig
-
- org.jasypt.encryption.pbe.config.EnvironmentPBEConfig
-
- org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig
-
- All Implemented Interfaces:
PBECleanablePasswordConfig,PBEConfig,StringPBEConfig
public class EnvironmentStringPBEConfig extends EnvironmentPBEConfig implements StringPBEConfig
Implementation for
StringPBEConfigwhich can retrieve configuration values from environment variables or system properties.The name of the environment variable or system property (JVM property) to query for each parameter can be set with its corresponding setXEnvName or setXSysProperty method.
As this class extends
SimplePBEConfig, parameter values can be also set with the usual setX methods.For any of the configuration parameters, if its value is not configured in any way, a null value will be returned by the corresponding getX method.
- Since:
- 1.3
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringstringOutputTypeprivate java.lang.StringstringOutputTypeEnvNameprivate java.lang.StringstringOutputTypeSysPropertyName
-
Constructor Summary
Constructors Constructor Description EnvironmentStringPBEConfig()Creates a new EnvironmentStringPBEConfig instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetStringOutputType()This parameter lets the user specify the form in which String output will be encoded.java.lang.StringgetStringOutputTypeEnvName()Retrieve the name of the environment variable which value has been loaded as the String output type.java.lang.StringgetStringOutputTypeSysPropertyName()Retrieve the name of the JVM system property which value has been loaded as the String output type.voidsetStringOutputType(java.lang.String stringOutputType)Sets the the form in which String output will be encoded.voidsetStringOutputTypeEnvName(java.lang.String stringOutputTypeEnvName)Set the config object to use the specified environment variable to load the value for the String output type.voidsetStringOutputTypeSysPropertyName(java.lang.String stringOutputTypeSysPropertyName)Set the config object to use the specified JVM system property to load the value for the String output type.-
Methods inherited from class org.jasypt.encryption.pbe.config.EnvironmentPBEConfig
getAlgorithmEnvName, getAlgorithmSysPropertyName, getIvGeneratorClassNameEnvName, getIvGeneratorClassNameSysPropertyName, getKeyObtentionIterationsEnvName, getKeyObtentionIterationsSysPropertyName, getPasswordEnvName, getPasswordSysPropertyName, getPoolSizeEnvName, getPoolSizeSysPropertyName, getProviderClassNameEnvName, getProviderClassNameSysPropertyName, getProviderNameEnvName, getProviderNameSysPropertyName, getSaltGeneratorClassNameEnvName, getSaltGeneratorClassNameSysPropertyName, setAlgorithm, setAlgorithmEnvName, setAlgorithmSysPropertyName, setIvGenerator, setIvGeneratorClassName, setIvGeneratorClassNameEnvName, setIvGeneratorClassNameSysPropertyName, setKeyObtentionIterations, setKeyObtentionIterations, setKeyObtentionIterationsEnvName, setKeyObtentionIterationsSysPropertyName, setPassword, setPasswordCharArray, setPasswordEnvName, setPasswordSysPropertyName, setPoolSize, setPoolSize, setPoolSizeEnvName, setPoolSizeSysPropertyName, setProvider, setProviderClassName, setProviderClassNameEnvName, setProviderClassNameSysPropertyName, setProviderName, setProviderNameEnvName, setProviderNameSysPropertyName, setSaltGenerator, setSaltGeneratorClassName, setSaltGeneratorClassNameEnvName, setSaltGeneratorClassNameSysPropertyName
-
Methods inherited from class org.jasypt.encryption.pbe.config.SimplePBEConfig
cleanPassword, getAlgorithm, getIvGenerator, getKeyObtentionIterations, getPassword, getPasswordCharArray, getPoolSize, getProvider, getProviderName, getSaltGenerator
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jasypt.encryption.pbe.config.PBEConfig
getAlgorithm, getIvGenerator, getKeyObtentionIterations, getPassword, getPoolSize, getProvider, getProviderName, getSaltGenerator
-
-
-
-
Method Detail
-
getStringOutputTypeEnvName
public java.lang.String getStringOutputTypeEnvName()
Retrieve the name of the environment variable which value has been loaded as the String output type.- Returns:
- the name of the variable
-
setStringOutputTypeEnvName
public void setStringOutputTypeEnvName(java.lang.String stringOutputTypeEnvName)
Set the config object to use the specified environment variable to load the value for the String output type.- Parameters:
stringOutputTypeEnvName- the name of the environment variable
-
getStringOutputTypeSysPropertyName
public java.lang.String getStringOutputTypeSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the String output type.- Returns:
- the name of the property
-
setStringOutputTypeSysPropertyName
public void setStringOutputTypeSysPropertyName(java.lang.String stringOutputTypeSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the String output type.- Parameters:
stringOutputTypeSysPropertyName- the name of the property
-
setStringOutputType
public void setStringOutputType(java.lang.String stringOutputType)
Sets the the form in which String output will be encoded. Available encoding types are:
- base64 (default)
- hexadecimal
If not set, null will be returned.
- Parameters:
stringOutputType- the string output type.
-
getStringOutputType
public java.lang.String getStringOutputType()
Description copied from interface:StringPBEConfigThis parameter lets the user specify the form in which String output will be encoded. Available encoding types are:
- base64 (default)
- hexadecimal
- Specified by:
getStringOutputTypein interfaceStringPBEConfig- Returns:
- The name of the encoding type for String output
-
-