Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.alfresco.repo.rating
Class AbstractRatingRollupAlgorithm
java.lang.Object
  org.alfresco.repo.rating.AbstractRatingRollupAlgorithm
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean

@org.alfresco.api.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
namespaceService
protected NodeService
nodeService
protected String
ratingSchemeName
protected org.alfresco.repo.rating.RatingServiceImpl
ratingServiceImpl
protected String
rollupName
Constructor Summary
AbstractRatingRollupAlgorithm(String rollupName)
Method Summary
void
afterPropertiesSet()
getRollupName()
          This method returns the rollup name, for example "Total" or "Count".
abstract Serializable
recalculate(NodeRef ratedNode)
void
setNamespaceService(NamespaceService namespaceService)
void
setNodeService(NodeService nodeService)
void
setRatingSchemeName(String ratingScheme)
void
setRatingService(RatingService ratingService)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
namespaceService
protected NamespaceService namespaceService

nodeService
protected NodeService nodeService

ratingSchemeName
protected String ratingSchemeName

ratingServiceImpl
protected org.alfresco.repo.rating.RatingServiceImpl ratingServiceImpl

rollupName
protected final String rollupName
Constructor Detail
AbstractRatingRollupAlgorithm
public AbstractRatingRollupAlgorithm(String rollupName)
Method Detail
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

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2018 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.