public class RatingSchemeImpl extends java.lang.Object implements RatingScheme, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean
| Constructor and Description |
|---|
RatingSchemeImpl(RatingSchemeRegistry registry) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
int |
compareTo(RatingScheme otherScheme)
This method can be used to sort RatingSchemes by name.
|
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 |
getModelPrefix()
This method returns the namespace (prefix e.g.
|
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 |
setModelPrefix(java.lang.String prefix) |
void |
setPropertyRollups(java.util.List rollupAlgorithms) |
void |
setSelfRatingAllowed(boolean selfRatingAllowed) |
java.lang.String |
toString() |
public RatingSchemeImpl(RatingSchemeRegistry registry)
public void setPropertyRollups(java.util.List rollupAlgorithms)
public void setModelPrefix(java.lang.String prefix)
public void init()
public java.util.List getPropertyRollups()
RatingSchemeproperty rollup algorithms
which are used in order to calculate rating totals, counts etc for a rated node.getPropertyRollups in interface RatingSchemepublic java.lang.String getModelPrefix()
RatingSchemegetModelPrefix in interface RatingSchemeRatingNamingConventionsUtilpublic void setBeanName(java.lang.String name)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic void setMinRating(float minRating)
public void setMaxRating(float maxRating)
public void setSelfRatingAllowed(boolean selfRatingAllowed)
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic float getMaxRating()
RatingSchemegetMaxRating in interface RatingSchemepublic float getMinRating()
RatingSchemegetMinRating in interface RatingSchemepublic boolean isSelfRatingAllowed()
RatingSchemetrue if the cm:creator of the node is allowed
to apply a rating to it, else false.isSelfRatingAllowed in interface RatingSchemepublic java.lang.String getName()
RatingSchemegetName in interface RatingSchemepublic java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(RatingScheme otherScheme)
compareTo in interface java.lang.ComparableCopyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.