org.nuxeo.ecm.platform.publisher.impl.core
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:
- CoreTreeWithExternalDocs, RootSectionsPublicationTree
public class SectionPublicationTree
- extends AbstractBasePublicationTree
- implements PublicationTree
Simple implementation of a PublicationTree
using the Core Sections.
- Author:
- tiry
- See Also:
- Serialized Form
Method Summary |
boolean |
canPublishTo(PublicationNode publicationNode)
Returns true if the current user can publish to the specified publicationNode,
false otherwise. |
boolean |
canUnpublish(PublishedDocument publishedDocument)
Returns true if the current user can unpublish the given publishedDocument,
false otherwise. |
List<PublishedDocument> |
getExistingPublishedDocument(DocumentLocation docLoc)
|
PublicationNode |
getNodeByPath(String path)
|
void |
initTree(String sid,
CoreSession coreSession,
Map<String,String> parameters,
PublishedDocumentFactory factory,
String configName,
String title)
|
boolean |
isPublicationNode(DocumentModel documentModel)
Returns true if the given documentModel 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 given documentModel . |
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, getSessionId, getTitle, getTreeConfigName, getTreeTitle, getTreeType, getType, hasValidationTask, setCurrentDocument, validatorPublishDocument, validatorRejectPublication |
Methods inherited from interface org.nuxeo.ecm.platform.publisher.api.PublicationTree |
canManagePublishing, getConfigName, getIconCollapsed, getIconExpanded, getPublishedDocumentInNode, getTreeTitle, getTreeType, hasValidationTask, setCurrentDocument, validatorPublishDocument, validatorRejectPublication |
SectionPublicationTree
public SectionPublicationTree()
initTree
public void initTree(String sid,
CoreSession coreSession,
Map<String,String> parameters,
PublishedDocumentFactory factory,
String configName,
String title)
throws ClientException
- Specified by:
initTree
in interface PublicationTree
- Overrides:
initTree
in class AbstractBasePublicationTree
- Throws:
ClientException
getExistingPublishedDocument
public List<PublishedDocument> getExistingPublishedDocument(DocumentLocation docLoc)
throws ClientException
- Specified by:
getExistingPublishedDocument
in interface PublicationTree
- Throws:
ClientException
publish
public PublishedDocument publish(DocumentModel doc,
PublicationNode targetNode)
throws ClientException
- Specified by:
publish
in interface PublicationTree
- Overrides:
publish
in class AbstractBasePublicationTree
- Throws:
ClientException
publish
public PublishedDocument publish(DocumentModel doc,
PublicationNode targetNode,
Map<String,String> params)
throws ClientException
- Specified by:
publish
in interface PublicationTree
- Overrides:
publish
in class AbstractBasePublicationTree
- Throws:
ClientException
unpublish
public void unpublish(DocumentModel doc,
PublicationNode targetNode)
throws ClientException
- Specified by:
unpublish
in interface PublicationTree
- Throws:
ClientException
unpublish
public void unpublish(PublishedDocument publishedDocument)
throws ClientException
- Specified by:
unpublish
in interface PublicationTree
- Throws:
ClientException
getNodeByPath
public PublicationNode getNodeByPath(String path)
throws ClientException
- Specified by:
getNodeByPath
in interface PublicationTree
- Throws:
ClientException
release
public void release()
- Specified by:
release
in interface PublicationTree
canPublishTo
public boolean canPublishTo(PublicationNode publicationNode)
throws ClientException
- Description copied from interface:
PublicationTree
- Returns
true
if the current user can publish to the specified publicationNode,
false
otherwise.
- Specified by:
canPublishTo
in interface PublicationTree
- Overrides:
canPublishTo
in class AbstractBasePublicationTree
- Returns:
true
if the current user can publish to the specified publicationNode, false
otherwise.
- Throws:
ClientException
canUnpublish
public boolean canUnpublish(PublishedDocument publishedDocument)
throws ClientException
- Description copied from interface:
PublicationTree
- Returns
true
if the current user can unpublish the given publishedDocument,
false
otherwise.
- Specified by:
canUnpublish
in interface PublicationTree
- Overrides:
canUnpublish
in class AbstractBasePublicationTree
- Returns:
true
if the current user can unpublish the given publishedDocument, false
otherwise.
- Throws:
ClientException
wrapToPublishedDocument
public PublishedDocument wrapToPublishedDocument(DocumentModel documentModel)
throws ClientException
- Specified by:
wrapToPublishedDocument
in interface PublicationTree
- Overrides:
wrapToPublishedDocument
in class AbstractBasePublicationTree
- Throws:
ClientException
isPublicationNode
public boolean isPublicationNode(DocumentModel documentModel)
throws ClientException
- Description copied from interface:
PublicationTree
- Returns
true
if the given documentModel
is a PublicationNode of the current tree,
false
otherwise.
- Specified by:
isPublicationNode
in interface PublicationTree
- Overrides:
isPublicationNode
in class AbstractBasePublicationTree
- Throws:
ClientException
wrapToPublicationNode
public PublicationNode wrapToPublicationNode(DocumentModel documentModel)
throws ClientException
- Description copied from interface:
PublicationTree
- Returns a PublicationNode for the current tree built on the given
documentModel
.
- Specified by:
wrapToPublicationNode
in interface PublicationTree
- Overrides:
wrapToPublicationNode
in class AbstractBasePublicationTree
- Throws:
ClientException
- if the given documentModel cannot be a PublicationNode
Copyright © 2011 Nuxeo SAS. All Rights Reserved.