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
public abstract class AbstractRatingRollupAlgorithm
- extends java.lang.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 described in RatingRollupNamingConventionsUtil
, 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
AbstractRatingRollupAlgorithm
public AbstractRatingRollupAlgorithm(java.lang.String rollupName)
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:
afterPropertiesSet
in interface org.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 see
RatingRollupNamingConventionsUtil
.
- Returns:
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.