org.silverpeas.rating.web
Class RatingResource
java.lang.Object
com.silverpeas.web.RESTWebService
org.silverpeas.rating.web.RatingResource
@Service
@RequestScoped
@Authorized
public class RatingResource
- extends RESTWebService
A REST Web resource representing a given rating.
It is a web service that provides an access to a rating referenced by its URL.
Methods inherited from class com.silverpeas.web.RESTWebService |
getBundle, getGreaterUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getOrganisationController, getUriInfo, getUserDetail, getUserPreferences, getUserRoles, process, validateUserAuthentication, validateUserAuthorization |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RatingResource
public RatingResource()
getBundleLocation
protected String getBundleLocation()
- Description copied from class:
RESTWebService
- Gets the location of the bundle to use.
- Overrides:
getBundleLocation
in class RESTWebService
- Returns:
getComponentId
public String getComponentId()
- Description copied from class:
RESTWebService
- Gets the identifier of the component instance to which the requested resource belongs to.
- Specified by:
getComponentId
in class RESTWebService
- Returns:
- the identifier of the Silverpeas component instance.
getRaterRating
public RaterRatingEntity getRaterRating()
- Gets the JSON representation of the rating associated to defined content.
- Returns:
- the response to the HTTP GET request with the JSON representation of the rating.
saveRating
public javax.ws.rs.core.Response saveRating(String note)
asWebEntity
protected RaterRatingEntity asWebEntity(RaterRating raterRating)
- Converts the rating into its corresponding web entity.
- Parameters:
raterRating
- the rater rating to convert.
- Returns:
- the corresponding rating entity.
Copyright © 2016 Silverpeas. All Rights Reserved.