@Override public Data transform(Data data, XMLCryptoContext context, OutputStream os) throws TransformException { String attachmentUri = ((ApacheOctetStreamData) data).getURI(); String attachmentId = attachmentUri.substring(4); Attachment attachment; if (attachmentTransformParameterSpec != null) { attachment = attachmentTransformParameterSpec.getAttachment(); context.setProperty(ATTACHMENT_CALLBACKHANDLER, attachmentTransformParameterSpec.getAttachmentCallbackHandler()); } else { attachment = attachmentRequestCallback(context, attachmentId); } return processAttachment(context, os, attachmentUri, attachment); }
if (attachmentTransformParameterSpec != null) { attachment = attachmentTransformParameterSpec.getAttachment(); context.setProperty(ATTACHMENT_CALLBACKHANDLER, attachmentTransformParameterSpec.getAttachmentCallbackHandler()); } else {