public interface LikeService
Modifier and Type | Method and Description |
---|---|
void |
cancel(String username,
DocumentModel doc)
Convenient method to cancel a like or dislike on a
DocumentModel . |
void |
cancel(String username,
String activityObject)
Cancel a like or dislike for the given
username . |
void |
dislike(String username,
DocumentModel doc)
Convenient method to dislike a
DocumentModel . |
void |
dislike(String username,
String activityObject)
Dislike the given
activityObject by the username . |
long |
getDislikesCount(DocumentModel doc)
Convenient method to returns the dislikes count for a
DocumentModel . |
long |
getDislikesCount(String activityObject)
Returns the dislikes count for the given
activityObject . |
long |
getLikesCount(DocumentModel doc)
Convenient method to returns the likes count for a
DocumentModel . |
long |
getLikesCount(String activityObject)
Returns the likes count for the given
activityObject . |
LikeStatus |
getLikeStatus(DocumentModel doc)
Convenient method to return the
LikeStatus for a DocumentModel . |
LikeStatus |
getLikeStatus(String activityObject)
Returns the
LikeStatus for the activityObject . |
LikeStatus |
getLikeStatus(String username,
DocumentModel doc)
|
LikeStatus |
getLikeStatus(String username,
String activityObject)
|
ActivitiesList |
getMostLikedActivities(CoreSession session,
int limit,
DocumentModel source)
An actitivitesList containing a documentActivity or a minimessageActivity as target, the likes count as object,
current user as actor and actor's likes in context.
|
ActivitiesList |
getMostLikedActivities(CoreSession session,
int limit,
DocumentModel source,
Date fromDt,
Date toDt)
An actitivitesList containing a documentActivity or a minimessageActivity as target, the likes count as object,
current user as actor and actor's likes in context the result will be between two dates
|
boolean |
hasUserDisliked(String username,
DocumentModel doc)
Returns
true if the given username already disliked the doc , false otherwise. |
boolean |
hasUserDisliked(String username,
String activityObject)
Returns
true if the given username already disliked the activityObject , false
otherwise. |
boolean |
hasUserLiked(String username,
DocumentModel doc)
Returns
true if the given username already liked the doc , false otherwise. |
boolean |
hasUserLiked(String username,
String activityObject)
Returns
true if the given username already liked the activityObject , false
otherwise. |
void |
like(String username,
DocumentModel doc)
Convenient method to like a
DocumentModel . |
void |
like(String username,
String activityObject)
Like the given
activityObject by the username . |
void like(String username, String activityObject)
activityObject
by the username
.void like(String username, DocumentModel doc)
DocumentModel
.like(String, String)
boolean hasUserLiked(String username, String activityObject)
true
if the given username
already liked the activityObject
, false
otherwise.boolean hasUserLiked(String username, DocumentModel doc)
true
if the given username
already liked the doc
, false
otherwise.long getLikesCount(String activityObject)
activityObject
.long getLikesCount(DocumentModel doc)
DocumentModel
.getLikesCount(String)
void dislike(String username, String activityObject)
activityObject
by the username
.void dislike(String username, DocumentModel doc)
DocumentModel
.dislike(String, String)
boolean hasUserDisliked(String username, String activityObject)
true
if the given username
already disliked the activityObject
, false
otherwise.boolean hasUserDisliked(String username, DocumentModel doc)
true
if the given username
already disliked the doc
, false
otherwise.long getDislikesCount(String activityObject)
activityObject
.long getDislikesCount(DocumentModel doc)
DocumentModel
.getDislikesCount(String)
void cancel(String username, String activityObject)
username
.username
- the usernameactivityObject
- the activity object on which to cancel the like or dislike.void cancel(String username, DocumentModel doc)
DocumentModel
.cancel(String, String)
LikeStatus getLikeStatus(String activityObject)
LikeStatus
for the activityObject
.LikeStatus getLikeStatus(DocumentModel doc)
LikeStatus
for a DocumentModel
.getLikeStatus(String)
LikeStatus getLikeStatus(String username, String activityObject)
LikeStatus
for the username
and activityObject
.
The returned LikeStatus
will have the information about the like / dislike status of the username
.
LikeStatus getLikeStatus(String username, DocumentModel doc)
getLikeStatus(String, String)
ActivitiesList getMostLikedActivities(CoreSession session, int limit, DocumentModel source)
limit
- maximum documents returnedsource
- the parent document when child will be reachedActivitiesList getMostLikedActivities(CoreSession session, int limit, DocumentModel source, Date fromDt, Date toDt)
limit
- maximum documents returnedsource
- the parent document when child will be reachedCopyright © 2017 Nuxeo. All rights reserved.