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
Simple implementation of a
PublicationTree
using the Core Sections.- Author:
- tiry
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected static final String
protected DocumentModel
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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
protected String
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.publish
(DocumentModel doc, PublicationNode targetNode) publish
(DocumentModel doc, PublicationNode targetNode, Map<String, String> params) void
release()
void
unpublish
(DocumentModel doc, PublicationNode targetNode) void
unpublish
(PublishedDocument publishedDocument) wrapToPublicationNode
(DocumentModel documentModel) Returns a PublicationNode for the current tree built on the givendocumentModel
.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 Details
-
CAN_ASK_FOR_PUBLISHING
- See Also:
-
DEFAULT_ROOT_PATH
- See Also:
-
treeRoot
-
-
Constructor Details
-
SectionPublicationTree
public SectionPublicationTree()
-
-
Method Details
-
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
-
publish
- 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
-
unpublish
-
getNodeByPath
-
release
public void release() -
getDefaultRootPath
- Specified by:
getDefaultRootPath
in classAbstractBasePublicationTree
-
getDefaultFactory
- Specified by:
getDefaultFactory
in classAbstractBasePublicationTree
-
canPublishTo
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
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
- Specified by:
wrapToPublishedDocument
in interfacePublicationTree
- Overrides:
wrapToPublishedDocument
in classAbstractBasePublicationTree
-
isPublicationNode
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
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
- Specified by:
accept
in classAbstractBasePublicationTree
-