Class RatingResource

    • Constructor Detail

      • RatingResource

        public RatingResource()
    • Method Detail

      • getBundleLocation

        protected String getBundleLocation()
        Description copied from class: RESTWebService
        Gets the location of the bundle to use.
        Overrides:
        getBundleLocation in class RESTWebService
        Returns:
        the classpath location of the localization bundle used by this Web service.
      • getComponentId

        public String getComponentId()
        Description copied from interface: SilverpeasWebResource
        Gets the identifier of the component instance to which the requested resource belongs to.
        Returns:
        the identifier of the Silverpeas component instance.
      • getRaterRating

        @GET
        @Produces("application/json")
        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

        @POST
        @Produces("application/json")
        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.