org.apache.fulcrum.intake.validator
Class FileValidator
java.lang.Object
org.apache.fulcrum.intake.validator.DefaultValidator
org.apache.fulcrum.intake.validator.FileValidator
- All Implemented Interfaces:
- InitableByConstraintMap, Validator
public class FileValidator
- extends DefaultValidator
A validator that will compare a FileItem testValue against the following
constraints in addition to those listed in DefaultValidator.
This validator can serve as the base class for more specific validators
- Version:
- $Id: FileValidator.java 671324 2008-06-24 20:01:41Z tv $
- Author:
- John McNally, Quinton McCombs, Colin Chalmers
Method Summary |
void |
assertValidity(org.apache.commons.fileupload.FileItem testValue)
Determine whether a testValue meets the criteria specified
in the constraints defined for this validator |
Methods inherited from class org.apache.fulcrum.intake.validator.DefaultValidator |
assertValidity, assertValidity, getMaxLength, getMaxLengthMessage, getMessage, getMinLength, getMinLengthMessage, getRequiredMessage, init, isRequired, isValid, isValid, setMaxLength, setMaxLengthMessage, setMinLength, setMinLengthMessage, setRequired, setRequiredMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileValidator
public FileValidator(Map paramMap)
throws IntakeException
- Constructor
- Parameters:
paramMap
- a Map
of rule
's
containing constraints on the input.
- Throws:
InvalidMaskException
- an invalid mask was specified
IntakeException
FileValidator
public FileValidator()
- Default constructor
assertValidity
public void assertValidity(org.apache.commons.fileupload.FileItem testValue)
throws ValidationException
- Determine whether a testValue meets the criteria specified
in the constraints defined for this validator
- Parameters:
testValue
- a FileItem
to be tested
- Throws:
ValidationException
- containing an error message if the
testValue did not pass the validation tests.
Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.