Package org.alfresco.repo.rating
Class RatingSchemeImpl
java.lang.Object
org.alfresco.repo.rating.RatingSchemeImpl
- All Implemented Interfaces:
Comparable<RatingScheme>,RatingScheme,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
public class RatingSchemeImpl
extends Object
implements RatingScheme, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidintcompareTo(RatingScheme otherScheme) This method can be used to sort RatingSchemes by name.floatThis method returns the maximum rating defined for this scheme.floatThis method returns the minimum rating defined for this scheme.This method returns the namespace (prefix e.g.getName()This method returns the name which uniquely identifies the rating scheme.This method returns a List ofproperty rollup algorithmswhich are used in order to calculate rating totals, counts etc for a rated node.voidinit()booleanThis method returnstrueif the cm:creator of the node is allowed to apply a rating to it, elsefalse.voidsetBeanName(String name) voidsetMaxRating(float maxRating) voidsetMinRating(float minRating) voidsetModelPrefix(String prefix) voidsetPropertyRollups(List<AbstractRatingRollupAlgorithm> rollupAlgorithms) voidsetSelfRatingAllowed(boolean selfRatingAllowed) toString()
-
Constructor Details
-
RatingSchemeImpl
-
-
Method Details
-
setPropertyRollups
-
setModelPrefix
-
init
public void init() -
getPropertyRollups
Description copied from interface:RatingSchemeThis method returns a List ofproperty rollup algorithmswhich are used in order to calculate rating totals, counts etc for a rated node.- Specified by:
getPropertyRollupsin interfaceRatingScheme- Returns:
- an unmodifiable list of property rollup algorithms.
-
getModelPrefix
Description copied from interface:RatingSchemeThis method returns the namespace (prefix e.g. "cm") of the Alfresco content model containing the definitions of the rollup aspect and properties.- Specified by:
getModelPrefixin interfaceRatingScheme- See Also:
-
setBeanName
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
setMinRating
public void setMinRating(float minRating) -
setMaxRating
public void setMaxRating(float maxRating) -
setSelfRatingAllowed
public void setSelfRatingAllowed(boolean selfRatingAllowed) -
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getMaxRating
public float getMaxRating()Description copied from interface:RatingSchemeThis method returns the maximum rating defined for this scheme.- Specified by:
getMaxRatingin interfaceRatingScheme- Returns:
- the maximum rating.
-
getMinRating
public float getMinRating()Description copied from interface:RatingSchemeThis method returns the minimum rating defined for this scheme.- Specified by:
getMinRatingin interfaceRatingScheme- Returns:
- the minimum rating.
-
isSelfRatingAllowed
public boolean isSelfRatingAllowed()Description copied from interface:RatingSchemeThis method returnstrueif the cm:creator of the node is allowed to apply a rating to it, elsefalse.- Specified by:
isSelfRatingAllowedin interfaceRatingScheme- Returns:
- whether or not the cm:creator of the node can apply a rating in this scheme.
-
getName
Description copied from interface:RatingSchemeThis method returns the name which uniquely identifies the rating scheme.- Specified by:
getNamein interfaceRatingScheme- Returns:
- the name.
-
toString
-
compareTo
This method can be used to sort RatingSchemes by name.- Specified by:
compareToin interfaceComparable<RatingScheme>- Since:
- 4.1.5
-