wicket.markup.html.form.validation
Class IntegerValidator

java.lang.Object
  extended by wicket.markup.html.form.validation.AbstractValidator
      extended by wicket.markup.html.form.validation.StringValidator
          extended by wicket.markup.html.form.validation.IntegerValidator
All Implemented Interfaces:
java.io.Serializable, IValidator

Deprecated. @see NumberValidator

public class IntegerValidator
extends StringValidator

Ensures that the form component has a numeric value in a given range. The range static factory method constructs a IntegerValidator with minimum and maximum values specified as Java longs. Convenience fields exist for INT, POSITIVE_INT, LONG and POSITIVE_LONG which match the appropriate ranges of numbers.

Author:
Jonathan Locke
See Also:
Serialized Form

Field Summary
static IntegerValidator INT
          Deprecated. Validator that ensures int value.
static IntegerValidator LONG
          Deprecated. Validator that ensures long value.
static IntegerValidator POSITIVE_INT
          Deprecated. Validator that ensures positive int value.
static IntegerValidator POSITIVE_LONG
          Deprecated. Validator that ensures positive long value.
 
Constructor Summary
protected IntegerValidator(long min, long max)
          Deprecated. Protected constructor forces use of static factory method and static instances.
 
Method Summary
 long getMax()
          Deprecated. Gets the upper bound on valid length.
 long getMin()
          Deprecated. Gets the lower bound on valid length.
protected  java.util.Map messageModel(FormComponent formComponent)
          Deprecated. Gets the default variables for interpolation.
 void onValidate(FormComponent formComponent, java.lang.String value)
          Deprecated. Validates the given form component.
static IntegerValidator range(long min, long max)
          Deprecated. Gets a decimal validator with a given range.
 java.lang.String toString()
          Deprecated.  
 
Methods inherited from class wicket.markup.html.form.validation.StringValidator
exactLength, lengthBetween, maximumLength, minimumLength, validate
 
Methods inherited from class wicket.markup.html.form.validation.AbstractValidator
error, error, error, error, resourceKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INT

public static final IntegerValidator INT
Deprecated. 
Validator that ensures int value.


LONG

public static final IntegerValidator LONG
Deprecated. 
Validator that ensures long value.


POSITIVE_INT

public static final IntegerValidator POSITIVE_INT
Deprecated. 
Validator that ensures positive int value.


POSITIVE_LONG

public static final IntegerValidator POSITIVE_LONG
Deprecated. 
Validator that ensures positive long value.

Constructor Detail

IntegerValidator

protected IntegerValidator(long min,
                           long max)
Deprecated. 
Protected constructor forces use of static factory method and static instances. Or override it to implement resourceKey(Component)

Parameters:
min - Lower bound on valid decimal number
max - Upper bound on valid decimal number
Method Detail

range

public static final IntegerValidator range(long min,
                                           long max)
Deprecated. 
Gets a decimal validator with a given range.

Parameters:
min - Lower bound on valid decimal number
max - Upper bound on valid decimal number
Returns:
Validator object

getMax

public final long getMax()
Deprecated. 
Gets the upper bound on valid length.

Returns:
the upper bound on valid length

getMin

public final long getMin()
Deprecated. 
Gets the lower bound on valid length.

Returns:
the lower bound on valid length

onValidate

public final void onValidate(FormComponent formComponent,
                             java.lang.String value)
Deprecated. 
Validates the given form component. Ensures that the form component has a numeric value. If min and max arguments are given, this validator also ensures the value is in bounds.

Specified by:
onValidate in class StringValidator
Parameters:
formComponent - form component
value - The string value to validate
See Also:
StringValidator.onValidate(wicket.markup.html.form.FormComponent, java.lang.String)

messageModel

protected java.util.Map messageModel(FormComponent formComponent)
Deprecated. 
Description copied from class: AbstractValidator
Gets the default variables for interpolation. These are:

Overrides:
messageModel in class AbstractValidator
Parameters:
formComponent - form component
Returns:
a map with the variables for interpolation
See Also:
AbstractValidator.messageModel(wicket.markup.html.form.FormComponent)

toString

public java.lang.String toString()
Deprecated. 
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2004-2007 Wicket developers. All Rights Reserved.