org.sourceid.saml20.adapter.gui.validation.impl
Class LongValidator

java.lang.Object
  extended by org.sourceid.saml20.adapter.gui.validation.impl.LongValidator
All Implemented Interfaces:
FieldValidator

public class LongValidator
extends java.lang.Object
implements FieldValidator

The LongValidator class validates a 8-byte integer. Optionally, it allows users to specify a range in the constructor.

Author:
Guoping Liu

Constructor Summary
LongValidator()
          Constructs a LongValidator with no specific range.
LongValidator(long lowerBound, long upperBound)
          Constructs a LongValidator with the specified range [lowerBound, upperBound].
 
Method Summary
 void validate(Field field)
          Validate if the fieldValue string represents a valid 8-byte integer and the value is within the specified boundary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongValidator

public LongValidator()
Constructs a LongValidator with no specific range.


LongValidator

public LongValidator(long lowerBound,
                     long upperBound)
Constructs a LongValidator with the specified range [lowerBound, upperBound].

Parameters:
lowerBound - the lower bound of the range.
upperBound - the upper bound of the range.
Method Detail

validate

public void validate(Field field)
              throws ValidationException
Validate if the fieldValue string represents a valid 8-byte integer and the value is within the specified boundary.

Specified by:
validate in interface FieldValidator
Parameters:
field - the field (name and value) to validate.
Throws:
ValidationException - if the field is invalid.


Copyright 2007 Ping Identity Corp. All rights reserved.