コード例 #1
0
 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;
 }
コード例 #2
0
 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);
   }
 }
コード例 #3
0
 public void addAttachment(Node documentNode, SimpleAttachment attachment)
     throws RepositoryException {
   Node attachmentNode = getAttachmentNode(attachment.getNodeName(), documentNode);
   attachmentConverter.fillNode(attachment, attachmentNode);
 }