Class AbstractBasePublicationTree
java.lang.Object
org.nuxeo.ecm.platform.publisher.api.AbstractBasePublicationTree
- All Implemented Interfaces:
Serializable
,PublicationNode
,PublicationTree
- Direct Known Subclasses:
SectionPublicationTree
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected CoreSession
protected PublishedDocumentFactory
static final String
static final String
protected String
protected String
static final String
protected PublicationNode
protected String
static final String
protected String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract boolean
accept
(PublishedDocument publishedDocument) boolean
canManagePublishing
(PublishedDocument publishedDocument) Returnstrue
if the current user can manage the publishing of the given publishedDocument, ie approve or reject the document.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 abstract PublishedDocumentFactory
protected abstract String
getName()
getPath()
getPublishedDocumentsFor
(String docId) Returns only the published documents for the givendoc
.getTitle()
getTree()
getType()
boolean
hasValidationTask
(PublishedDocument publishedDocument) 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
setCurrentDocument
(DocumentModel currentDocument) Sets the current document on which the tree will be based, if needed.void
validatorPublishDocument
(PublishedDocument publishedDocument, String comment) A validator (the current user) approves the publication.void
validatorRejectPublication
(PublishedDocument publishedDocument, String comment) A validator (the current user) rejects the publication.wrapToPublicationNode
(DocumentModel documentModel) Returns a PublicationNode for the current tree built on the givendocumentModel
.wrapToPublishedDocument
(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 Details
-
ROOT_PATH_KEY
- See Also:
-
ICON_EXPANDED_KEY
- See Also:
-
ICON_COLLAPSED_KEY
- See Also:
-
TITLE_KEY
- See Also:
-
rootNode
-
factory
-
coreSession
-
configName
-
rootPath
-
treeTitle
-
iconCollapsed
-
iconExpanded
-
-
Constructor Details
-
AbstractBasePublicationTree
public AbstractBasePublicationTree()
-
-
Method Details
-
getDefaultRootPath
-
getDefaultFactory
-
initTree
public void initTree(CoreSession coreSession, Map<String, String> parameters, PublishedDocumentFactory factory, String configName, String title) - Specified by:
initTree
in interfacePublicationTree
-
getConfigName
- Specified by:
getConfigName
in interfacePublicationTree
-
getNodeType
- Specified by:
getNodeType
in interfacePublicationNode
-
getType
- Specified by:
getType
in interfacePublicationNode
-
getTreeType
- Specified by:
getTreeType
in interfacePublicationTree
-
getTreeTitle
- Specified by:
getTreeTitle
in interfacePublicationTree
-
getPublishedDocumentInNode
- Specified by:
getPublishedDocumentInNode
in interfacePublicationTree
-
getPublishedDocumentsFor
Description copied from interface:PublicationNode
Returns only the published documents for the givendoc
.- Specified by:
getPublishedDocumentsFor
in interfacePublicationNode
-
publish
- Specified by:
publish
in interfacePublicationTree
-
publish
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String, String> params) - Specified by:
publish
in interfacePublicationTree
-
getTitle
- Specified by:
getTitle
in interfacePublicationNode
-
getName
- Specified by:
getName
in interfacePublicationNode
-
getTree
- Specified by:
getTree
in interfacePublicationNode
-
getParent
- Specified by:
getParent
in interfacePublicationNode
-
getChildrenNodes
- Specified by:
getChildrenNodes
in interfacePublicationNode
-
getChildrenDocuments
- Specified by:
getChildrenDocuments
in interfacePublicationNode
-
getPath
- Specified by:
getPath
in interfacePublicationNode
-
setCurrentDocument
Description copied from interface:PublicationTree
Sets 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:
setCurrentDocument
in interfacePublicationTree
- Parameters:
currentDocument
- the current document
-
getIconExpanded
- Specified by:
getIconExpanded
in interfacePublicationTree
-
getIconCollapsed
- Specified by:
getIconCollapsed
in interfacePublicationTree
-
validatorPublishDocument
Description copied from interface:PublicationTree
A validator (the current user) approves the publication.- Specified by:
validatorPublishDocument
in interfacePublicationTree
- Parameters:
publishedDocument
- the current published document that will be approved
-
validatorRejectPublication
Description copied from interface:PublicationTree
A validator (the current user) rejects the publication.- Specified by:
validatorRejectPublication
in interfacePublicationTree
- Parameters:
publishedDocument
- the currently published document that will be rejected
-
canPublishTo
Description copied from interface:PublicationTree
Returnstrue
if the current user can publish to the specified publicationNode,false
otherwise.- Specified by:
canPublishTo
in interfacePublicationTree
- 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
- Returns:
true
if the current user can unpublish the given publishedDocument,false
otherwise.
-
hasValidationTask
- Specified by:
hasValidationTask
in interfacePublicationTree
-
canManagePublishing
Description copied from interface:PublicationTree
Returnstrue
if the current user can manage the publishing of the given publishedDocument, ie approve or reject the document.- Specified by:
canManagePublishing
in interfacePublicationTree
-
wrapToPublishedDocument
- Specified by:
wrapToPublishedDocument
in interfacePublicationTree
-
isPublicationNode
Description copied from interface:PublicationTree
Returnstrue
if the givendocumentModel
is a PublicationNode of the current tree,false
otherwise.- Specified by:
isPublicationNode
in interfacePublicationTree
-
wrapToPublicationNode
Description copied from interface:PublicationTree
Returns a PublicationNode for the current tree built on the givendocumentModel
.- Specified by:
wrapToPublicationNode
in interfacePublicationTree
-
accept
-