Interface RatingType

  • All Known Implementing Classes:
    DefaultRatingTypeImpl, RatingTypeImpl

    public interface RatingType
    Rating type This interface is exposed for the creation of the type of vote Example of building an rating type RatingType.newBuilder( SimpleRating.class, I18nService.getLocalizedString(SimpleRating.RATING_TITLE, LocaleService.getDefault( ))) .build();
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  RatingType.Builder
      Builder Interface
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void cancelRating​(Rating rating)
      Do cancel rating
      void doRating​(Rating rating)
      Consumer to rate
      java.util.List<Rating> getInfoExtender​(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)
      BiFunction to get the list of extender type information object
      java.util.List<Rating> getInfoExtenderByList​(java.util.List<java.lang.String> listIdExtendableResource, java.lang.String strExtendableResourceType)
      BiFunction to get the list of extender type information object
      java.lang.String getInfoForExport​(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)
      BinaryOperator to get the information value associate to the rating Type to export in the file export
      java.lang.String getInfoForRecap​(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)
      BinaryOperator to get the information value associate to the ExtenderType to write in the recap
      java.lang.String getPageAddOn​(RatingExtenderConfig ratingExtenderConfig, java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, java.lang.String strParameters, javax.servlet.http.HttpServletRequest request)
      GetPageAddOn
      java.lang.String getTitle()
      Get title of rating type
      java.lang.Class<? extends Rating> getType()
      Get type of this
      java.lang.String getTypeName()
      Get the name type of the rating type
      static RatingType.Builder newBuilder​(java.lang.Class<? extends Rating> type, java.lang.String strTitle)
      Get builder to building an rating type
      static RatingType newRatingType​(java.lang.Class<? extends Rating> type, java.lang.String strTitle)
      Build a new rating type
    • Method Detail

      • newRatingType

        static RatingType newRatingType​(java.lang.Class<? extends Rating> type,
                                        java.lang.String strTitle)
        Build a new rating type
        Parameters:
        type - the type of rating
        strTitle - the title of rating type
        Returns:
        an instance of rating type
      • newBuilder

        static RatingType.Builder newBuilder​(java.lang.Class<? extends Rating> type,
                                             java.lang.String strTitle)
        Get builder to building an rating type
        Parameters:
        type - the type of rating
        strTitle - the title of the rating type
        Returns:
        builder
      • doRating

        void doRating​(Rating rating)
        Consumer to rate
        Parameters:
        doRating - the Consumer interface
      • cancelRating

        void cancelRating​(Rating rating)
        Do cancel rating
        Parameters:
        doCancelRating - the Consumer interface
      • getPageAddOn

        java.lang.String getPageAddOn​(RatingExtenderConfig ratingExtenderConfig,
                                      java.lang.String strIdExtendableResource,
                                      java.lang.String strExtendableResourceType,
                                      java.lang.String strParameters,
                                      javax.servlet.http.HttpServletRequest request)
        GetPageAddOn
        Parameters:
        getPageAddOn - the QuinquaFunction interface
      • getType

        java.lang.Class<? extends Rating> getType()
        Get type of this
        Returns:
        type rating
      • getTypeName

        java.lang.String getTypeName()
        Get the name type of the rating type
        Returns:
        type name
      • getTitle

        java.lang.String getTitle()
        Get title of rating type
        Returns:
        the title of rating
      • getInfoForExport

        java.lang.String getInfoForExport​(java.lang.String strIdExtendableResource,
                                          java.lang.String strExtendableResourceType)
        BinaryOperator to get the information value associate to the rating Type to export in the file export
        Parameters:
        getInfoForExport - the BinaryOperator
      • getInfoForRecap

        java.lang.String getInfoForRecap​(java.lang.String strIdExtendableResource,
                                         java.lang.String strExtendableResourceType)
        BinaryOperator to get the information value associate to the ExtenderType to write in the recap
        Parameters:
        getInfoForRecap - the BinaryOperator
      • getInfoExtender

        java.util.List<Rating> getInfoExtender​(java.lang.String strIdExtendableResource,
                                               java.lang.String strExtendableResourceType)
        BiFunction to get the list of extender type information object
        Parameters:
        getInfoExtender - the BiFunction
      • getInfoExtenderByList

        java.util.List<Rating> getInfoExtenderByList​(java.util.List<java.lang.String> listIdExtendableResource,
                                                     java.lang.String strExtendableResourceType)
        BiFunction to get the list of extender type information object
        Parameters:
        getInfoExtenderByList - the BiFunction