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 aPublicationTreeusing the Core Sections.- Author:
- tiry
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringCAN_ASK_FOR_PUBLISHINGprotected static StringDEFAULT_ROOT_PATHprotected DocumentModeltreeRoot-
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 booleanaccept(PublishedDocument publishedDocument)booleancanPublishTo(PublicationNode publicationNode)Returnstrueif the current user can publish to the specified publicationNode,falseotherwise.booleancanUnpublish(PublishedDocument publishedDocument)Returnstrueif the current user can unpublish the given publishedDocument,falseotherwise.protected PublishedDocumentFactorygetDefaultFactory()protected StringgetDefaultRootPath()List<PublishedDocument>getExistingPublishedDocument(DocumentLocation docLoc)PublicationNodegetNodeByPath(String path)voidinitTree(CoreSession coreSession, Map<String,String> parameters, PublishedDocumentFactory factory, String configName, String title)booleanisPublicationNode(DocumentModel documentModel)Returnstrueif the givendocumentModelis a PublicationNode of the current tree,falseotherwise.PublishedDocumentpublish(DocumentModel doc, PublicationNode targetNode)PublishedDocumentpublish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)voidrelease()voidunpublish(DocumentModel doc, PublicationNode targetNode)voidunpublish(PublishedDocument publishedDocument)PublicationNodewrapToPublicationNode(DocumentModel documentModel)Returns a PublicationNode for the current tree built on the givendocumentModel.PublishedDocumentwrapToPublishedDocument(DocumentModel documentModel)-
Methods inherited from class org.nuxeo.ecm.platform.publisher.api.AbstractBasePublicationTree
canManagePublishing, getChildrenDocuments, getChildrenNodes, getConfigName, getIconCollapsed, getIconExpanded, getName, getNodeType, getParent, getPath, getPublishedDocumentInNode, 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
-
-
Constructor Detail
-
SectionPublicationTree
public SectionPublicationTree()
-
-
Method Detail
-
initTree
public void initTree(CoreSession coreSession, Map<String,String> parameters, PublishedDocumentFactory factory, String configName, String title)
- Specified by:
initTreein interfacePublicationTree- Overrides:
initTreein classAbstractBasePublicationTree
-
getExistingPublishedDocument
public List<PublishedDocument> getExistingPublishedDocument(DocumentLocation docLoc)
-
publish
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode)
- Specified by:
publishin interfacePublicationTree- Overrides:
publishin classAbstractBasePublicationTree
-
publish
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
- Specified by:
publishin interfacePublicationTree- Overrides:
publishin 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:
getDefaultRootPathin classAbstractBasePublicationTree
-
getDefaultFactory
protected PublishedDocumentFactory getDefaultFactory()
- Specified by:
getDefaultFactoryin classAbstractBasePublicationTree
-
canPublishTo
public boolean canPublishTo(PublicationNode publicationNode)
Description copied from interface:PublicationTreeReturnstrueif the current user can publish to the specified publicationNode,falseotherwise.- Specified by:
canPublishToin interfacePublicationTree- Overrides:
canPublishToin classAbstractBasePublicationTree- Returns:
trueif the current user can publish to the specified publicationNode,falseotherwise.
-
canUnpublish
public boolean canUnpublish(PublishedDocument publishedDocument)
Description copied from interface:PublicationTreeReturnstrueif the current user can unpublish the given publishedDocument,falseotherwise.- Specified by:
canUnpublishin interfacePublicationTree- Overrides:
canUnpublishin classAbstractBasePublicationTree- Returns:
trueif the current user can unpublish the given publishedDocument,falseotherwise.
-
wrapToPublishedDocument
public PublishedDocument wrapToPublishedDocument(DocumentModel documentModel)
- Specified by:
wrapToPublishedDocumentin interfacePublicationTree- Overrides:
wrapToPublishedDocumentin classAbstractBasePublicationTree
-
isPublicationNode
public boolean isPublicationNode(DocumentModel documentModel)
Description copied from interface:PublicationTreeReturnstrueif the givendocumentModelis a PublicationNode of the current tree,falseotherwise.- Specified by:
isPublicationNodein interfacePublicationTree- Overrides:
isPublicationNodein classAbstractBasePublicationTree
-
wrapToPublicationNode
public PublicationNode wrapToPublicationNode(DocumentModel documentModel)
Description copied from interface:PublicationTreeReturns a PublicationNode for the current tree built on the givendocumentModel.- Specified by:
wrapToPublicationNodein interfacePublicationTree- Overrides:
wrapToPublicationNodein classAbstractBasePublicationTree
-
accept
protected boolean accept(PublishedDocument publishedDocument)
- Specified by:
acceptin classAbstractBasePublicationTree
-
-