|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.logging.LogDelegator
org.olat.core.commons.services.commentAndRating.UserRatingsManager
public abstract class UserRatingsManager
Description:
The user ratings manager provides methods to rate any given OLATResourceable
object. To use this manager, make sure a proper implementation for the bean
'org.olat.core.commons.services.commentAndRating.UserRatingsManager' is
defined in the spring configuration.
Initial Date: 23.11.2009
| Constructor Summary | |
|---|---|
UserRatingsManager()
|
|
| Method Summary | |
|---|---|
abstract java.lang.Float |
calculateRatingAverage()
|
abstract java.lang.Long |
countRatings()
|
abstract UserRating |
createRating(Identity creator,
int ratingValue)
Create a new rating for the configured resource |
abstract int |
deleteAllRatings()
Delete all ratings for the configured resource and sub path |
abstract int |
deleteAllRatingsIgnoringSubPath()
Delete all ratingsfor the configured resource while ignoring the sub path. |
abstract int |
deleteRating(UserRating rating)
Delete a rating |
static UserRatingsManager |
getInstance(OLATResourceable ores,
java.lang.String subpath)
Factory method to create a ratings manager for the given OLATResourceable. |
abstract UserRating |
getRating(Identity identity)
Get the rating for the configured user |
void |
init(OLATResourceable ores,
java.lang.String subpath)
Helper method to set the olat resource for this manager |
abstract UserRating |
reloadRating(UserRating rating)
Reload the given user rating with the most recent version from the database |
abstract UserRating |
updateRating(UserRating rating,
int newRatingValue)
Update a rating. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserRatingsManager()
| Method Detail |
|---|
public static final UserRatingsManager getInstance(OLATResourceable ores,
java.lang.String subpath)
ores - The olat resourceable that provides a typename and a type idsubpath - an optional string that defines any subpath. Use this when
your ores is not specific enough
public void init(OLATResourceable ores,
java.lang.String subpath)
ores - subpath - public abstract java.lang.Long countRatings()
public abstract java.lang.Float calculateRatingAverage()
public abstract UserRating createRating(Identity creator,
int ratingValue)
creator - The user who is ratingratingValue - The rating
public abstract UserRating getRating(Identity identity)
identity -
public abstract UserRating reloadRating(UserRating rating)
public abstract UserRating updateRating(UserRating rating,
int newRatingValue)
rating - The rating which should be updatedrewRatingValue - The updated rating value
public abstract int deleteRating(UserRating rating)
rating - int - number of deleted ratingspublic abstract int deleteAllRatings()
public abstract int deleteAllRatingsIgnoringSubPath()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||