Class SectionPublicationTree
- java.lang.Object
-
- org.nuxeo.ecm.platform.publisher.api.AbstractBasePublicationTree
-
- org.nuxeo.ecm.platform.publisher.impl.core.SectionPublicationTree
-
- All Implemented Interfaces:
Serializable
,PublicationNode
,PublicationTree
- Direct Known Subclasses:
RootSectionsPublicationTree
public class SectionPublicationTree extends AbstractBasePublicationTree
Simple implementation of aPublicationTree
using the Core Sections.- Author:
- tiry
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
CAN_ASK_FOR_PUBLISHING
protected static String
DEFAULT_ROOT_PATH
protected DocumentModel
treeRoot
-
Fields inherited from class org.nuxeo.ecm.platform.publisher.api.AbstractBasePublicationTree
configName, coreSession, factory, ICON_COLLAPSED_KEY, ICON_EXPANDED_KEY, iconCollapsed, iconExpanded, ROOT_PATH_KEY, rootNode, rootPath, TITLE_KEY, treeTitle
-
-
Constructor Summary
Constructors Constructor Description SectionPublicationTree()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
accept(PublishedDocument publishedDocument)
boolean
canPublishTo(PublicationNode publicationNode)
Returnstrue
if the current user can publish to the specified publicationNode,false
otherwise.boolean
canUnpublish(PublishedDocument publishedDocument)
Returnstrue
if the current user can unpublish the given publishedDocument,false
otherwise.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)
Returnstrue
if the givendocumentModel
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 givendocumentModel
.PublishedDocument
wrapToPublishedDocument(DocumentModel documentModel)
-
Methods inherited from class org.nuxeo.ecm.platform.publisher.api.AbstractBasePublicationTree
canManagePublishing, getChildrenDocuments, getChildrenNodes, getConfigName, getIconCollapsed, getIconExpanded, getName, getNodeType, getParent, getPath, getPublishedDocumentInNode, getPublishedDocumentsFor, getTitle, getTree, getTreeTitle, getTreeType, getType, hasValidationTask, setCurrentDocument, validatorPublishDocument, validatorRejectPublication
-
-
-
-
Field Detail
-
CAN_ASK_FOR_PUBLISHING
public static final String CAN_ASK_FOR_PUBLISHING
- See Also:
- Constant Field Values
-
DEFAULT_ROOT_PATH
protected static final String DEFAULT_ROOT_PATH
- See Also:
- Constant Field Values
-
treeRoot
protected DocumentModel treeRoot
-
-
Method Detail
-
initTree
public void initTree(CoreSession coreSession, Map<String,String> parameters, PublishedDocumentFactory factory, String configName, String title)
- Specified by:
initTree
in interfacePublicationTree
- Overrides:
initTree
in classAbstractBasePublicationTree
-
getExistingPublishedDocument
public List<PublishedDocument> getExistingPublishedDocument(DocumentLocation docLoc)
-
publish
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode)
- Specified by:
publish
in interfacePublicationTree
- Overrides:
publish
in classAbstractBasePublicationTree
-
publish
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
- Specified by:
publish
in interfacePublicationTree
- Overrides:
publish
in classAbstractBasePublicationTree
-
unpublish
public void unpublish(DocumentModel doc, PublicationNode targetNode)
-
unpublish
public void unpublish(PublishedDocument publishedDocument)
-
getNodeByPath
public PublicationNode getNodeByPath(String path)
-
release
public void release()
-
getDefaultRootPath
protected String getDefaultRootPath()
- Specified by:
getDefaultRootPath
in classAbstractBasePublicationTree
-
getDefaultFactory
protected PublishedDocumentFactory getDefaultFactory()
- Specified by:
getDefaultFactory
in classAbstractBasePublicationTree
-
canPublishTo
public boolean canPublishTo(PublicationNode publicationNode)
Description copied from interface:PublicationTree
Returnstrue
if the current user can publish to the specified publicationNode,false
otherwise.- Specified by:
canPublishTo
in interfacePublicationTree
- Overrides:
canPublishTo
in classAbstractBasePublicationTree
- Returns:
true
if the current user can publish to the specified publicationNode,false
otherwise.
-
canUnpublish
public boolean canUnpublish(PublishedDocument publishedDocument)
Description copied from interface:PublicationTree
Returnstrue
if the current user can unpublish the given publishedDocument,false
otherwise.- Specified by:
canUnpublish
in interfacePublicationTree
- Overrides:
canUnpublish
in classAbstractBasePublicationTree
- Returns:
true
if the current user can unpublish the given publishedDocument,false
otherwise.
-
wrapToPublishedDocument
public PublishedDocument wrapToPublishedDocument(DocumentModel documentModel)
- Specified by:
wrapToPublishedDocument
in interfacePublicationTree
- Overrides:
wrapToPublishedDocument
in classAbstractBasePublicationTree
-
isPublicationNode
public boolean isPublicationNode(DocumentModel documentModel)
Description copied from interface:PublicationTree
Returnstrue
if the givendocumentModel
is a PublicationNode of the current tree,false
otherwise.- Specified by:
isPublicationNode
in interfacePublicationTree
- Overrides:
isPublicationNode
in classAbstractBasePublicationTree
-
wrapToPublicationNode
public PublicationNode wrapToPublicationNode(DocumentModel documentModel)
Description copied from interface:PublicationTree
Returns a PublicationNode for the current tree built on the givendocumentModel
.- Specified by:
wrapToPublicationNode
in interfacePublicationTree
- Overrides:
wrapToPublicationNode
in classAbstractBasePublicationTree
-
accept
protected boolean accept(PublishedDocument publishedDocument)
- Specified by:
accept
in classAbstractBasePublicationTree
-
-