public interface UgcCommentApi
Modifier and Type | Method and Description |
---|---|
int |
countFlatComments(CommentsFilter filter)
Count comments that satisfy provided filtering parameters.
|
int |
countFlatComments(String itemUri,
CommentsFilter filter)
Count comments that satisfy provided filtering parameters.
|
int |
countFlatCommentsForPublication(long publicationId,
CommentsFilter filter)
Count comments that satisfy provided filtering parameters.
|
int |
countThreadedComments(CommentsFilter filter)
Count comments that satisfy provided filtering parameters.
|
int |
countThreadedComments(long commentId,
CommentsFilter filter)
Count all child comments of the comment with passed commentId.
|
int |
countThreadedComments(String itemUri,
CommentsFilter filter)
Count comments that satisfy provided filtering parameters.
|
int |
countThreadedCommentsForPublication(long publicationId,
CommentsFilter filter)
Count comments that satisfy provided filtering parameters.
|
Comment |
editComment(long editCommentId,
String newCommentContent,
com.sdl.web.ugc.Status status,
Map<String,String> metadata)
Edit existing ugc comment.
|
Comment |
getCommentById(long commentId,
boolean fetchMeta)
Get the comment by id.
|
User |
getUserById(String userId)
Get user by id.
|
Comment |
postComment(String itemUri,
String username,
String email,
String commentContent,
long parentCommentId,
Map<String,String> metadata)
Create new ugc comment.
|
void |
removeComment(long commentId)
Remove existing comment.
|
List<User> |
retrieveAllUsers()
Get all users.
|
List<Comment> |
retrieveFlatComments(CommentsFilter filter,
boolean orderDescending,
boolean fetchMeta)
Retrieve all comments that satisfy provided filtering parameters.
|
List<Comment> |
retrieveFlatComments(String itemUri,
CommentsFilter filter,
boolean orderDescending,
boolean fetchMeta)
Retrieve all comments that satisfy provided filtering parameters.
|
List<Comment> |
retrieveFlatCommentsForPublication(long publicationId,
CommentsFilter filter,
boolean orderDescending,
boolean fetchMeta)
Retrieve all comments that satisfy provided filtering parameters.
|
List<String> |
retrieveMetadataValues(String key)
Get the list of distinct metadata values for a given key.
|
List<Comment> |
retrieveThreadedComments(CommentsFilter filter,
boolean orderDescending,
boolean fetchMeta)
Retrieve all comments that satisfy provided filtering parameters.
|
List<Comment> |
retrieveThreadedComments(long commentId,
CommentsFilter filter,
boolean orderDescending,
boolean fetchMeta)
Retrieve all child comments of the comment with passed commentId.
|
List<Comment> |
retrieveThreadedComments(String itemUri,
CommentsFilter filter,
boolean orderDescending,
boolean fetchMeta)
Retrieve all comments that satisfy provided filtering parameters.
|
List<Comment> |
retrieveThreadedCommentsForPublication(long publicationId,
CommentsFilter filter,
boolean orderDescending,
boolean fetchMeta)
Retrieve all comments that satisfy provided filtering parameters.
|
Comment getCommentById(long commentId, boolean fetchMeta)
commentId
- the id of the comment.fetchMeta
- Flag indicates whether comments metadata will be fetched.List<Comment> retrieveFlatComments(CommentsFilter filter, boolean orderDescending, boolean fetchMeta)
filter
- the filter for fetch operation.
See com.sdl.delivery.ugc.client.comment.impl.SimpleCommentsFilter
orderDescending
- true if ordering status if desc, otherwise ascfetchMeta
- Flag indicates whether comments metadata will be fetched.List<Comment> retrieveFlatComments(String itemUri, CommentsFilter filter, boolean orderDescending, boolean fetchMeta)
itemUri
- the item uri to which the comments relates tofilter
- the filter for fetch operation.
See com.sdl.delivery.ugc.client.comment.impl.SimpleCommentsFilter
orderDescending
- true if ordering status if desc, otherwise ascfetchMeta
- Flag indicates whether comments metadata will be fetched.List<Comment> retrieveFlatCommentsForPublication(long publicationId, CommentsFilter filter, boolean orderDescending, boolean fetchMeta)
publicationId
- the publication id to which the comments relates tofilter
- the filter for fetch operation.
See com.sdl.delivery.ugc.client.comment.impl.SimpleCommentsFilter
orderDescending
- true if ordering status if desc, otherwise ascfetchMeta
- Flag indicates whether comments metadata will be fetched.int countFlatComments(CommentsFilter filter)
filter
- the filter for count operation.
See com.sdl.delivery.ugc.client.comment.impl.SimpleCommentsFilter
int countFlatComments(String itemUri, CommentsFilter filter)
itemUri
- the item uri to which the comments relates tofilter
- the filter for count operation.
See com.sdl.delivery.ugc.client.comment.impl.SimpleCommentsFilter
int countFlatCommentsForPublication(long publicationId, CommentsFilter filter)
publicationId
- the publicationId to which the comments relates tofilter
- the filter for count operation.
See com.sdl.delivery.ugc.client.comment.impl.SimpleCommentsFilter
List<Comment> retrieveThreadedComments(CommentsFilter filter, boolean orderDescending, boolean fetchMeta)
filter
- the filter for fetch operation.
See com.sdl.delivery.ugc.client.comment.impl.SimpleCommentsFilter
orderDescending
- true if ordering status if desc, otherwise ascfetchMeta
- Flag indicates whether comments metadata will be fetched.List<Comment> retrieveThreadedComments(String itemUri, CommentsFilter filter, boolean orderDescending, boolean fetchMeta)
itemUri
- the item uri to which the comments relates tofilter
- the filter for fetch operation.
See com.sdl.delivery.ugc.client.comment.impl.SimpleCommentsFilter
orderDescending
- true if ordering status if desc, otherwise ascfetchMeta
- Flag indicates whether comments metadata will be fetched.List<Comment> retrieveThreadedCommentsForPublication(long publicationId, CommentsFilter filter, boolean orderDescending, boolean fetchMeta)
publicationId
- the publicationId to which the comments relates tofilter
- the filter for fetch operation.
See com.sdl.delivery.ugc.client.comment.impl.SimpleCommentsFilter
orderDescending
- true if ordering status if desc, otherwise ascfetchMeta
- Flag indicates whether comments metadata will be fetched.int countThreadedComments(CommentsFilter filter)
filter
- the filter for count operation.
See com.sdl.delivery.ugc.client.comment.impl.SimpleCommentsFilter
int countThreadedComments(String itemUri, CommentsFilter filter)
itemUri
- the item uri to which the comments relates tofilter
- the filter for count operation.
See com.sdl.delivery.ugc.client.comment.impl.SimpleCommentsFilter
int countThreadedCommentsForPublication(long publicationId, CommentsFilter filter)
publicationId
- the publication id to which the comments relates tofilter
- the filter for count operation.
See com.sdl.delivery.ugc.client.comment.impl.SimpleCommentsFilter
List<Comment> retrieveThreadedComments(long commentId, CommentsFilter filter, boolean orderDescending, boolean fetchMeta)
commentId
- parent comment idfilter
- the filter for fetch operation.
See com.sdl.delivery.ugc.client.comment.impl.SimpleCommentsFilter
orderDescending
- true if ordering status if desc, otherwise ascfetchMeta
- Flag indicates whether comments metadata will be fetched.int countThreadedComments(long commentId, CommentsFilter filter)
commentId
- parent comment idfilter
- the filter for count operation.
See com.sdl.delivery.ugc.client.comment.impl.SimpleCommentsFilter
Comment postComment(String itemUri, String username, String email, String commentContent, long parentCommentId, Map<String,String> metadata)
itemUri
- the item uri to which this comment relates tousername
- the username of the user that is posting this comment. This parameter is ignored
if the user already existsemail
- the email of the user that is posting this comment. This parameter is ignored
if the user already existscommentContent
- the comment content. Should not be null or emptyparentCommentId
- the parent comment id, pass 0 if this is high level commentmetadata
- the comment metadataComment editComment(long editCommentId, String newCommentContent, com.sdl.web.ugc.Status status, Map<String,String> metadata)
editCommentId
- the id of the existing commentnewCommentContent
- the new comment content. If null or empty, the existing content will be reset to
empty string.status
- the new comment status. If null is passed - RESUBMITTED status is used
for edited commentmetadata
- the comment metadatavoid removeComment(long commentId)
commentId
- the id of the existing comment that has to be removedList<String> retrieveMetadataValues(String key)
key
- the key nameUser getUserById(String userId)
userId
- the user IdCopyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries