public abstract class AbstractRemotableTree extends Object implements PublicationTree
PublicationTree that delegates method calls to a remote service.| Modifier and Type | Field and Description |
|---|---|
protected String |
configName |
protected boolean |
released |
protected String |
sessionId |
protected RemotePublicationTreeManager |
treeService |
| Constructor and Description |
|---|
AbstractRemotableTree() |
| 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) |
PublicationNode |
getNodeByPath(String path) |
PublicationNode |
getParent() |
List<PublishedDocument> |
getPublishedDocumentInNode(PublicationNode node) |
protected abstract String |
getServerTreeSessionId() |
protected abstract String |
getTargetTreeName() |
protected abstract RemotePublicationTreeManager |
getTreeService() |
boolean |
hasValidationTask(PublishedDocument publishedDocument) |
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.
|
protected abstract PublicationNode |
switchToClientNode(PublicationNode node) |
protected List<PublicationNode> |
switchToClientNodes(List<PublicationNode> nodes) |
protected abstract PublicationNode |
switchToServerNode(PublicationNode node) |
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIconCollapsed, getIconExpanded, getTreeTitle, getTreeType, initTreegetChildrenDocuments, getChildrenNodes, getName, getNodeType, getPath, getSessionId, getTitle, getTreeConfigName, getTypeprotected RemotePublicationTreeManager treeService
protected String configName
protected boolean released
public AbstractRemotableTree()
protected abstract RemotePublicationTreeManager getTreeService()
protected abstract String getTargetTreeName()
protected abstract String getServerTreeSessionId()
public List<PublishedDocument> getExistingPublishedDocument(DocumentLocation docLoc)
getExistingPublishedDocument in interface PublicationTreepublic List<PublishedDocument> getPublishedDocumentInNode(PublicationNode node)
getPublishedDocumentInNode in interface PublicationTreepublic PublishedDocument publish(DocumentModel doc, PublicationNode targetNode)
publish in interface PublicationTreepublic PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
publish in interface PublicationTreepublic void unpublish(DocumentModel doc, PublicationNode targetNode)
unpublish in interface PublicationTreepublic void unpublish(PublishedDocument publishedDocument)
unpublish in interface PublicationTreeprotected abstract PublicationNode switchToClientNode(PublicationNode node)
protected abstract PublicationNode switchToServerNode(PublicationNode node)
protected List<PublicationNode> switchToClientNodes(List<PublicationNode> nodes)
public PublicationNode getNodeByPath(String path)
getNodeByPath in interface PublicationTreepublic String getConfigName()
getConfigName in interface PublicationTreepublic PublicationNode getParent()
getParent in interface PublicationNodepublic void setCurrentDocument(DocumentModel currentDocument)
PublicationTreeCan be useful for some implementations that need to know on which document the user is.
setCurrentDocument in interface PublicationTreecurrentDocument - the current documentpublic void release()
release in interface PublicationTreepublic void validatorPublishDocument(PublishedDocument publishedDocument, String comment)
PublicationTreevalidatorPublishDocument in interface PublicationTreepublishedDocument - the current published document that will be approvedpublic void validatorRejectPublication(PublishedDocument publishedDocument, String comment)
PublicationTreevalidatorRejectPublication in interface PublicationTreepublishedDocument - the currently published document that will be rejectedpublic boolean canPublishTo(PublicationNode publicationNode)
PublicationTreetrue if the current user can publish to the specified publicationNode, false otherwise.canPublishTo in interface PublicationTreetrue if the current user can publish to the specified publicationNode, false otherwise.public boolean canUnpublish(PublishedDocument publishedDocument)
PublicationTreetrue if the current user can unpublish the given publishedDocument, false otherwise.canUnpublish in interface PublicationTreetrue if the current user can unpublish the given publishedDocument, false otherwise.public boolean hasValidationTask(PublishedDocument publishedDocument)
hasValidationTask in interface PublicationTreepublic boolean canManagePublishing(PublishedDocument publishedDocument)
PublicationTreetrue if the current user can manage the publishing of the given publishedDocument, ie approve or
reject the document.canManagePublishing in interface PublicationTreepublic PublishedDocument wrapToPublishedDocument(DocumentModel documentModel)
wrapToPublishedDocument in interface PublicationTreepublic boolean isPublicationNode(DocumentModel documentModel)
PublicationTreetrue if the given documentModel is a PublicationNode of the current tree, false
otherwise.isPublicationNode in interface PublicationTreepublic PublicationNode wrapToPublicationNode(DocumentModel documentModel)
PublicationTreedocumentModel.wrapToPublicationNode in interface PublicationTreeCopyright © 2016 Nuxeo SA. All rights reserved.