public class RemotePublicationTreeManagerRestProxy extends Object implements RemotePublicationTreeManager
RemotePublicationTreeManager
service. This facade
uses a invoker to do the actual calls to the remote back-end.Constructor and Description |
---|
RemotePublicationTreeManagerRestProxy(String baseURL,
String userName,
String password,
RemotePublisherMarshaler marshaler) |
Modifier and Type | Method and Description |
---|---|
boolean |
canManagePublishing(String sid,
PublishedDocument publishedDocument)
Returns
true if the current user can manage the publishing of the
given published document, ie. |
boolean |
canPublishTo(String sid,
PublicationNode publicationNode)
Returns
true if the current user can publish to the specified
publicationNode, false otherwise. |
boolean |
canUnpublish(String sid,
PublishedDocument publishedDocument)
Returns
true if the current user can unpublish the given
publishedDocument, false otherwise. |
List<PublishedDocument> |
getChildrenDocuments(PublicationNode node) |
List<PublicationNode> |
getChildrenNodes(PublicationNode node) |
List<PublishedDocument> |
getExistingPublishedDocument(String sid,
DocumentLocation docLoc) |
PublicationNode |
getNodeByPath(String sid,
String path) |
PublicationNode |
getParent(PublicationNode node) |
List<PublishedDocument> |
getPublishedDocumentInNode(PublicationNode node) |
boolean |
hasValidationTask(String sid,
PublishedDocument publishedDocument) |
Map<String,String> |
initRemoteSession(String treeConfigName,
Map<String,String> params) |
boolean |
isPublicationNode(String sid,
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(String sid) |
void |
setCurrentDocument(String sid,
DocumentModel currentDocument)
Sets the current document on which the tree will be based, if needed.
|
void |
unpublish(DocumentModel doc,
PublicationNode targetNode) |
void |
unpublish(String sid,
PublishedDocument publishedDocument) |
void |
validatorPublishDocument(String sid,
PublishedDocument publishedDocument,
String comment)
A validator (the current user) approves the publication.
|
void |
validatorRejectPublication(String sid,
PublishedDocument publishedDocument,
String comment)
A validator (the current user) rejects the publication.
|
PublicationNode |
wrapToPublicationNode(String sid,
DocumentModel documentModel)
Returns a PublicationNode for the current tree built on the given
documentModel . |
PublishedDocument |
wrapToPublishedDocument(String sid,
DocumentModel documentModel) |
public RemotePublicationTreeManagerRestProxy(String baseURL, String userName, String password, RemotePublisherMarshaler marshaler)
public List<PublishedDocument> getChildrenDocuments(PublicationNode node) throws ClientException
getChildrenDocuments
in interface RemotePublicationTreeManager
ClientException
public List<PublicationNode> getChildrenNodes(PublicationNode node) throws ClientException
getChildrenNodes
in interface RemotePublicationTreeManager
ClientException
public List<PublishedDocument> getExistingPublishedDocument(String sid, DocumentLocation docLoc) throws ClientException
getExistingPublishedDocument
in interface RemotePublicationTreeManager
ClientException
public PublicationNode getNodeByPath(String sid, String path) throws ClientException
getNodeByPath
in interface RemotePublicationTreeManager
ClientException
public PublicationNode getParent(PublicationNode node)
getParent
in interface RemotePublicationTreeManager
public List<PublishedDocument> getPublishedDocumentInNode(PublicationNode node) throws ClientException
getPublishedDocumentInNode
in interface RemotePublicationTreeManager
ClientException
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode) throws ClientException
publish
in interface RemotePublicationTreeManager
ClientException
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params) throws ClientException
publish
in interface RemotePublicationTreeManager
ClientException
public void unpublish(DocumentModel doc, PublicationNode targetNode) throws ClientException
unpublish
in interface RemotePublicationTreeManager
ClientException
public void unpublish(String sid, PublishedDocument publishedDocument) throws ClientException
unpublish
in interface RemotePublicationTreeManager
ClientException
public Map<String,String> initRemoteSession(String treeConfigName, Map<String,String> params) throws Exception
initRemoteSession
in interface RemotePublicationTreeManager
Exception
public void setCurrentDocument(String sid, DocumentModel currentDocument) throws ClientException
RemotePublicationTreeManager
setCurrentDocument
in interface RemotePublicationTreeManager
currentDocument
- the current documentClientException
public void validatorPublishDocument(String sid, PublishedDocument publishedDocument, String comment) throws PublishingException
RemotePublicationTreeManager
validatorPublishDocument
in interface RemotePublicationTreeManager
publishedDocument
- the current published document that will be
approvedPublishingException
public void validatorRejectPublication(String sid, PublishedDocument publishedDocument, String comment) throws PublishingException
RemotePublicationTreeManager
validatorRejectPublication
in interface RemotePublicationTreeManager
publishedDocument
- the currently published document that will be
rejectedPublishingException
public boolean canPublishTo(String sid, PublicationNode publicationNode) throws ClientException
RemotePublicationTreeManager
true
if the current user can publish to the specified
publicationNode, false
otherwise.canPublishTo
in interface RemotePublicationTreeManager
true
if the current user can publish to the specified
publicationNode, false
otherwise.ClientException
public boolean canUnpublish(String sid, PublishedDocument publishedDocument) throws ClientException
RemotePublicationTreeManager
true
if the current user can unpublish the given
publishedDocument, false
otherwise.canUnpublish
in interface RemotePublicationTreeManager
true
if the current user can unpublish the given
publishedDocument, false
otherwise.ClientException
public boolean canManagePublishing(String sid, PublishedDocument publishedDocument) throws ClientException
RemotePublicationTreeManager
true
if the current user can manage the publishing of the
given published document, ie. approve or reject the document.canManagePublishing
in interface RemotePublicationTreeManager
ClientException
public boolean hasValidationTask(String sid, PublishedDocument publishedDocument) throws ClientException
hasValidationTask
in interface RemotePublicationTreeManager
ClientException
public PublishedDocument wrapToPublishedDocument(String sid, DocumentModel documentModel) throws ClientException
wrapToPublishedDocument
in interface RemotePublicationTreeManager
ClientException
public boolean isPublicationNode(String sid, DocumentModel documentModel)
RemotePublicationTreeManager
true
if the given documentModel
is a
PublicationNode of the current tree, false
otherwise.isPublicationNode
in interface RemotePublicationTreeManager
public PublicationNode wrapToPublicationNode(String sid, DocumentModel documentModel) throws ClientException
RemotePublicationTreeManager
documentModel
.wrapToPublicationNode
in interface RemotePublicationTreeManager
ClientException
- if the given documentModel cannot be a
PublicationNode.public void release(String sid)
release
in interface RemotePublicationTreeManager
Copyright © 2013 Nuxeo SA. All Rights Reserved.