public class SectionPublicationTree extends AbstractBasePublicationTree
PublicationTree
using the Core Sections.Modifier and Type | Field and Description |
---|---|
static String |
CAN_ASK_FOR_PUBLISHING |
protected static String |
DEFAULT_ROOT_PATH |
protected String |
sessionId |
protected DocumentModel |
treeRoot |
configName, coreSession, factory, ICON_COLLAPSED_KEY, ICON_EXPANDED_KEY, iconCollapsed, iconExpanded, ROOT_PATH_KEY, rootNode, rootPath, TITLE_KEY, treeTitle
Constructor and Description |
---|
SectionPublicationTree() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
accept(PublishedDocument publishedDocument) |
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. |
protected CoreSession |
getCoreSession() |
protected PublishedDocumentFactory |
getDefaultFactory() |
protected String |
getDefaultRootPath() |
List<PublishedDocument> |
getExistingPublishedDocument(DocumentLocation docLoc) |
PublicationNode |
getNodeByPath(String path) |
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 |
release() |
void |
unpublish(DocumentModel doc,
PublicationNode targetNode) |
void |
unpublish(PublishedDocument publishedDocument) |
PublicationNode |
wrapToPublicationNode(DocumentModel documentModel)
Returns a PublicationNode for the current tree built on the given
documentModel . |
PublishedDocument |
wrapToPublishedDocument(DocumentModel documentModel) |
canManagePublishing, getChildrenDocuments, getChildrenNodes, getConfigName, getIconCollapsed, getIconExpanded, getName, getNodeType, getParent, getPath, getPublishedDocumentInNode, getTitle, getTree, getTreeTitle, getTreeType, getType, hasValidationTask, setCurrentDocument, validatorPublishDocument, validatorRejectPublication
public static final String CAN_ASK_FOR_PUBLISHING
protected static final String DEFAULT_ROOT_PATH
protected DocumentModel treeRoot
public SectionPublicationTree()
public void initTree(CoreSession coreSession, Map<String,String> parameters, PublishedDocumentFactory factory, String configName, String title)
initTree
in interface PublicationTree
initTree
in class AbstractBasePublicationTree
protected CoreSession getCoreSession()
public List<PublishedDocument> getExistingPublishedDocument(DocumentLocation docLoc)
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode)
publish
in interface PublicationTree
publish
in class AbstractBasePublicationTree
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
publish
in interface PublicationTree
publish
in class AbstractBasePublicationTree
public void unpublish(DocumentModel doc, PublicationNode targetNode)
public void unpublish(PublishedDocument publishedDocument)
public PublicationNode getNodeByPath(String path)
public void release()
protected String getDefaultRootPath()
getDefaultRootPath
in class AbstractBasePublicationTree
protected PublishedDocumentFactory getDefaultFactory()
getDefaultFactory
in class AbstractBasePublicationTree
public boolean canPublishTo(PublicationNode publicationNode)
PublicationTree
true
if the current user can publish to the specified publicationNode, false
otherwise.canPublishTo
in interface PublicationTree
canPublishTo
in class AbstractBasePublicationTree
true
if the current user can publish to the specified publicationNode, false
otherwise.public boolean canUnpublish(PublishedDocument publishedDocument)
PublicationTree
true
if the current user can unpublish the given publishedDocument, false
otherwise.canUnpublish
in interface PublicationTree
canUnpublish
in class AbstractBasePublicationTree
true
if the current user can unpublish the given publishedDocument, false
otherwise.public PublishedDocument wrapToPublishedDocument(DocumentModel documentModel)
wrapToPublishedDocument
in interface PublicationTree
wrapToPublishedDocument
in class AbstractBasePublicationTree
public boolean isPublicationNode(DocumentModel documentModel)
PublicationTree
true
if the given documentModel
is a PublicationNode of the current tree, false
otherwise.isPublicationNode
in interface PublicationTree
isPublicationNode
in class AbstractBasePublicationTree
public PublicationNode wrapToPublicationNode(DocumentModel documentModel)
PublicationTree
documentModel
.wrapToPublicationNode
in interface PublicationTree
wrapToPublicationNode
in class AbstractBasePublicationTree
protected boolean accept(PublishedDocument publishedDocument)
accept
in class AbstractBasePublicationTree
Copyright © 2018 Nuxeo. All rights reserved.