org.apache.camel.component.jasypt
Class JasyptPropertiesParser

java.lang.Object
  extended by org.apache.camel.component.properties.DefaultPropertiesParser
      extended by org.apache.camel.component.jasypt.JasyptPropertiesParser
All Implemented Interfaces:
PropertiesParser

public class JasyptPropertiesParser
extends DefaultPropertiesParser

A PropertiesParser which is using Jasypt to decrypt any encrypted values.

The values must be enclosed in the prefix and suffix token.

Version:

Field Summary
static String JASYPT_PREFIX_TOKEN
           
static String JASYPT_SUFFIX_TOKEN
           
 
Fields inherited from class org.apache.camel.component.properties.DefaultPropertiesParser
log
 
Constructor Summary
JasyptPropertiesParser()
           
 
Method Summary
 String getAlgorithm()
           
 org.jasypt.encryption.pbe.StandardPBEStringEncryptor getEncryptor()
           
 String getPassword()
           
 String parseProperty(String key, String value, Properties properties)
          While parsing the uri using parseUri each parsed property found invokes this callback.
 void setAlgorithm(String algorithm)
           
 void setPassword(String password)
           
 
Methods inherited from class org.apache.camel.component.properties.DefaultPropertiesParser
parseUri
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JASYPT_PREFIX_TOKEN

public static final String JASYPT_PREFIX_TOKEN
See Also:
Constant Field Values

JASYPT_SUFFIX_TOKEN

public static final String JASYPT_SUFFIX_TOKEN
See Also:
Constant Field Values
Constructor Detail

JasyptPropertiesParser

public JasyptPropertiesParser()
Method Detail

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

getAlgorithm

public String getAlgorithm()

setAlgorithm

public void setAlgorithm(String algorithm)

getEncryptor

public org.jasypt.encryption.pbe.StandardPBEStringEncryptor getEncryptor()

parseProperty

public String parseProperty(String key,
                            String value,
                            Properties properties)
Description copied from interface: PropertiesParser
While parsing the uri using parseUri each parsed property found invokes this callback.

This strategy method allows you to hook into the parsing and do custom lookup and return the actual value to use.

Specified by:
parseProperty in interface PropertiesParser
Overrides:
parseProperty in class DefaultPropertiesParser
Parameters:
key - the key
value - the value
properties - the properties resolved which values should be looked up
Returns:
the value to use


Apache CAMEL