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 java.lang.Object implements org.springframework.beans.factory.InitializingBeanThis 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 theRatingSchemeand 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
Fields Modifier and Type Field Description protected org.alfresco.service.namespace.NamespaceServicenamespaceServiceprotected org.alfresco.service.cmr.repository.NodeServicenodeServiceprotected java.lang.StringratingSchemeNameprotected RatingServiceImplratingServiceImplprotected java.lang.StringrollupName
-
Constructor Summary
Constructors Constructor Description AbstractRatingRollupAlgorithm(java.lang.String rollupName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()java.lang.StringgetRollupName()This method returns the rollup name, for example "Total" or "Count".abstract java.io.Serializablerecalculate(org.alfresco.service.cmr.repository.NodeRef ratedNode)voidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)voidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)voidsetRatingSchemeName(java.lang.String ratingScheme)voidsetRatingService(RatingService ratingService)
-
-
-
Field Detail
-
ratingSchemeName
protected java.lang.String ratingSchemeName
-
namespaceService
protected org.alfresco.service.namespace.NamespaceService namespaceService
-
nodeService
protected org.alfresco.service.cmr.repository.NodeService nodeService
-
ratingServiceImpl
protected RatingServiceImpl ratingServiceImpl
-
rollupName
protected final java.lang.String rollupName
-
-
Method Detail
-
setRatingSchemeName
public void setRatingSchemeName(java.lang.String ratingScheme)
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
-
setRatingService
public void setRatingService(RatingService ratingService)
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
java.lang.Exception
-
recalculate
public abstract java.io.Serializable recalculate(org.alfresco.service.cmr.repository.NodeRef ratedNode)
-
getRollupName
public java.lang.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
-
-