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()
RatingScheme
property rollup algorithms
which are used in order to calculate rating totals, counts etc for a rated node.getPropertyRollups
in interface RatingScheme
public String getModelPrefix()
RatingScheme
getModelPrefix
in interface RatingScheme
RatingNamingConventionsUtil
public void setBeanName(String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
public 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.InitializingBean
Exception
public float getMaxRating()
RatingScheme
getMaxRating
in interface RatingScheme
public float getMinRating()
RatingScheme
getMinRating
in interface RatingScheme
public boolean isSelfRatingAllowed()
RatingScheme
true
if the cm:creator of the node is allowed
to apply a rating to it, else false
.isSelfRatingAllowed
in interface RatingScheme
public String getName()
RatingScheme
getName
in interface RatingScheme
public int compareTo(RatingScheme otherScheme)
compareTo
in interface Comparable<RatingScheme>
Copyright © 2005–2017 Alfresco Software. All rights reserved.