Class AbstractBasePublicationTree
- java.lang.Object
-
- org.nuxeo.ecm.platform.publisher.api.AbstractBasePublicationTree
-
- All Implemented Interfaces:
Serializable,PublicationNode,PublicationTree
- Direct Known Subclasses:
SectionPublicationTree
public abstract class AbstractBasePublicationTree extends Object implements PublicationTree
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected StringconfigNameprotected CoreSessioncoreSessionprotected PublishedDocumentFactoryfactorystatic StringICON_COLLAPSED_KEYstatic StringICON_EXPANDED_KEYprotected StringiconCollapsedprotected StringiconExpandedstatic StringROOT_PATH_KEYprotected PublicationNoderootNodeprotected StringrootPathstatic StringTITLE_KEYprotected StringtreeTitle
-
Constructor Summary
Constructors Constructor Description AbstractBasePublicationTree()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract booleanaccept(PublishedDocument publishedDocument)booleancanManagePublishing(PublishedDocument publishedDocument)Returnstrueif the current user can manage the publishing of the given publishedDocument, ie approve or reject the document.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.List<PublishedDocument>getChildrenDocuments()List<PublicationNode>getChildrenNodes()StringgetConfigName()protected abstract PublishedDocumentFactorygetDefaultFactory()protected abstract StringgetDefaultRootPath()StringgetIconCollapsed()StringgetIconExpanded()StringgetName()StringgetNodeType()PublicationNodegetParent()StringgetPath()List<PublishedDocument>getPublishedDocumentInNode(PublicationNode node)List<PublishedDocument>getPublishedDocumentsFor(String docId)Returns only the published documents for the givendoc.StringgetTitle()PublicationTreegetTree()StringgetTreeTitle()StringgetTreeType()StringgetType()booleanhasValidationTask(PublishedDocument publishedDocument)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)voidsetCurrentDocument(DocumentModel currentDocument)Sets the current document on which the tree will be based, if needed.voidvalidatorPublishDocument(PublishedDocument publishedDocument, String comment)A validator (the current user) approves the publication.voidvalidatorRejectPublication(PublishedDocument publishedDocument, String comment)A validator (the current user) rejects the publication.PublicationNodewrapToPublicationNode(DocumentModel documentModel)Returns a PublicationNode for the current tree built on the givendocumentModel.PublishedDocumentwrapToPublishedDocument(DocumentModel documentModel)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.platform.publisher.api.PublicationTree
getExistingPublishedDocument, getNodeByPath, release, unpublish, unpublish
-
-
-
-
Field Detail
-
ROOT_PATH_KEY
public static final String ROOT_PATH_KEY
- See Also:
- Constant Field Values
-
ICON_EXPANDED_KEY
public static final String ICON_EXPANDED_KEY
- See Also:
- Constant Field Values
-
ICON_COLLAPSED_KEY
public static final String ICON_COLLAPSED_KEY
- See Also:
- Constant Field Values
-
TITLE_KEY
public static final String TITLE_KEY
- See Also:
- Constant Field Values
-
rootNode
protected PublicationNode rootNode
-
factory
protected PublishedDocumentFactory factory
-
coreSession
protected CoreSession coreSession
-
configName
protected String configName
-
rootPath
protected String rootPath
-
treeTitle
protected String treeTitle
-
iconCollapsed
protected String iconCollapsed
-
iconExpanded
protected String iconExpanded
-
-
Method Detail
-
getDefaultRootPath
protected abstract String getDefaultRootPath()
-
getDefaultFactory
protected abstract PublishedDocumentFactory getDefaultFactory()
-
initTree
public void initTree(CoreSession coreSession, Map<String,String> parameters, PublishedDocumentFactory factory, String configName, String title)
- Specified by:
initTreein interfacePublicationTree
-
getConfigName
public String getConfigName()
- Specified by:
getConfigNamein interfacePublicationTree
-
getNodeType
public String getNodeType()
- Specified by:
getNodeTypein interfacePublicationNode
-
getType
public String getType()
- Specified by:
getTypein interfacePublicationNode
-
getTreeType
public String getTreeType()
- Specified by:
getTreeTypein interfacePublicationTree
-
getTreeTitle
public String getTreeTitle()
- Specified by:
getTreeTitlein interfacePublicationTree
-
getPublishedDocumentInNode
public List<PublishedDocument> getPublishedDocumentInNode(PublicationNode node)
- Specified by:
getPublishedDocumentInNodein interfacePublicationTree
-
getPublishedDocumentsFor
public List<PublishedDocument> getPublishedDocumentsFor(String docId)
Description copied from interface:PublicationNodeReturns only the published documents for the givendoc.- Specified by:
getPublishedDocumentsForin interfacePublicationNode
-
publish
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode)
- Specified by:
publishin interfacePublicationTree
-
publish
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
- Specified by:
publishin interfacePublicationTree
-
getTitle
public String getTitle()
- Specified by:
getTitlein interfacePublicationNode
-
getName
public String getName()
- Specified by:
getNamein interfacePublicationNode
-
getTree
public PublicationTree getTree()
- Specified by:
getTreein interfacePublicationNode
-
getParent
public PublicationNode getParent()
- Specified by:
getParentin interfacePublicationNode
-
getChildrenNodes
public List<PublicationNode> getChildrenNodes()
- Specified by:
getChildrenNodesin interfacePublicationNode
-
getChildrenDocuments
public List<PublishedDocument> getChildrenDocuments()
- Specified by:
getChildrenDocumentsin interfacePublicationNode
-
getPath
public String getPath()
- Specified by:
getPathin interfacePublicationNode
-
setCurrentDocument
public void setCurrentDocument(DocumentModel currentDocument)
Description copied from interface:PublicationTreeSets the current document on which the tree will be based, if needed.Can be useful for some implementations that need to know on which document the user is.
- Specified by:
setCurrentDocumentin interfacePublicationTree- Parameters:
currentDocument- the current document
-
getIconExpanded
public String getIconExpanded()
- Specified by:
getIconExpandedin interfacePublicationTree
-
getIconCollapsed
public String getIconCollapsed()
- Specified by:
getIconCollapsedin interfacePublicationTree
-
validatorPublishDocument
public void validatorPublishDocument(PublishedDocument publishedDocument, String comment)
Description copied from interface:PublicationTreeA validator (the current user) approves the publication.- Specified by:
validatorPublishDocumentin interfacePublicationTree- Parameters:
publishedDocument- the current published document that will be approved
-
validatorRejectPublication
public void validatorRejectPublication(PublishedDocument publishedDocument, String comment)
Description copied from interface:PublicationTreeA validator (the current user) rejects the publication.- Specified by:
validatorRejectPublicationin interfacePublicationTree- Parameters:
publishedDocument- the currently published document that will be rejected
-
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- 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- Returns:
trueif the current user can unpublish the given publishedDocument,falseotherwise.
-
hasValidationTask
public boolean hasValidationTask(PublishedDocument publishedDocument)
- Specified by:
hasValidationTaskin interfacePublicationTree
-
canManagePublishing
public boolean canManagePublishing(PublishedDocument publishedDocument)
Description copied from interface:PublicationTreeReturnstrueif the current user can manage the publishing of the given publishedDocument, ie approve or reject the document.- Specified by:
canManagePublishingin interfacePublicationTree
-
wrapToPublishedDocument
public PublishedDocument wrapToPublishedDocument(DocumentModel documentModel)
- Specified by:
wrapToPublishedDocumentin interfacePublicationTree
-
isPublicationNode
public boolean isPublicationNode(DocumentModel documentModel)
Description copied from interface:PublicationTreeReturnstrueif the givendocumentModelis a PublicationNode of the current tree,falseotherwise.- Specified by:
isPublicationNodein interfacePublicationTree
-
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
-
accept
protected abstract boolean accept(PublishedDocument publishedDocument)
-
-