Package org.alfresco.repo.rating
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 Summary
FieldsModifier and TypeFieldDescriptionprotected NamespaceServiceprotected NodeServiceprotected Stringprotected RatingServiceImplprotected final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method returns the rollup name, for example "Total" or "Count".abstract Serializablerecalculate(NodeRef ratedNode) voidsetNamespaceService(NamespaceService namespaceService) voidsetNodeService(NodeService nodeService) voidsetRatingSchemeName(String ratingScheme) voidsetRatingService(RatingService ratingService)
-
Field Details
-
ratingSchemeName
-
namespaceService
-
nodeService
-
ratingServiceImpl
-
rollupName
-
-
Constructor Details
-
AbstractRatingRollupAlgorithm
-
-
Method Details
-
setRatingSchemeName
-
setNamespaceService
-
setNodeService
-
setRatingService
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
recalculate
-
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
-