|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The interface represents a service for handling the rating of resources.
A rating is an evaluation of a resource that can be expressed with
different values and value ranges. Different evaluations can be assigned icons
and a text that can be set individually.
Users with read permission for a resource can give a rating.
Each user can give only one rating.
The rating service can be configured. It offers a method that returns the current configuration.
| Field Summary | |
static java.lang.String |
KEY_COUNTRATE
Name of configuration property that represents the range of the rating, e.g. 5. |
static java.lang.String |
KEY_EMPTY_RATING_GIF
Name of configuration property that represents the icon used for negative rating. |
static java.lang.String |
KEY_FULL_RATING_GIF
Name of configuration property that represents the icon used for positive rating. |
static java.lang.String |
KEY_ICON_HEIGT
Name of configuration property that represents the height of the icons. |
static java.lang.String |
KEY_ICON_WIDTH
Name of configuration property that represents the width of the icons. |
static java.lang.String |
KEY_MAXCOMMENT
Name of configuration property that specifies the maximum number of comments that are initially displayed. |
| Method Summary | |
boolean |
addRating(IResource resource,
int iVote)
Adds a rating to a given resource. |
void |
deleteUserVoting(IResource resource,
java.lang.String userID)
Delete Voting for one User A UserID may be provided, if userID is null the user is identified by the resource context. |
void |
deleteVoting(IResource resource)
Delete Voting for thsi Resource all User Ratings wil be deleted too |
java.util.HashMap |
getLocalResourceBundle(IResource res)
Gets a hashmap that contains the individually set rating texts. |
java.util.Properties |
getProperties()
Gets all configuration data for this service. |
java.lang.String |
getRatingAverage(IResource resource)
Returns the rating average as string formatted as #.## |
int |
getRatingCount(IResource resource)
Gets sum of all ratings for a given resource. |
int |
getRatingUser(IResource resource)
Gets the number of users that have rated the given resource. |
java.util.Properties |
getRenderProperties()
Gets rendering configuration data for this service. |
int |
getUserVoting(IResource resource)
Gets the rating of a user for a given resource. |
| Field Detail |
public static final java.lang.String KEY_EMPTY_RATING_GIF
public static final java.lang.String KEY_FULL_RATING_GIF
public static final java.lang.String KEY_ICON_HEIGT
public static final java.lang.String KEY_ICON_WIDTH
public static final java.lang.String KEY_COUNTRATE
public static final java.lang.String KEY_MAXCOMMENT
| Method Detail |
public java.util.Properties getRenderProperties()
public boolean addRating(IResource resource,
int iVote)
throws WcmException
resource - the resource for which the comment is giveniVote - rating within predefined rangepublic int getRatingCount(IResource resource)
resource - the resource that was ratedpublic int getRatingUser(IResource resource)
resource - the resource for which ratings existpublic java.lang.String getRatingAverage(IResource resource)
resource - the resource for which ratings existpublic int getUserVoting(IResource resource)
resource - the resource that was ratedpublic java.util.HashMap getLocalResourceBundle(IResource res)
resource - to be ratedpublic java.util.Properties getProperties()
public void deleteUserVoting(IResource resource,
java.lang.String userID)
resource - the resource that was rateduserID - this Users Rating will be deletedpublic void deleteVoting(IResource resource)
resource - the resource that was rated
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||