com.sas.util.validators
Class MinMaxIntegerStringValidator

com.sas.util.validators.MinMaxIntegerStringValidator
All Implemented Interfaces:
ValidationInterface, java.io.Serializable

public class MinMaxIntegerStringValidator

See Also:
Serialized Form

Field Summary
protected  int max
           
protected  int min
           
protected static int VALUE_ABOVE_MAX
           
protected static int VALUE_BELOW_MIN
           
static java.lang.String valueAboveMax
           
static java.lang.String valueBelowMin
           
 
Fields inherited from class com.sas.util.validators.IntegerStringValidator
INVALID_FORMAT, invalidFormat, NOT_STRING, notString, RB_KEY
 
Fields inherited from class com.sas.util.validators.Validator
message, messages, msgObject
 
Constructor Summary
MinMaxIntegerStringValidator()
           
MinMaxIntegerStringValidator(int min, int max)
           
 
Method Summary
 void createValidationMessages()
          createValidationMessages is called by the constructor to create the collection of message objects that are accessed by validateValue.
 boolean validateValue(java.lang.Object component, java.lang.Object value)
          Default implementation.
 
Methods inherited from class com.sas.util.validators.IntegerStringValidator
normalizeValue
 
Methods inherited from class com.sas.util.validators.Validator
getExtendedBeanInfo, getValidationMessage, getValidationMessageCode, newValidationMessage, setValidationMessage, setValidationMessageCode
 

Field Detail

valueBelowMin

public static final java.lang.String valueBelowMin
See Also:
Constant Field Values

valueAboveMax

public static final java.lang.String valueAboveMax
See Also:
Constant Field Values

VALUE_BELOW_MIN

protected static final int VALUE_BELOW_MIN
See Also:
Constant Field Values

VALUE_ABOVE_MAX

protected static final int VALUE_ABOVE_MAX
See Also:
Constant Field Values

min

protected int min

max

protected int max
Constructor Detail

MinMaxIntegerStringValidator

public MinMaxIntegerStringValidator()

MinMaxIntegerStringValidator

public MinMaxIntegerStringValidator(int min,
                                    int max)
Method Detail

validateValue

public boolean validateValue(java.lang.Object component,
                             java.lang.Object value)
Description copied from class: Validator
Default implementation. Returns true. Subclasses should override and perform the actual validation.

Specified by:
validateValue in interface ValidationInterface
Overrides:
validateValue in class IntegerStringValidator
Parameters:
component - an object containing the value
value - the value to be validated
Returns:
true if the value us valid, false if not. If false is returned, the validator should call setValidationMessage with a String for a reason.
See Also:
ValidationInterface.validateValue(java.lang.Object, java.lang.Object)

createValidationMessages

public void createValidationMessages()
Description copied from class: Validator
createValidationMessages is called by the constructor to create the collection of message objects that are accessed by validateValue. This can be overridden by subclasses to allow for different messages to be displayed. For each message, newValidationMessage is called to create the actual Message object. Other data can then be set on the Message object if desired.

Overrides:
createValidationMessages in class IntegerStringValidator
See Also:
Validator.newValidationMessage(java.lang.String)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.