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:
Neil McErlean
2010-07-13 13:31:07 +00:00
parent ed8497e2b7
commit eece9fef5e
9 changed files with 68 additions and 68 deletions

View File

@@ -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;
}