Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.publisher.api
Interface PublicationTree

All Superinterfaces:
PublicationNode, java.io.Serializable
All Known Subinterfaces:
ClientSynchonizedPublicationTree, ServerSynchronizablePublicationTree
All Known Implementing Classes:
AbstractBasePublicationTree, AbstractRemotableTree, AbstractSynchonizablePublicationTree, ClientRemotePublicationTree, CoreTreeWithExternalDocs, LocalFSPublicationTree, ProxyTree, 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
 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.
 java.lang.String getConfigName()
           
 java.util.List<PublishedDocument> getExistingPublishedDocument(DocumentLocation docLoc)
           
 java.lang.String getIconCollapsed()
           
 java.lang.String getIconExpanded()
           
 PublicationNode getNodeByPath(java.lang.String path)
           
 java.util.List<PublishedDocument> getPublishedDocumentInNode(PublicationNode node)
           
 java.lang.String getTreeTitle()
           
 java.lang.String getTreeType()
           
 boolean hasValidationTask(PublishedDocument publishedDocument)
           
 void initTree(java.lang.String sid, CoreSession coreSession, java.util.Map<java.lang.String,java.lang.String> parameters, PublishedDocumentFactory factory, java.lang.String configName, java.lang.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, java.util.Map<java.lang.String,java.lang.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, java.lang.String comment)
          A validator (the current user) approves the publication.
 void validatorRejectPublication(PublishedDocument publishedDocument, java.lang.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)
           
 
Methods inherited from interface org.nuxeo.ecm.platform.publisher.api.PublicationNode
getChildrenDocuments, getChildrenNodes, getName, getNodeType, getParent, getPath, getSessionId, getTitle, getTreeConfigName, getType
 

Method Detail

getNodeByPath

PublicationNode getNodeByPath(java.lang.String path)
                              throws ClientException
Throws:
ClientException

publish

PublishedDocument publish(DocumentModel doc,
                          PublicationNode targetNode)
                          throws ClientException
Throws:
ClientException

publish

PublishedDocument publish(DocumentModel doc,
                          PublicationNode targetNode,
                          java.util.Map<java.lang.String,java.lang.String> params)
                          throws ClientException
Throws:
ClientException

unpublish

void unpublish(DocumentModel doc,
               PublicationNode targetNode)
               throws ClientException
Throws:
ClientException

unpublish

void unpublish(PublishedDocument publishedDocument)
               throws ClientException
Throws:
ClientException

getExistingPublishedDocument

java.util.List<PublishedDocument> getExistingPublishedDocument(DocumentLocation docLoc)
                                                               throws ClientException
Throws:
ClientException

getPublishedDocumentInNode

java.util.List<PublishedDocument> getPublishedDocumentInNode(PublicationNode node)
                                                             throws ClientException
Throws:
ClientException

getConfigName

java.lang.String getConfigName()

getTreeType

java.lang.String getTreeType()

getTreeTitle

java.lang.String getTreeTitle()

initTree

void initTree(java.lang.String sid,
              CoreSession coreSession,
              java.util.Map<java.lang.String,java.lang.String> parameters,
              PublishedDocumentFactory factory,
              java.lang.String configName,
              java.lang.String title)
              throws ClientException
Throws:
ClientException

setCurrentDocument

void setCurrentDocument(DocumentModel currentDocument)
                        throws ClientException
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
Throws:
ClientException

release

void release()

getIconExpanded

java.lang.String getIconExpanded()

getIconCollapsed

java.lang.String getIconCollapsed()

validatorPublishDocument

void validatorPublishDocument(PublishedDocument publishedDocument,
                              java.lang.String comment)
                              throws ClientException
A validator (the current user) approves the publication.

Parameters:
publishedDocument - the current published document that will be approved
comment -
Throws:
ClientException

validatorRejectPublication

void validatorRejectPublication(PublishedDocument publishedDocument,
                                java.lang.String comment)
                                throws ClientException
A validator (the current user) rejects the publication.

Parameters:
publishedDocument - the currently published document that will be rejected
comment -
Throws:
ClientException

canPublishTo

boolean canPublishTo(PublicationNode publicationNode)
                     throws ClientException
Returns true 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.
Throws:
ClientException

canUnpublish

boolean canUnpublish(PublishedDocument publishedDocument)
                     throws ClientException
Returns true if the current user can unpublish the given publishedDocument, false otherwise.

Returns:
true if the current user can unpublish the given publishedDocument, false otherwise.
Throws:
ClientException

hasValidationTask

boolean hasValidationTask(PublishedDocument publishedDocument)
                          throws ClientException
Throws:
ClientException

canManagePublishing

boolean canManagePublishing(PublishedDocument publishedDocument)
                            throws ClientException
Returns true if the current user can manage the publishing of the given publishedDocument, ie approve or reject the document.

Throws:
ClientException

wrapToPublishedDocument

PublishedDocument wrapToPublishedDocument(DocumentModel documentModel)
                                          throws ClientException
Throws:
ClientException

isPublicationNode

boolean isPublicationNode(DocumentModel documentModel)
                          throws ClientException
Returns true if the given documentModel is a PublicationNode of the current tree, false otherwise.

Throws:
ClientException

wrapToPublicationNode

PublicationNode wrapToPublicationNode(DocumentModel documentModel)
                                      throws ClientException
Returns a PublicationNode for the current tree built on the given documentModel.

Throws:
ClientException - if the given documentModel cannot be a PublicationNode

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.