Class AbstractRatingScheme

  • All Implemented Interfaces:
    RatingScheme, org.springframework.beans.factory.InitializingBean
    Direct Known Subclasses:
    FiveStarRatingScheme, LikesRatingScheme

    public abstract class AbstractRatingScheme
    extends Object
    implements RatingScheme, org.springframework.beans.factory.InitializingBean
    Manages the mapping between the rest api's representation of a node rating and the repository's representation of a node rating.
    Author:
    steveglover
    • Field Detail

      • ratingSchemeName

        protected String ratingSchemeName
      • ratingSchemeId

        protected String ratingSchemeId
      • nodeRatingSchemeRegistry

        protected org.alfresco.util.registry.NamedObjectRegistry<RatingScheme> nodeRatingSchemeRegistry
    • Constructor Detail

      • AbstractRatingScheme

        public AbstractRatingScheme​(String ratingSchemeId,
                                    String ratingSchemeName)
    • Method Detail

      • getRatingSchemeId

        public String getRatingSchemeId()
      • getRatingServiceName

        public String getRatingServiceName()
      • setNodeRatingSchemeRegistry

        public void setNodeRatingSchemeRegistry​(org.alfresco.util.registry.NamedObjectRegistry<RatingScheme> nodeRatingSchemeRegistry)
      • setActivityService

        public void setActivityService​(ActivityService activityService)
      • setSiteService

        public void setSiteService​(SiteService siteService)
      • setNodeService

        public void setNodeService​(NodeService nodeService)
      • setDictionaryService

        public void setDictionaryService​(DictionaryService dictionaryService)
      • setRatingService

        public void setRatingService​(RatingService ratingService)
      • getRepoRatingScheme

        protected RatingScheme getRepoRatingScheme()
      • getApiRating

        protected abstract Object getApiRating​(Float rating)
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        Exception
      • validateRating

        public void validateRating​(Float rating)
      • postActivity

        protected void postActivity​(NodeRef nodeRef,
                                    String activityType)