public abstract class AbstractCommentService extends AlfrescoService implements CommentService
CONTENT_CACHE, RENDITION_CACHE, session
SORT_PROPERTY_CREATED_AT
Constructor and Description |
---|
AbstractCommentService(AlfrescoSession repositorySession)
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
Comment |
addComment(Node node,
String content)
Add a comment to the specified Node (Folder or Document).
|
protected abstract PagingResult<Comment> |
computeComment(org.apache.chemistry.opencmis.commons.impl.UrlBuilder url)
Internal method to compute data from server and transform it as high
level object.
|
void |
deleteComment(Node node,
Comment comment)
Remove the specified comment from the repository.
|
List<Comment> |
getComments(Node node)
List the available comments for the specified node.
|
PagingResult<Comment> |
getComments(Node node,
ListingContext listingContext)
List the available comments for the specified node.
|
protected abstract org.apache.chemistry.opencmis.commons.impl.UrlBuilder |
getCommentsUrl(Node node,
ListingContext listingContext,
boolean isReadOperation)
Internal method to retrieve node comments url.
|
protected abstract org.apache.chemistry.opencmis.commons.impl.UrlBuilder |
getCommentUrl(Node node,
Comment comment)
Internal method to retrieve a specific comment url.
|
protected abstract Comment |
parseData(Map<String,Object> json)
Parse Json Data response from the repository.
|
Comment |
updateComment(Node node,
Comment comment,
String content)
Updates the given comment with the provided content.
|
clear, convertException, convertNode, convertNode, convertStatusCode, delete, describeContents, getHttpInvoker, getSessionHttp, isCloudSession, isListNull, isMapNull, isObjectNull, isOnPremiseSession, isStringNull, post, put, read, saveContentStream, writeToParcel
public AbstractCommentService(AlfrescoSession repositorySession)
repositorySession
- : Repository Session.public List<Comment> getComments(Node node)
getComments
in interface CommentService
node
- : Node object (Folder or Document).protected abstract org.apache.chemistry.opencmis.commons.impl.UrlBuilder getCommentsUrl(Node node, ListingContext listingContext, boolean isReadOperation)
node
- : a commented nodelistingContext
- : define characteristics of the result (Optional
for Onpremise)public PagingResult<Comment> getComments(Node node, ListingContext listingContext)
CommentService.SORT_PROPERTY_CREATED_AT
getComments
in interface CommentService
node
- : Node object (Folder or Document).listingContext
- : define characteristics of the resultpublic Comment addComment(Node node, String content)
addComment
in interface CommentService
node
- : Node object (Folder or Document).content
- : Comment Contentprotected abstract org.apache.chemistry.opencmis.commons.impl.UrlBuilder getCommentUrl(Node node, Comment comment)
node
- : a commented nodecomment
- : the comment object (cloud only)public Comment updateComment(Node node, Comment comment, String content)
updateComment
in interface CommentService
comment
- : new content of a comment.public void deleteComment(Node node, Comment comment)
deleteComment
in interface CommentService
protected abstract Comment parseData(Map<String,Object> json)
json
- : Map of data.protected abstract PagingResult<Comment> computeComment(org.apache.chemistry.opencmis.commons.impl.UrlBuilder url)
url
- : Alfresco REST API activity urlCopyright © 2012-2018 Alfresco Software. All Rights Reserved.