public class RatingServiceImpl extends DefaultComponent implements RatingService
RatingService.lastModified| Constructor and Description |
|---|
RatingServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSuperSpaceRate(Activity fromActivity) |
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. |
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerContribution, registerExtension, setLastModified, setModifiedNow, unregisterContribution, unregisterExtensionpublic RatingServiceImpl()
public void rate(String username, int rating, String activityObject, String aspect)
RatingServiceactivityObject by the username.rate in interface RatingServicerating - the ratingaspect - the rating aspectpublic void cancelRate(String username, String activityObject, String aspect)
RatingServiceusername.cancelRate in interface RatingServiceactivityObject - the activity object on which cancelling the rateaspect - the rating aspectpublic void cancelRates(String activityObject, String aspect)
RatingServicecancelRates in interface RatingServiceactivityObject - the activity object on which cancelling the rateaspect - the rating aspect may be null.public boolean hasUserRated(String username, String activityObject, String aspect)
RatingServicetrue if the username already rated the activityObject on the given aspect
, false otherwise.hasUserRated in interface RatingServicepublic long getRatesCount(String activityObject, String aspect)
RatingServiceactivityObject on the given aspect.getRatesCount in interface RatingServicepublic long getRatesCount(String activityObject, int rating, String aspect)
RatingServiceactivityObject on the given aspect where the rating is equals to
rating.getRatesCount in interface RatingServicepublic long getRatesCountForUser(String username, String activityObject, String aspect)
RatingServiceusername for the activityObject on the given aspect.getRatesCountForUser in interface RatingServicepublic long getRatesCountForUser(String username, String activityObject, int rating, String aspect)
RatingServiceusername for the activityObject on the given aspect where the
rating is equals to rating.getRatesCountForUser in interface RatingServicepublic double getAverageRating(String activityObject, String aspect)
RatingServiceactivityObject on the given aspect.getAverageRating in interface RatingServicepublic double getAverageRatingForUser(String username, String activityObject, String aspect)
RatingServiceusername for the activityObject on the given aspect.getAverageRatingForUser in interface RatingServicepublic ActivitiesList getRatedChildren(String activityObject, int rating, String aspect)
RatingServiceactivityObject on the given aspect with rating.getRatedChildren in interface RatingServicepublic ActivitiesList getLastestRatedDocByUser(String username, String aspect, int limit)
RatingServicegetLastestRatedDocByUser in interface RatingServiceusername - the desired userprotected void addSuperSpaceRate(Activity fromActivity)
Copyright © 2015 Nuxeo SA. All rights reserved.