|
rating-service-context.xml
). The rating
schemes define a minimum and a maximum score value for that scheme.
Ratings can be applied,
updated and
removed.Method Summary | ||
void |
applyRating(NodeRef targetNode, float rating, String ratingSchemeName) This method applies the given rating to the specified target node. |
|
float |
getAverageRating(NodeRef targetNode, String ratingSchemeName) This method returns the average (mean) rating in the specified scheme for the specified nodeRef. |
|
org.alfresco.service.cmr.rating.Rating |
getRatingByCurrentUser(NodeRef targetNode, String ratingSchemeName) This method gets the Rating applied by the current user to the specified node in the specified RatingScheme - if there is one. |
|
getRatingRollup(NodeRef targetNode, String ratingSchemeName, String ratingRollupName) This method returns a 'rolled up' property value for the specified targetNode. |
||
List<org.alfresco.service.cmr.rating.Rating> |
getRatingsByCurrentUser(NodeRef targetNode) This method gets the ratings applied by the current user to the specified node. |
|
getRatingScheme(String ratingSchemeName) Returns the named rating scheme if there is one. |
||
getRatingSchemes() Returns the available rating schemes keyed by name. |
||
int |
getRatingsCount(NodeRef targetNode, String ratingSchemeName) This method gets the number of individual ratings which have been applied to the specified node in the specified RatingScheme. |
|
float |
getTotalRating(NodeRef targetNode, String ratingSchemeName) This method gets the total accumulated rating score for the specified node in the specified RatingScheme. |
|
org.alfresco.service.cmr.rating.Rating |
removeRatingByCurrentUser(NodeRef targetNode, String ratingSchemeName) This method removes any Rating applied by the current user to the specified node in the specified RatingScheme. |
null
.null
.null
.cm:rating
child nodes.
An example of such a roll up would be 'ratingTotal' which would be the sum of all ratings applied to the
targetNode in the specified rating scheme.
By rolling up property values from the various cm:rating
child nodes and persisting them
as individual properties on the cm:rateable
node itself, we are able to support indexing, searching
and sorting of such properties.
|