public abstract class AbstractBasePublicationTree extends Object implements PublicationTree
| Modifier and Type | Field and Description | 
|---|---|
protected String | 
configName  | 
protected CoreSession | 
coreSession  | 
protected PublishedDocumentFactory | 
factory  | 
static String | 
ICON_COLLAPSED_KEY  | 
static String | 
ICON_EXPANDED_KEY  | 
protected String | 
iconCollapsed  | 
protected String | 
iconExpanded  | 
static String | 
ROOT_PATH_KEY  | 
protected PublicationNode | 
rootNode  | 
protected String | 
rootPath  | 
static String | 
TITLE_KEY  | 
protected String | 
treeTitle  | 
| Constructor and Description | 
|---|
AbstractBasePublicationTree()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected abstract boolean | 
accept(PublishedDocument publishedDocument)  | 
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. | 
List<PublishedDocument> | 
getChildrenDocuments()  | 
List<PublicationNode> | 
getChildrenNodes()  | 
String | 
getConfigName()  | 
protected abstract PublishedDocumentFactory | 
getDefaultFactory()  | 
protected abstract String | 
getDefaultRootPath()  | 
String | 
getIconCollapsed()  | 
String | 
getIconExpanded()  | 
String | 
getName()  | 
String | 
getNodeType()  | 
PublicationNode | 
getParent()  | 
String | 
getPath()  | 
List<PublishedDocument> | 
getPublishedDocumentInNode(PublicationNode node)  | 
String | 
getTitle()  | 
PublicationTree | 
getTree()  | 
String | 
getTreeTitle()  | 
String | 
getTreeType()  | 
String | 
getType()  | 
boolean | 
hasValidationTask(PublishedDocument publishedDocument)  | 
void | 
initTree(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 | 
setCurrentDocument(DocumentModel currentDocument)
Sets the current document on which the tree will be based, if needed. 
 | 
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, waitgetExistingPublishedDocument, getNodeByPath, release, unpublish, unpublishpublic static final String ROOT_PATH_KEY
public static final String ICON_EXPANDED_KEY
public static final String ICON_COLLAPSED_KEY
public static final String TITLE_KEY
protected PublicationNode rootNode
protected PublishedDocumentFactory factory
protected CoreSession coreSession
protected String configName
protected String iconCollapsed
protected String iconExpanded
public AbstractBasePublicationTree()
protected abstract String getDefaultRootPath()
protected abstract PublishedDocumentFactory getDefaultFactory()
public void initTree(CoreSession coreSession, Map<String,String> parameters, PublishedDocumentFactory factory, String configName, String title)
initTree in interface PublicationTreepublic String getConfigName()
getConfigName in interface PublicationTreepublic String getNodeType()
getNodeType in interface PublicationNodepublic String getType()
getType in interface PublicationNodepublic String getTreeType()
getTreeType in interface PublicationTreepublic String getTreeTitle()
getTreeTitle 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 String getTitle()
getTitle in interface PublicationNodepublic String getName()
getName in interface PublicationNodepublic PublicationTree getTree()
getTree in interface PublicationNodepublic PublicationNode getParent()
getParent in interface PublicationNodepublic List<PublicationNode> getChildrenNodes()
getChildrenNodes in interface PublicationNodepublic List<PublishedDocument> getChildrenDocuments()
getChildrenDocuments in interface PublicationNodepublic String getPath()
getPath 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 String getIconExpanded()
getIconExpanded in interface PublicationTreepublic String getIconCollapsed()
getIconCollapsed 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 PublicationTreeprotected abstract boolean accept(PublishedDocument publishedDocument)
Copyright © 2019 Nuxeo. All rights reserved.