mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Rating Service. Allow fractional ratings.
I've changed the ratings 'score' from an integer to a float as fractional ratings seems like a reasonable idea to me. This had impact all through the Java layer, the REST layer, the model and the test code. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21128 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -33,7 +33,7 @@ public class RatingSchemeImpl implements RatingScheme, BeanNameAware, Initializi
|
||||
private final RatingSchemeRegistry ratingSchemeRegistry;
|
||||
|
||||
private String name;
|
||||
private int minRating, maxRating;
|
||||
private float minRating, maxRating;
|
||||
|
||||
public RatingSchemeImpl(RatingSchemeRegistry registry)
|
||||
{
|
||||
@@ -54,12 +54,12 @@ public class RatingSchemeImpl implements RatingScheme, BeanNameAware, Initializi
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setMinRating(int minRating)
|
||||
public void setMinRating(float minRating)
|
||||
{
|
||||
this.minRating = minRating;
|
||||
}
|
||||
|
||||
public void setMaxRating(int maxRating)
|
||||
public void setMaxRating(float maxRating)
|
||||
{
|
||||
this.maxRating = maxRating;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public class RatingSchemeImpl implements RatingScheme, BeanNameAware, Initializi
|
||||
* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.rating.RatingScheme#getMaxRating()
|
||||
*/
|
||||
public int getMaxRating()
|
||||
public float getMaxRating()
|
||||
{
|
||||
return this.maxRating;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public class RatingSchemeImpl implements RatingScheme, BeanNameAware, Initializi
|
||||
* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.rating.RatingScheme#getMinRating()
|
||||
*/
|
||||
public int getMinRating()
|
||||
public float getMinRating()
|
||||
{
|
||||
return this.minRating;
|
||||
}
|
||||
|
Reference in New Issue
Block a user