public class RatingSchemeImpl extends 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.
|
String |
getModelPrefix()
This method returns the namespace (prefix e.g.
|
String |
getName()
This method returns the name which uniquely identifies the rating scheme.
|
List<AbstractRatingRollupAlgorithm> |
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(String name) |
void |
setMaxRating(float maxRating) |
void |
setMinRating(float minRating) |
void |
setModelPrefix(String prefix) |
void |
setPropertyRollups(List<AbstractRatingRollupAlgorithm> rollupAlgorithms) |
void |
setSelfRatingAllowed(boolean selfRatingAllowed) |
String |
toString() |
public RatingSchemeImpl(RatingSchemeRegistry registry)
public void setPropertyRollups(List<AbstractRatingRollupAlgorithm> rollupAlgorithms)
public void setModelPrefix(String prefix)
public void init()
public List<AbstractRatingRollupAlgorithm> getPropertyRollups()
RatingSchemeproperty rollup algorithms
which are used in order to calculate rating totals, counts etc for a rated node.getPropertyRollups in interface RatingSchemepublic String getModelPrefix()
RatingSchemegetModelPrefix in interface RatingSchemeRatingNamingConventionsUtilpublic void setBeanName(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 Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic 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 String getName()
RatingSchemegetName in interface RatingSchemepublic int compareTo(RatingScheme otherScheme)
compareTo in interface Comparable<RatingScheme>Copyright © 2005–2018 Alfresco Software. All rights reserved.