Nuxeo ECM Projects 5.4.3-SNAPSHOT

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

All Known Implementing Classes:
PublisherServiceImpl, RemotePublicationTreeManagerRestProxy

public interface RemotePublicationTreeManager

Remote interface used by PublicationService to communicate with each others.

Author:
tiry

Method Summary
 boolean canManagePublishing(String sid, PublishedDocument publishedDocument)
          Returns true if the current user can manage the publishing of the given published document, ie.
 boolean canPublishTo(String sid, PublicationNode publicationNode)
          Returns true if the current user can publish to the specified publicationNode, false otherwise.
 boolean canUnpublish(String sid, PublishedDocument publishedDocument)
          Returns true if the current user can unpublish the given publishedDocument, false otherwise.
 List<PublishedDocument> getChildrenDocuments(PublicationNode node)
           
 List<PublicationNode> getChildrenNodes(PublicationNode node)
           
 List<PublishedDocument> getExistingPublishedDocument(String sid, DocumentLocation docLoc)
           
 PublicationNode getNodeByPath(String sid, String path)
           
 PublicationNode getParent(PublicationNode node)
           
 List<PublishedDocument> getPublishedDocumentInNode(PublicationNode node)
           
 boolean hasValidationTask(String sid, PublishedDocument publishedDocument)
           
 Map<String,String> initRemoteSession(String treeConfigName, Map<String,String> params)
           
 boolean isPublicationNode(String sid, 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(String sid)
           
 void setCurrentDocument(String sid, DocumentModel currentDocument)
          Sets the current document on which the tree will be based, if needed.
 void unpublish(DocumentModel doc, PublicationNode targetNode)
           
 void unpublish(String sid, PublishedDocument publishedDocument)
           
 void validatorPublishDocument(String sid, PublishedDocument publishedDocument, String comment)
          A validator (the current user) approves the publication.
 void validatorRejectPublication(String sid, PublishedDocument publishedDocument, String comment)
          A validator (the current user) rejects the publication.
 PublicationNode wrapToPublicationNode(String sid, DocumentModel documentModel)
          Returns a PublicationNode for the current tree built on the given documentModel.
 PublishedDocument wrapToPublishedDocument(String sid, DocumentModel documentModel)
           
 

Method Detail

getChildrenDocuments

List<PublishedDocument> getChildrenDocuments(PublicationNode node)
                                             throws ClientException
Throws:
ClientException

getChildrenNodes

List<PublicationNode> getChildrenNodes(PublicationNode node)
                                       throws ClientException
Throws:
ClientException

getParent

PublicationNode getParent(PublicationNode node)

getNodeByPath

PublicationNode getNodeByPath(String sid,
                              String path)
                              throws ClientException
Throws:
ClientException

getExistingPublishedDocument

List<PublishedDocument> getExistingPublishedDocument(String sid,
                                                     DocumentLocation docLoc)
                                                     throws ClientException
Throws:
ClientException

getPublishedDocumentInNode

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

publish

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

publish

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

unpublish

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

unpublish

void unpublish(String sid,
               PublishedDocument publishedDocument)
               throws ClientException
Throws:
ClientException

initRemoteSession

Map<String,String> initRemoteSession(String treeConfigName,
                                     Map<String,String> params)
                                     throws Exception
Throws:
Exception

setCurrentDocument

void setCurrentDocument(String sid,
                        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(String sid)

validatorPublishDocument

void validatorPublishDocument(String sid,
                              PublishedDocument publishedDocument,
                              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(String sid,
                                PublishedDocument publishedDocument,
                                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(String sid,
                     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(String sid,
                     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(String sid,
                          PublishedDocument publishedDocument)
                          throws ClientException
Throws:
ClientException

canManagePublishing

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

Throws:
ClientException

wrapToPublishedDocument

PublishedDocument wrapToPublishedDocument(String sid,
                                          DocumentModel documentModel)
                                          throws ClientException
Throws:
ClientException

isPublicationNode

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

Throws:
ClientException

wrapToPublicationNode

PublicationNode wrapToPublicationNode(String sid,
                                      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 ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.