Exemplo n.º 1
0
 public void unpublish(DocumentModel doc, PublicationNode targetNode) {
   List<PublishedDocument> publishedDocs = getPublishedDocumentInNode(targetNode);
   for (PublishedDocument pubDoc : publishedDocs) {
     if (pubDoc.getSourceDocumentRef().equals(doc.getRef())) {
       unpublish(pubDoc);
     }
   }
 }
Exemplo n.º 2
0
 @Override
 public boolean canUnpublish(PublishedDocument publishedDocument) {
   if (!accept(publishedDocument)) {
     return false;
   }
   DocumentRef docRef = new PathRef(publishedDocument.getParentPath());
   return coreSession.hasPermission(docRef, SecurityConstants.WRITE);
 }