de.smartics.properties.api.core.security
Class PropertiesBasedPropertyValueSecurity

Package class diagram package PropertiesBasedPropertyValueSecurity
java.lang.Object
  extended by de.smartics.properties.api.core.security.AbstractPropertyValueSecurity
      extended by de.smartics.properties.api.core.security.PropertiesBasedPropertyValueSecurity
All Implemented Interfaces:
PropertyValueSecurity, Serializable

public class PropertiesBasedPropertyValueSecurity
     
     
extends AbstractPropertyValueSecurity

Base implementation based on Java security, loading configuration values from a properties file stored in SecurityConfigurationLoader#CLASSPATH_LOCATION.

See Also:
Serialized Form

Constructor Summary
PropertiesBasedPropertyValueSecurity()
          Default constructor.
 
Method Summary
 String decrypt(PropertyDescriptor descriptor, String encryptedValue)
          Decrypts the given property value.
 String encrypt(PropertyDescriptor descriptor, String plainValue)
          Encrypts the given property value.
 
Methods inherited from class de.smartics.properties.api.core.security.AbstractPropertyValueSecurity
decodePropertyValue, decrypt, encodePropertyValue, encrypt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesBasedPropertyValueSecurity

public PropertiesBasedPropertyValueSecurity()
Default constructor.

Method Detail

decrypt

public String decrypt(PropertyDescriptor descriptor,
                      String encryptedValue)
               throws NullPointerException,
                      SecurityException
Description copied from interface: PropertyValueSecurity
Decrypts the given property value.

Parameters:
descriptor - the descriptor of the property.
encryptedValue - the encrypted value of the property to be decrypted.
Returns:
the decrypted value.
Throws:
NullPointerException - may be thrown if descriptor is null.
SecurityException - if the value cannot be decrypted.

encrypt

public String encrypt(PropertyDescriptor descriptor,
                      String plainValue)
               throws NullPointerException,
                      SecurityException
Description copied from interface: PropertyValueSecurity
Encrypts the given property value.

Parameters:
descriptor - the descriptor of the property.
plainValue - the plain value of the property to be encrypted.
Returns:
the encrypted value.
Throws:
NullPointerException - may be thrown if descriptor is null.
SecurityException - if the value cannot be encrypted.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.