public interface IRating
The rating service can be configured. It offers a method that returns the current configuration.
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
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
|
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.
|
static final String KEY_EMPTY_RATING_GIF
static final String KEY_FULL_RATING_GIF
static final String KEY_ICON_HEIGT
static final String KEY_ICON_WIDTH
static final String KEY_COUNTRATE
static final String KEY_MAXCOMMENT
Properties getRenderProperties()
boolean addRating(IResource resource, int iVote) throws WcmException
resource
- the resource for which the comment is giveniVote
- rating within predefined rangeWcmException
int getRatingCount(IResource resource)
resource
- the resource that was ratedint getRatingUser(IResource resource)
resource
- the resource for which ratings existString getRatingAverage(IResource resource)
resource
- the resource for which ratings existint getUserVoting(IResource resource)
resource
- the resource that was ratedHashMap getLocalResourceBundle(IResource res)
res
- resource to be ratedProperties getProperties()
void deleteUserVoting(IResource resource, String userID)
resource
- the resource that was rateduserID
- this Users Rating will be deletedvoid deleteVoting(IResource resource)
resource
- the resource that was ratedAccess Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice