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(String sid,
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, getSessionId, getTitle, getTreeConfigName, getType
PublicationNode getNodeByPath(String path) throws ClientException
ClientException
PublishedDocument publish(DocumentModel doc, PublicationNode targetNode) throws ClientException
ClientException
PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params) throws ClientException
ClientException
void unpublish(DocumentModel doc, PublicationNode targetNode) throws ClientException
ClientException
void unpublish(PublishedDocument publishedDocument) throws ClientException
ClientException
List<PublishedDocument> getExistingPublishedDocument(DocumentLocation docLoc) throws ClientException
ClientException
List<PublishedDocument> getPublishedDocumentInNode(PublicationNode node) throws ClientException
ClientException
String getConfigName()
String getTreeType()
String getTreeTitle()
void initTree(String sid, CoreSession coreSession, Map<String,String> parameters, PublishedDocumentFactory factory, String configName, String title) throws ClientException
ClientException
void setCurrentDocument(DocumentModel currentDocument) throws ClientException
Can be useful for some implementations that need to know on which document the user is.
currentDocument
- the current documentClientException
void release()
String getIconExpanded()
String getIconCollapsed()
void validatorPublishDocument(PublishedDocument publishedDocument, String comment) throws ClientException
publishedDocument
- the current published document that will be
approvedcomment
- ClientException
void validatorRejectPublication(PublishedDocument publishedDocument, String comment) throws ClientException
publishedDocument
- the currently published document that will be
rejectedcomment
- ClientException
boolean canPublishTo(PublicationNode publicationNode) throws ClientException
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.ClientException
boolean canUnpublish(PublishedDocument publishedDocument) throws ClientException
true
if the current user can unpublish the given publishedDocument,
false
otherwise.true
if the current user can unpublish the given publishedDocument, false
otherwise.ClientException
boolean hasValidationTask(PublishedDocument publishedDocument) throws ClientException
ClientException
boolean canManagePublishing(PublishedDocument publishedDocument) throws ClientException
true
if the current user can manage the publishing of the given publishedDocument,
ie approve or reject the document.ClientException
PublishedDocument wrapToPublishedDocument(DocumentModel documentModel) throws ClientException
ClientException
boolean isPublicationNode(DocumentModel documentModel) throws ClientException
true
if the given documentModel
is a PublicationNode of the current tree,
false
otherwise.ClientException
PublicationNode wrapToPublicationNode(DocumentModel documentModel) throws ClientException
documentModel
.ClientException
- if the given documentModel cannot be a PublicationNodeCopyright © 2014 Nuxeo SA. All rights reserved.