protected SimpleAttachment getAttachment(Node node, String language) throws RepositoryException { String attachmentNodeName = SimpleDocument.FILE_PREFIX + language; if (node.hasNode(attachmentNodeName)) { return attachmentConverter.convertNode(node.getNode(attachmentNodeName)); } return null; }
public void fillNode(SimpleDocument document, Node documentNode, boolean skipAttachmentContent) throws RepositoryException { setDocumentNodeProperties(document, documentNode); if (!skipAttachmentContent) { Node attachmentNode = getAttachmentNode(document.getAttachment().getNodeName(), documentNode); attachmentConverter.fillNode(document.getAttachment(), attachmentNode); } }
public void addAttachment(Node documentNode, SimpleAttachment attachment) throws RepositoryException { Node attachmentNode = getAttachmentNode(attachment.getNodeName(), documentNode); attachmentConverter.fillNode(attachment, attachmentNode); }