Interface PublicationTree
-
- All Superinterfaces:
PublicationNode
,Serializable
- All Known Implementing Classes:
AbstractBasePublicationTree
,RenditionPublicationCoreTree
,RootSectionsPublicationTree
,SectionPublicationTree
public interface PublicationTree extends PublicationNode
Interface for the publication tree. A Publication Tree is a generic view on a set of PublicationNode.- Author:
- tiry
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canManagePublishing(PublishedDocument publishedDocument)
Returnstrue
if the current user can manage the publishing of the given publishedDocument, ie approve or reject the document.boolean
canPublishTo(PublicationNode publicationNode)
Returnstrue
if the current user can publish to the specified publicationNode,false
otherwise.boolean
canUnpublish(PublishedDocument publishedDocument)
Returnstrue
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)
Returnstrue
if the givendocumentModel
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 givendocumentModel
.PublishedDocument
wrapToPublishedDocument(DocumentModel documentModel)
-
Methods inherited from interface org.nuxeo.ecm.platform.publisher.api.PublicationNode
getChildrenDocuments, getChildrenNodes, getName, getNodeType, getParent, getPath, getPublishedDocumentsFor, getTitle, getTree, getType
-
-
-
-
Method Detail
-
getNodeByPath
PublicationNode getNodeByPath(String path)
-
publish
PublishedDocument publish(DocumentModel doc, PublicationNode targetNode)
-
publish
PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
-
unpublish
void unpublish(DocumentModel doc, PublicationNode targetNode)
-
unpublish
void unpublish(PublishedDocument publishedDocument)
-
getExistingPublishedDocument
List<PublishedDocument> getExistingPublishedDocument(DocumentLocation docLoc)
-
getPublishedDocumentInNode
List<PublishedDocument> getPublishedDocumentInNode(PublicationNode node)
-
getConfigName
String getConfigName()
-
getTreeType
String getTreeType()
-
getTreeTitle
String getTreeTitle()
-
initTree
void initTree(CoreSession coreSession, Map<String,String> parameters, PublishedDocumentFactory factory, String configName, String title)
-
setCurrentDocument
void setCurrentDocument(DocumentModel currentDocument)
Sets the current document on which the tree will be based, if needed.Can be useful for some implementations that need to know on which document the user is.
- Parameters:
currentDocument
- the current document
-
release
void release()
-
getIconExpanded
String getIconExpanded()
-
getIconCollapsed
String getIconCollapsed()
-
validatorPublishDocument
void validatorPublishDocument(PublishedDocument publishedDocument, String comment)
A validator (the current user) approves the publication.- Parameters:
publishedDocument
- the current published document that will be approved
-
validatorRejectPublication
void validatorRejectPublication(PublishedDocument publishedDocument, String comment)
A validator (the current user) rejects the publication.- Parameters:
publishedDocument
- the currently published document that will be rejected
-
canPublishTo
boolean canPublishTo(PublicationNode publicationNode)
Returnstrue
if the current user can publish to the specified publicationNode,false
otherwise.- Returns:
true
if the current user can publish to the specified publicationNode,false
otherwise.
-
canUnpublish
boolean canUnpublish(PublishedDocument publishedDocument)
Returnstrue
if the current user can unpublish the given publishedDocument,false
otherwise.- Returns:
true
if the current user can unpublish the given publishedDocument,false
otherwise.
-
hasValidationTask
boolean hasValidationTask(PublishedDocument publishedDocument)
-
canManagePublishing
boolean canManagePublishing(PublishedDocument publishedDocument)
Returnstrue
if the current user can manage the publishing of the given publishedDocument, ie approve or reject the document.
-
wrapToPublishedDocument
PublishedDocument wrapToPublishedDocument(DocumentModel documentModel)
-
isPublicationNode
boolean isPublicationNode(DocumentModel documentModel)
Returnstrue
if the givendocumentModel
is a PublicationNode of the current tree,false
otherwise.
-
wrapToPublicationNode
PublicationNode wrapToPublicationNode(DocumentModel documentModel)
Returns a PublicationNode for the current tree built on the givendocumentModel
.
-
-