Class RatingSchemeImpl

java.lang.Object
org.alfresco.repo.rating.RatingSchemeImpl
All Implemented Interfaces:
Comparable<RatingScheme>, RatingScheme, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

public class RatingSchemeImpl extends Object implements RatingScheme, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean
  • Constructor Details

  • Method Details

    • setPropertyRollups

      public void setPropertyRollups(List<AbstractRatingRollupAlgorithm> rollupAlgorithms)
    • setModelPrefix

      public void setModelPrefix(String prefix)
    • init

      public void init()
    • getPropertyRollups

      public List<AbstractRatingRollupAlgorithm> getPropertyRollups()
      Description copied from interface: RatingScheme
      This method returns a List of property rollup algorithms which are used in order to calculate rating totals, counts etc for a rated node.
      Specified by:
      getPropertyRollups in interface RatingScheme
      Returns:
      an unmodifiable list of property rollup algorithms.
    • getModelPrefix

      public String getModelPrefix()
      Description copied from interface: RatingScheme
      This method returns the namespace (prefix e.g. "cm") of the Alfresco content model containing the definitions of the rollup aspect and properties.
      Specified by:
      getModelPrefix in interface RatingScheme
      See Also:
    • setBeanName

      public void setBeanName(String name)
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
    • setMinRating

      public void setMinRating(float minRating)
    • setMaxRating

      public void setMaxRating(float maxRating)
    • setSelfRatingAllowed

      public void setSelfRatingAllowed(boolean selfRatingAllowed)
    • afterPropertiesSet

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

      public float getMaxRating()
      Description copied from interface: RatingScheme
      This method returns the maximum rating defined for this scheme.
      Specified by:
      getMaxRating in interface RatingScheme
      Returns:
      the maximum rating.
    • getMinRating

      public float getMinRating()
      Description copied from interface: RatingScheme
      This method returns the minimum rating defined for this scheme.
      Specified by:
      getMinRating in interface RatingScheme
      Returns:
      the minimum rating.
    • isSelfRatingAllowed

      public boolean isSelfRatingAllowed()
      Description copied from interface: RatingScheme
      This method returns true if the cm:creator of the node is allowed to apply a rating to it, else false.
      Specified by:
      isSelfRatingAllowed in interface RatingScheme
      Returns:
      whether or not the cm:creator of the node can apply a rating in this scheme.
    • getName

      public String getName()
      Description copied from interface: RatingScheme
      This method returns the name which uniquely identifies the rating scheme.
      Specified by:
      getName in interface RatingScheme
      Returns:
      the name.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(RatingScheme otherScheme)
      This method can be used to sort RatingSchemes by name.
      Specified by:
      compareTo in interface Comparable<RatingScheme>
      Since:
      4.1.5