public class RemotePublicationTreeManagerRestProxy extends Object implements RemotePublicationTreeManager
RemotePublicationTreeManager
service. This facade uses a invoker to do the actual calls
to the remote back-end.Modifier and Type | Field and Description |
---|---|
protected String |
baseURL |
protected RemotePublicationInvoker |
invoker |
protected RemotePublisherMarshaler |
marshaler |
protected String |
password |
protected String |
userName |
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) |
protected RemotePublisherMarshaler marshaler
protected RemotePublicationInvoker invoker
public RemotePublicationTreeManagerRestProxy(String baseURL, String userName, String password, RemotePublisherMarshaler marshaler)
public List<PublishedDocument> getChildrenDocuments(PublicationNode node)
getChildrenDocuments
in interface RemotePublicationTreeManager
public List<PublicationNode> getChildrenNodes(PublicationNode node)
getChildrenNodes
in interface RemotePublicationTreeManager
public List<PublishedDocument> getExistingPublishedDocument(String sid, DocumentLocation docLoc)
getExistingPublishedDocument
in interface RemotePublicationTreeManager
public PublicationNode getNodeByPath(String sid, String path)
getNodeByPath
in interface RemotePublicationTreeManager
public PublicationNode getParent(PublicationNode node)
getParent
in interface RemotePublicationTreeManager
public List<PublishedDocument> getPublishedDocumentInNode(PublicationNode node)
getPublishedDocumentInNode
in interface RemotePublicationTreeManager
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode)
publish
in interface RemotePublicationTreeManager
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
publish
in interface RemotePublicationTreeManager
public void unpublish(DocumentModel doc, PublicationNode targetNode)
unpublish
in interface RemotePublicationTreeManager
public void unpublish(String sid, PublishedDocument publishedDocument)
unpublish
in interface RemotePublicationTreeManager
public Map<String,String> initRemoteSession(String treeConfigName, Map<String,String> params)
initRemoteSession
in interface RemotePublicationTreeManager
public void setCurrentDocument(String sid, DocumentModel currentDocument)
RemotePublicationTreeManager
setCurrentDocument
in interface RemotePublicationTreeManager
currentDocument
- the current documentpublic void validatorPublishDocument(String sid, PublishedDocument publishedDocument, String comment)
RemotePublicationTreeManager
validatorPublishDocument
in interface RemotePublicationTreeManager
publishedDocument
- the current published document that will be approvedpublic void validatorRejectPublication(String sid, PublishedDocument publishedDocument, String comment)
RemotePublicationTreeManager
validatorRejectPublication
in interface RemotePublicationTreeManager
publishedDocument
- the currently published document that will be rejectedpublic boolean canPublishTo(String sid, PublicationNode publicationNode)
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.public boolean canUnpublish(String sid, PublishedDocument publishedDocument)
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.public boolean canManagePublishing(String sid, PublishedDocument publishedDocument)
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
public boolean hasValidationTask(String sid, PublishedDocument publishedDocument)
hasValidationTask
in interface RemotePublicationTreeManager
public PublishedDocument wrapToPublishedDocument(String sid, DocumentModel documentModel)
wrapToPublishedDocument
in interface RemotePublicationTreeManager
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)
RemotePublicationTreeManager
documentModel
.wrapToPublicationNode
in interface RemotePublicationTreeManager
public void release(String sid)
release
in interface RemotePublicationTreeManager
Copyright © 2015 Nuxeo SA. All rights reserved.