Class AbstractRatingRollupAlgorithm

java.lang.Object
org.alfresco.repo.rating.AbstractRatingRollupAlgorithm
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
RatingCountRollupAlgorithm, RatingTotalRollupAlgorithm

@AlfrescoPublicApi public abstract class AbstractRatingRollupAlgorithm extends Object implements org.springframework.beans.factory.InitializingBean
This class provides the basic implementation of a rating property rollup. By providing an implementation of this class (or reusing an existing one), injecting the object into the RatingScheme and following the content model naming conventions, it should be possible to have new rating property rollups automatically calculated and persisted into the Alfresco content model, thereby enabling indexing, searching and sorting of rating-related properties.
Since:
3.5
Author:
Neil McErlean
  • Field Details

  • Constructor Details

    • AbstractRatingRollupAlgorithm

      public AbstractRatingRollupAlgorithm(String rollupName)
  • Method Details

    • setRatingSchemeName

      public void setRatingSchemeName(String ratingScheme)
    • setNamespaceService

      public void setNamespaceService(NamespaceService namespaceService)
    • setNodeService

      public void setNodeService(NodeService nodeService)
    • setRatingService

      public void setRatingService(RatingService ratingService)
    • afterPropertiesSet

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

      public abstract Serializable recalculate(NodeRef ratedNode)
    • getRollupName

      public String getRollupName()
      This method returns the rollup name, for example "Total" or "Count". This rollup name is used as part of the convention-based naming of content model property names.
      Returns:
      String