public interface PublicationTree extends PublicationNode
Modifier and Type | Method and Description |
---|---|
boolean |
canManagePublishing(PublishedDocument publishedDocument)
Returns
true if the current user can manage the publishing of the given publishedDocument, ie approve or
reject the document. |
boolean |
canPublishTo(PublicationNode publicationNode)
Returns
true if the current user can publish to the specified publicationNode, false otherwise. |
boolean |
canUnpublish(PublishedDocument publishedDocument)
Returns
true if the current user can unpublish the given publishedDocument, false otherwise. |
String |
getConfigName() |
List<PublishedDocument> |
getExistingPublishedDocument(DocumentLocation docLoc) |
String |
getIconCollapsed() |
String |
getIconExpanded() |
PublicationNode |
getNodeByPath(String path) |
List<PublishedDocument> |
getPublishedDocumentInNode(PublicationNode node) |
String |
getTreeTitle() |
String |
getTreeType() |
boolean |
hasValidationTask(PublishedDocument publishedDocument) |
void |
initTree(CoreSession coreSession,
Map<String,String> parameters,
PublishedDocumentFactory factory,
String configName,
String title) |
boolean |
isPublicationNode(DocumentModel documentModel)
Returns
true if the given documentModel is a PublicationNode of the current tree, false
otherwise. |
PublishedDocument |
publish(DocumentModel doc,
PublicationNode targetNode) |
PublishedDocument |
publish(DocumentModel doc,
PublicationNode targetNode,
Map<String,String> params) |
void |
release() |
void |
setCurrentDocument(DocumentModel currentDocument)
Sets the current document on which the tree will be based, if needed.
|
void |
unpublish(DocumentModel doc,
PublicationNode targetNode) |
void |
unpublish(PublishedDocument publishedDocument) |
void |
validatorPublishDocument(PublishedDocument publishedDocument,
String comment)
A validator (the current user) approves the publication.
|
void |
validatorRejectPublication(PublishedDocument publishedDocument,
String comment)
A validator (the current user) rejects the publication.
|
PublicationNode |
wrapToPublicationNode(DocumentModel documentModel)
Returns a PublicationNode for the current tree built on the given
documentModel . |
PublishedDocument |
wrapToPublishedDocument(DocumentModel documentModel) |
getChildrenDocuments, getChildrenNodes, getName, getNodeType, getParent, getPath, getTitle, getTree, getType
PublicationNode getNodeByPath(String path)
PublishedDocument publish(DocumentModel doc, PublicationNode targetNode)
PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
void unpublish(DocumentModel doc, PublicationNode targetNode)
void unpublish(PublishedDocument publishedDocument)
List<PublishedDocument> getExistingPublishedDocument(DocumentLocation docLoc)
List<PublishedDocument> getPublishedDocumentInNode(PublicationNode node)
String getConfigName()
String getTreeType()
String getTreeTitle()
void initTree(CoreSession coreSession, Map<String,String> parameters, PublishedDocumentFactory factory, String configName, String title)
void setCurrentDocument(DocumentModel currentDocument)
Can be useful for some implementations that need to know on which document the user is.
currentDocument
- the current documentvoid release()
String getIconExpanded()
String getIconCollapsed()
void validatorPublishDocument(PublishedDocument publishedDocument, String comment)
publishedDocument
- the current published document that will be approvedcomment
- void validatorRejectPublication(PublishedDocument publishedDocument, String comment)
publishedDocument
- the currently published document that will be rejectedcomment
- boolean canPublishTo(PublicationNode publicationNode)
true
if the current user can publish to the specified publicationNode, false
otherwise.true
if the current user can publish to the specified publicationNode, false
otherwise.boolean canUnpublish(PublishedDocument publishedDocument)
true
if the current user can unpublish the given publishedDocument, false
otherwise.true
if the current user can unpublish the given publishedDocument, false
otherwise.boolean hasValidationTask(PublishedDocument publishedDocument)
boolean canManagePublishing(PublishedDocument publishedDocument)
true
if the current user can manage the publishing of the given publishedDocument, ie approve or
reject the document.PublishedDocument wrapToPublishedDocument(DocumentModel documentModel)
boolean isPublicationNode(DocumentModel documentModel)
true
if the given documentModel
is a PublicationNode of the current tree, false
otherwise.PublicationNode wrapToPublicationNode(DocumentModel documentModel)
documentModel
.Copyright © 2017 Nuxeo. All rights reserved.