|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | 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 String |
KEY_COUNTRATE
Name of configuration property that represents the range of the rating, e.g. 5. |
static String |
KEY_EMPTY_RATING_GIF
Name of configuration property that represents the icon used for negative rating. |
static String |
KEY_FULL_RATING_GIF
Name of configuration property that represents the icon used for positive rating. |
static String |
KEY_ICON_HEIGT
Name of configuration property that represents the height of the icons. |
static String |
KEY_ICON_WIDTH
Name of configuration property that represents the width of the icons. |
static 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,
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 |
HashMap |
getLocalResourceBundle(IResource res)
Gets a hashmap that contains the individually set rating texts. |
Properties |
getProperties()
Gets all configuration data for this service. |
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. |
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 String KEY_EMPTY_RATING_GIF
public static final String KEY_FULL_RATING_GIF
public static final String KEY_ICON_HEIGT
public static final String KEY_ICON_WIDTH
public static final String KEY_COUNTRATE
public static final String KEY_MAXCOMMENT
| Method Detail |
public Properties getRenderProperties()
public boolean addRating(IResource resource,
int iVote)
throws WcmException
resource - the resource for which the comment is giveniVote - rating within predefined range
WcmExceptionpublic int getRatingCount(IResource resource)
resource - the resource that was rated
public int getRatingUser(IResource resource)
resource - the resource for which ratings exist
public String getRatingAverage(IResource resource)
resource - the resource for which ratings exist
public int getUserVoting(IResource resource)
resource - the resource that was rated
public HashMap getLocalResourceBundle(IResource res)
public Properties getProperties()
public void deleteUserVoting(IResource resource,
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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||