|
Clearspace API (1.10.14) Web Services Client Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RatingsService
| Method Summary | |
|---|---|
void |
addRating(long userID,
int objectType,
long objectID,
int ratingScore)
Add a rating to the JiveContentObject. |
Rating |
createRating(int score,
java.lang.String description)
Create a new rating with the specified attributes. |
int |
getAvailableRatingCount()
Returns the count of currently available ratings. |
Rating[] |
getAvailableRatings()
Returns an iterable of Rating objects that list all the available ratings. |
double |
getMeanRating(int objectType,
long objectID)
A convenience method which returns a geometric mean average of all the ratings given to the JiveContentObject. |
Rating |
getRating(long userID,
int objectType,
long objectID)
Returns the rating associated with the user, or null if this user hasn't rated the JiveContentObject. |
int |
getRatingCount(int objectType,
long objectID)
Returns the total number of ratings given to the JiveContentObject. |
Rating |
getRatingFromScore(int score)
Retrieve the rating with the specified score. |
Rating[] |
getRatings(int objectType,
long objectID)
Returns an Iterable of all the ratings given to the JiveContentObject. |
boolean |
hasRated(long userID,
int objectType,
long objectID)
Returns whether the user has rated the JiveContentObject or not. |
boolean |
isRatingsEnabled()
Returns true if the rating feature is turned on. |
void |
removeRating(int score)
Remove the specified rating from the list of currently available ratings. |
void |
setRatingsEnabled(boolean ratingsEnabled)
Enables or disables the ratings feature. |
| Method Detail |
|---|
boolean isRatingsEnabled()
void setRatingsEnabled(boolean ratingsEnabled)
ratingsEnabled - true to enable the rating feature, false to disable
UnauthorizedException - if not a system administratorRating[] getAvailableRatings()
int getAvailableRatingCount()
Rating getRatingFromScore(int score)
score - the score of the rating to retrieve
Rating createRating(int score,
java.lang.String description)
score - the score or rating level for the new ratingdescription - the description of the new rating
UnauthorizedException - if not a system administratorvoid removeRating(int score)
score - of
the Rating to remove
UnauthorizedException - if not a system administrator
Rating[] getRatings(int objectType,
long objectID)
throws com.jivesoftware.community.NotFoundException
JiveContentObject.
objectType - the JiveObject.getObjectType() ()} to return ratings forobjectID - the JiveObject.getID() ()} to return ratings for
JiveContentObject
com.jivesoftware.community.NotFoundException - if object not found
int getRatingCount(int objectType,
long objectID)
throws com.jivesoftware.community.NotFoundException
JiveContentObject.
objectType - the JiveObject.getObjectType() ()} to return ratings forobjectID - the JiveObject.getID() ()} to return ratings for
JiveContentObject.
com.jivesoftware.community.NotFoundException - if object not found
double getMeanRating(int objectType,
long objectID)
throws com.jivesoftware.community.NotFoundException
JiveContentObject.
objectType - the JiveObject.getObjectType() ()} to return ratings forobjectID - the JiveObject.getID() ()} to return ratings for
JiveContentObject.
com.jivesoftware.community.NotFoundException - if object not found
boolean hasRated(long userID,
int objectType,
long objectID)
throws com.jivesoftware.community.NotFoundException
JiveContentObject or not. This method will
always return false if the user is anonymous.
userID - of the user to checkobjectType - the JiveObject.getObjectType() ()} to return ratings forobjectID - the JiveObject.getID() ()} to return ratings for
JiveContentObject, false
otherwise. If the user is anonymous (null) this method will always return false.
com.jivesoftware.community.NotFoundException - if object not found
Rating getRating(long userID,
int objectType,
long objectID)
throws com.jivesoftware.community.NotFoundException
JiveContentObject. If the user is null (anonymous) this method will return null.
userID - of the user to checkobjectType - the JiveObject.getObjectType() ()} to return ratings forobjectID - the JiveObject.getID() ()} to return ratings for
JiveContentObject, or null if the user has not rated
the JiveContentObject or the user is anonymous.
com.jivesoftware.community.NotFoundException - if content object or user not found
void addRating(long userID,
int objectType,
long objectID,
int ratingScore)
throws com.jivesoftware.community.NotFoundException,
UnauthorizedException
JiveContentObject. If the user has already rated, this rating will replace
the previous rating. If the user is null (anonymous) this rating will be added to
the ratings for the JiveContentObject.
The author of the JiveContentObject cannot rate their own content.
userID - the user rating the JiveContentObjectobjectType - the JiveObject.getObjectType() ()} to return ratings forobjectID - the JiveObject.getID() ()} to return ratings forratingScore - the rating the user wants to give to the JiveContentObject
UnauthorizedException - if user does not have permissions
com.jivesoftware.community.NotFoundException - if content object or user not found
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||