if (document.getEncryption() != null)
{
SecurityHandler securityHandler = document.getEncryption().getSecurityHandler();
if(securityHandler != null)
{
securityHandler.prepareDocumentForEncryption(document);
willEncrypt = true;
}
else
{
willEncrypt = false;