org.sakaiproject.tool.gradebook.jsf
Class AssignmentGradeValidator

java.lang.Object
  extended byorg.sakaiproject.tool.gradebook.jsf.AssignmentGradeValidator
All Implemented Interfaces:
EventListener, Serializable, Validator

public class AssignmentGradeValidator
extends Object
implements Validator, Serializable

Validates assignment grades entered into the gradebook. Since we display a maximum of two decimal places in the UI, we use this validator to ensure that the maximum precision entered into the gradebook is also two decimal places. This should reduce rounding errors between actual scores and what is displayed in the UI.

Author:
Josh Holtzman
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
 
Constructor Summary
AssignmentGradeValidator()
           
 
Method Summary
 void validate(FacesContext context, UIComponent component, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssignmentGradeValidator

public AssignmentGradeValidator()
Method Detail

validate

public void validate(FacesContext context,
                     UIComponent component,
                     Object value)
              throws ValidatorException
Specified by:
validate in interface Validator
Throws:
ValidatorException
See Also:
Validator.validate(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)