public interface RatingService
The same activity object can handle multiple ratings by using different aspect
s.
Modifier and Type | Method and Description |
---|---|
void |
cancelRate(String username,
String activityObject,
String aspect)
Cancels a rate by the
username . |
void |
cancelRates(String activityObject,
String aspect)
Cancels all rates.
|
double |
getAverageRating(String activityObject,
String aspect)
Returns the average rating for the
activityObject on the given aspect . |
double |
getAverageRatingForUser(String username,
String activityObject,
String aspect)
Returns the average rating by
username for the activityObject on the given aspect . |
ActivitiesList |
getLastestRatedDocByUser(String username,
String aspect,
int limit)
Get the latest docs activities rated by a specific user
|
ActivitiesList |
getRatedChildren(String activityObject,
int rating,
String aspect)
Returns the list of their rated children
activityObject on the given aspect with rating . |
long |
getRatesCount(String activityObject,
int rating,
String aspect)
Returns the rates count for the
activityObject on the given aspect where the rating is equals to
rating . |
long |
getRatesCount(String activityObject,
String aspect)
Returns the rates count for the
activityObject on the given aspect . |
long |
getRatesCountForUser(String username,
String activityObject,
int rating,
String aspect)
Returns the rates count by
username for the activityObject on the given aspect where the
rating is equals to rating . |
long |
getRatesCountForUser(String username,
String activityObject,
String aspect)
Returns the rates count by
username for the activityObject on the given aspect . |
boolean |
hasUserRated(String username,
String activityObject,
String aspect)
Returns
true if the username already rated the activityObject on the given aspect
, false otherwise. |
void |
rate(String username,
int rating,
String activityObject,
String aspect)
Rates the
activityObject by the username . |
void rate(String username, int rating, String activityObject, String aspect)
activityObject
by the username
.rating
- the ratingaspect
- the rating aspectvoid cancelRate(String username, String activityObject, String aspect)
username
.activityObject
- the activity object on which cancelling the rateaspect
- the rating aspectvoid cancelRates(String activityObject, String aspect)
activityObject
- the activity object on which cancelling the rateaspect
- the rating aspect may be null.boolean hasUserRated(String username, String activityObject, String aspect)
true
if the username
already rated the activityObject
on the given aspect
, false
otherwise.long getRatesCount(String activityObject, String aspect)
activityObject
on the given aspect
.long getRatesCount(String activityObject, int rating, String aspect)
activityObject
on the given aspect
where the rating is equals to
rating
.long getRatesCountForUser(String username, String activityObject, String aspect)
username
for the activityObject
on the given aspect
.long getRatesCountForUser(String username, String activityObject, int rating, String aspect)
username
for the activityObject
on the given aspect
where the
rating is equals to rating
.double getAverageRating(String activityObject, String aspect)
activityObject
on the given aspect
.double getAverageRatingForUser(String username, String activityObject, String aspect)
username
for the activityObject
on the given aspect
.ActivitiesList getRatedChildren(String activityObject, int rating, String aspect)
activityObject
on the given aspect
with rating
.ActivitiesList getLastestRatedDocByUser(String username, String aspect, int limit)
username
- the desired userlimit
- Copyright © 2015 Nuxeo SA. All rights reserved.