public abstract class AbstractBasePublicationTree extends Object implements PublicationTree
Modifier and Type | Field and Description |
---|---|
static String |
ICON_COLLAPSED_KEY |
static String |
ICON_EXPANDED_KEY |
static String |
ROOT_PATH_KEY |
static String |
TITLE_KEY |
Constructor and Description |
---|
AbstractBasePublicationTree() |
Modifier and Type | Method and Description |
---|---|
boolean |
canManagePublishing(PublishedDocument publishedDocument)
Returns
true if the current user can manage the publishing of the given publishedDocument,
ie approve or reject the document. |
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> |
getChildrenDocuments() |
List<PublicationNode> |
getChildrenNodes() |
String |
getConfigName() |
String |
getIconCollapsed() |
String |
getIconExpanded() |
String |
getName() |
String |
getNodeType() |
PublicationNode |
getParent() |
String |
getPath() |
List<PublishedDocument> |
getPublishedDocumentInNode(PublicationNode node) |
String |
getSessionId() |
String |
getTitle() |
String |
getTreeConfigName() |
String |
getTreeTitle() |
String |
getTreeType() |
String |
getType() |
boolean |
hasValidationTask(PublishedDocument publishedDocument) |
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 |
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.
|
PublicationNode |
wrapToPublicationNode(DocumentModel documentModel)
Returns a PublicationNode for the current tree built on the given
documentModel . |
PublishedDocument |
wrapToPublishedDocument(DocumentModel documentModel) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getExistingPublishedDocument, getNodeByPath, release, unpublish, unpublish
public static final String ROOT_PATH_KEY
public static final String ICON_EXPANDED_KEY
public static final String ICON_COLLAPSED_KEY
public static final String TITLE_KEY
public void initTree(String sid, CoreSession coreSession, Map<String,String> parameters, PublishedDocumentFactory factory, String configName, String title) throws ClientException
initTree
in interface PublicationTree
ClientException
public String getConfigName()
getConfigName
in interface PublicationTree
public String getSessionId()
getSessionId
in interface PublicationNode
public String getNodeType()
getNodeType
in interface PublicationNode
public String getType()
getType
in interface PublicationNode
public String getTreeType()
getTreeType
in interface PublicationTree
public String getTreeTitle()
getTreeTitle
in interface PublicationTree
public List<PublishedDocument> getPublishedDocumentInNode(PublicationNode node) throws ClientException
getPublishedDocumentInNode
in interface PublicationTree
ClientException
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode) throws ClientException
publish
in interface PublicationTree
ClientException
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params) throws ClientException
publish
in interface PublicationTree
ClientException
public String getTitle() throws ClientException
getTitle
in interface PublicationNode
ClientException
public String getName() throws ClientException
getName
in interface PublicationNode
ClientException
public String getTreeConfigName()
getTreeConfigName
in interface PublicationNode
public PublicationNode getParent()
getParent
in interface PublicationNode
public List<PublicationNode> getChildrenNodes() throws ClientException
getChildrenNodes
in interface PublicationNode
ClientException
public List<PublishedDocument> getChildrenDocuments() throws ClientException
getChildrenDocuments
in interface PublicationNode
ClientException
public String getPath()
getPath
in interface PublicationNode
public void setCurrentDocument(DocumentModel currentDocument)
PublicationTree
Can be useful for some implementations that need to know on which document the user is.
setCurrentDocument
in interface PublicationTree
currentDocument
- the current documentpublic String getIconExpanded()
getIconExpanded
in interface PublicationTree
public String getIconCollapsed()
getIconCollapsed
in interface PublicationTree
public void validatorPublishDocument(PublishedDocument publishedDocument, String comment) throws ClientException
PublicationTree
validatorPublishDocument
in interface PublicationTree
publishedDocument
- the current published document that will be
approvedClientException
public void validatorRejectPublication(PublishedDocument publishedDocument, String comment) throws ClientException
PublicationTree
validatorRejectPublication
in interface PublicationTree
publishedDocument
- the currently published document that will be
rejectedClientException
public boolean canPublishTo(PublicationNode publicationNode) throws ClientException
PublicationTree
true
if the current user can publish to the specified publicationNode,
false
otherwise.canPublishTo
in interface PublicationTree
true
if the current user can publish to the specified publicationNode, false
otherwise.ClientException
public boolean canUnpublish(PublishedDocument publishedDocument) throws ClientException
PublicationTree
true
if the current user can unpublish the given publishedDocument,
false
otherwise.canUnpublish
in interface PublicationTree
true
if the current user can unpublish the given publishedDocument, false
otherwise.ClientException
public boolean hasValidationTask(PublishedDocument publishedDocument) throws ClientException
hasValidationTask
in interface PublicationTree
ClientException
public boolean canManagePublishing(PublishedDocument publishedDocument) throws ClientException
PublicationTree
true
if the current user can manage the publishing of the given publishedDocument,
ie approve or reject the document.canManagePublishing
in interface PublicationTree
ClientException
public PublishedDocument wrapToPublishedDocument(DocumentModel documentModel) throws ClientException
wrapToPublishedDocument
in interface PublicationTree
ClientException
public boolean isPublicationNode(DocumentModel documentModel) throws ClientException
PublicationTree
true
if the given documentModel
is a PublicationNode of the current tree,
false
otherwise.isPublicationNode
in interface PublicationTree
ClientException
public PublicationNode wrapToPublicationNode(DocumentModel documentModel) throws ClientException
PublicationTree
documentModel
.wrapToPublicationNode
in interface PublicationTree
ClientException
- if the given documentModel cannot be a PublicationNodeCopyright © 2011 Nuxeo SA. All Rights Reserved.