org.alfresco.repo.rating
Class RatingSchemeImpl

java.lang.Object
  extended by org.alfresco.repo.rating.RatingSchemeImpl
All Implemented Interfaces:
RatingScheme, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

public class RatingSchemeImpl
extends java.lang.Object
implements RatingScheme, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean


Constructor Summary
RatingSchemeImpl(RatingSchemeRegistry registry)
           
 
Method Summary
 void afterPropertiesSet()
           
 float getMaxRating()
          This method returns the maximum rating defined for this scheme.
 float getMinRating()
          This method returns the minimum rating defined for this scheme.
 java.lang.String getName()
          This method returns the name which uniquely identifies the rating scheme.
 java.util.List getPropertyRollups()
          This method returns a List of property rollup algorithms which are used in order to calculate rating totals, counts etc for a rated node.
 void init()
           
 boolean isSelfRatingAllowed()
          This method returns true if the cm:creator of the node is allowed to apply a rating to it, else false.
 void setBeanName(java.lang.String name)
           
 void setMaxRating(float maxRating)
           
 void setMinRating(float minRating)
           
 void setPropertyRollups(java.util.List rollupAlgorithms)
           
 void setSelfRatingAllowed(boolean selfRatingAllowed)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RatingSchemeImpl

public RatingSchemeImpl(RatingSchemeRegistry registry)
Method Detail

setPropertyRollups

public void setPropertyRollups(java.util.List rollupAlgorithms)

init

public void init()

getPropertyRollups

public java.util.List getPropertyRollups()
Description copied from interface: RatingScheme
This method returns a List of property rollup algorithms which are used in order to calculate rating totals, counts etc for a rated node.

Specified by:
getPropertyRollups in interface RatingScheme
Returns:
an unmodifiable list of property rollup algorithms.

setBeanName

public void setBeanName(java.lang.String name)
Specified by:
setBeanName in interface org.springframework.beans.factory.BeanNameAware

setMinRating

public void setMinRating(float minRating)

setMaxRating

public void setMaxRating(float maxRating)

setSelfRatingAllowed

public void setSelfRatingAllowed(boolean selfRatingAllowed)

afterPropertiesSet

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

getMaxRating

public float getMaxRating()
Description copied from interface: RatingScheme
This method returns the maximum rating defined for this scheme.

Specified by:
getMaxRating in interface RatingScheme
Returns:
the maximum rating.

getMinRating

public float getMinRating()
Description copied from interface: RatingScheme
This method returns the minimum rating defined for this scheme.

Specified by:
getMinRating in interface RatingScheme
Returns:
the minimum rating.

isSelfRatingAllowed

public boolean isSelfRatingAllowed()
Description copied from interface: RatingScheme
This method returns true if the cm:creator of the node is allowed to apply a rating to it, else false.

Specified by:
isSelfRatingAllowed in interface RatingScheme
Returns:
whether or not the cm:creator of the node can apply a rating in this scheme.

getName

public java.lang.String getName()
Description copied from interface: RatingScheme
This method returns the name which uniquely identifies the rating scheme.

Specified by:
getName in interface RatingScheme
Returns:
the name.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.