public class DocumentContentEncryptionConverter extends Object implements javax.persistence.AttributeConverter<String,String>
Leverages behavior from the standard EncryptionConverter
but additionally when converting to the entity
attribute value, it will detect whether or not the value is encrypted XML or plain text XML and decrypt if necessary.
This allows for this situation where encryption is enabled at a later date. Using this mechanism, existing plain text
docs can be loaded (but could potentially be saved back to the database encrypted if encryption is enabled).
Note that the mixed mode only works one way. If you have been using encryption and then disable it, this converter will not be able to decrypt your old doc content for you since it will no longer have the encryption key available to it.
Constructor and Description |
---|
DocumentContentEncryptionConverter() |
public DocumentContentEncryptionConverter()
public String convertToEntityAttribute(String dataValue)
public String convertToDatabaseColumn(String attribute)
Copyright © 2005–2015 The Kuali Foundation. All rights reserved.