|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.rating.RatingServiceImpl
public class RatingServiceImpl
| Constructor Summary | |
|---|---|
RatingServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
applyRating(org.alfresco.service.cmr.repository.NodeRef targetNode,
float rating,
java.lang.String ratingSchemeName)
This method applies the given rating to the specified target node. |
float |
getAverageRating(org.alfresco.service.cmr.repository.NodeRef targetNode,
java.lang.String ratingSchemeName)
This method returns the average (mean) rating in the specified scheme for the specified nodeRef. |
Rating |
getRatingByCurrentUser(org.alfresco.service.cmr.repository.NodeRef targetNode,
java.lang.String ratingSchemeName)
This method gets the Rating applied by the current user to the specified node in the specified
RatingScheme - if there is one. |
RatingScheme |
getRatingScheme(java.lang.String ratingSchemeName)
Returns the named rating scheme if there is one. |
java.util.Map |
getRatingSchemes()
Returns the available rating schemes keyed by name. |
int |
getRatingsCount(org.alfresco.service.cmr.repository.NodeRef targetNode,
java.lang.String ratingSchemeName)
This method gets the number of individual ratings which have been applied to the specified node in the specified RatingScheme. |
float |
getTotalRating(org.alfresco.service.cmr.repository.NodeRef targetNode,
java.lang.String ratingSchemeName)
This method gets the total accumulated rating score for the specified node in the specified RatingScheme. |
Rating |
removeRatingByCurrentUser(org.alfresco.service.cmr.repository.NodeRef targetNode,
java.lang.String ratingScheme)
This method removes any Rating applied by the current user to the specified node in the specified
RatingScheme. |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
|
void |
setRatingSchemeRegistry(RatingSchemeRegistry schemeRegistry)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RatingServiceImpl()
| Method Detail |
|---|
public void setRatingSchemeRegistry(RatingSchemeRegistry schemeRegistry)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public java.util.Map getRatingSchemes()
RatingServicerating schemes keyed by name.
getRatingSchemes in interface RatingServicerating schemes.public RatingScheme getRatingScheme(java.lang.String ratingSchemeName)
RatingServicerating scheme if there is one.
getRatingScheme in interface RatingServiceratingSchemeName - name of the rating scheme.
rating schemes if one of that name is registered,
else null.
public void applyRating(org.alfresco.service.cmr.repository.NodeRef targetNode,
float rating,
java.lang.String ratingSchemeName)
throws RatingServiceException
RatingServiceRatingServiceException will be thrown.
applyRating in interface RatingServicetargetNode - the node to which the rating is to be applied.rating - the rating which is to be applied.ratingSchemeName - the name of the rating scheme to use.
RatingServiceException - if the rating is not within the range defined by the named scheme
or if the named scheme is not registered or if the rating would result
in multiple ratings by the same user.RatingService.getRatingSchemes(),
RatingScheme
public Rating getRatingByCurrentUser(org.alfresco.service.cmr.repository.NodeRef targetNode,
java.lang.String ratingSchemeName)
RatingServiceRating applied by the current user to the specified node in the specified
RatingScheme - if there is one.
getRatingByCurrentUser in interface RatingServicetargetNode - the node on which the rating is sought.
null.RatingService.getRatingSchemes(),
RatingScheme
public Rating removeRatingByCurrentUser(org.alfresco.service.cmr.repository.NodeRef targetNode,
java.lang.String ratingScheme)
RatingServiceRating applied by the current user to the specified node in the specified
RatingScheme.
removeRatingByCurrentUser in interface RatingServicetargetNode - the node from which the rating is to be removed.
null.RatingService.getRatingSchemes(),
RatingScheme
public float getTotalRating(org.alfresco.service.cmr.repository.NodeRef targetNode,
java.lang.String ratingSchemeName)
RatingServiceRatingScheme.
That is, the rating scores for all users for the specified
node are summed to give the result.
getTotalRating in interface RatingServicetargetNode - the node on which the rating total is sought.
RatingService.getRatingSchemes(),
RatingScheme
public float getAverageRating(org.alfresco.service.cmr.repository.NodeRef targetNode,
java.lang.String ratingSchemeName)
RatingService
getAverageRating in interface RatingServicetargetNode - the node for which an average is sought.ratingSchemeName - the rating scheme name in which the average is defined.
public int getRatingsCount(org.alfresco.service.cmr.repository.NodeRef targetNode,
java.lang.String ratingSchemeName)
RatingServiceRatingScheme.
getRatingsCount in interface RatingServicetargetNode - the node on which the rating is sought.
RatingService.getRatingSchemes(),
RatingScheme
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||