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 RemotePublicationTreeManagerpublic List<PublicationNode> getChildrenNodes(PublicationNode node)
getChildrenNodes in interface RemotePublicationTreeManagerpublic List<PublishedDocument> getExistingPublishedDocument(String sid, DocumentLocation docLoc)
getExistingPublishedDocument in interface RemotePublicationTreeManagerpublic PublicationNode getNodeByPath(String sid, String path)
getNodeByPath in interface RemotePublicationTreeManagerpublic PublicationNode getParent(PublicationNode node)
getParent in interface RemotePublicationTreeManagerpublic List<PublishedDocument> getPublishedDocumentInNode(PublicationNode node)
getPublishedDocumentInNode in interface RemotePublicationTreeManagerpublic PublishedDocument publish(DocumentModel doc, PublicationNode targetNode)
publish in interface RemotePublicationTreeManagerpublic PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
publish in interface RemotePublicationTreeManagerpublic void unpublish(DocumentModel doc, PublicationNode targetNode)
unpublish in interface RemotePublicationTreeManagerpublic void unpublish(String sid, PublishedDocument publishedDocument)
unpublish in interface RemotePublicationTreeManagerpublic Map<String,String> initRemoteSession(String treeConfigName, Map<String,String> params)
initRemoteSession in interface RemotePublicationTreeManagerpublic void setCurrentDocument(String sid, DocumentModel currentDocument)
RemotePublicationTreeManagersetCurrentDocument in interface RemotePublicationTreeManagercurrentDocument - the current documentpublic void validatorPublishDocument(String sid, PublishedDocument publishedDocument, String comment)
RemotePublicationTreeManagervalidatorPublishDocument in interface RemotePublicationTreeManagerpublishedDocument - the current published document that will be approvedpublic void validatorRejectPublication(String sid, PublishedDocument publishedDocument, String comment)
RemotePublicationTreeManagervalidatorRejectPublication in interface RemotePublicationTreeManagerpublishedDocument - the currently published document that will be rejectedpublic boolean canPublishTo(String sid, PublicationNode publicationNode)
RemotePublicationTreeManagertrue if the current user can publish to the specified publicationNode, false otherwise.canPublishTo in interface RemotePublicationTreeManagertrue if the current user can publish to the specified publicationNode, false otherwise.public boolean canUnpublish(String sid, PublishedDocument publishedDocument)
RemotePublicationTreeManagertrue if the current user can unpublish the given publishedDocument, false otherwise.canUnpublish in interface RemotePublicationTreeManagertrue if the current user can unpublish the given publishedDocument, false otherwise.public boolean canManagePublishing(String sid, PublishedDocument publishedDocument)
RemotePublicationTreeManagertrue if the current user can manage the publishing of the given published document, ie. approve
or reject the document.canManagePublishing in interface RemotePublicationTreeManagerpublic boolean hasValidationTask(String sid, PublishedDocument publishedDocument)
hasValidationTask in interface RemotePublicationTreeManagerpublic PublishedDocument wrapToPublishedDocument(String sid, DocumentModel documentModel)
wrapToPublishedDocument in interface RemotePublicationTreeManagerpublic boolean isPublicationNode(String sid, DocumentModel documentModel)
RemotePublicationTreeManagertrue if the given documentModel is a PublicationNode of the current tree, false
otherwise.isPublicationNode in interface RemotePublicationTreeManagerpublic PublicationNode wrapToPublicationNode(String sid, DocumentModel documentModel)
RemotePublicationTreeManagerdocumentModel.wrapToPublicationNode in interface RemotePublicationTreeManagerpublic void release(String sid)
release in interface RemotePublicationTreeManagerCopyright © 2016 Nuxeo SA. All rights reserved.