Class FileValidator
java.lang.Object
org.apache.fulcrum.intake.validator.DefaultValidator<jakarta.servlet.http.Part>
org.apache.fulcrum.intake.validator.FileValidator
- All Implemented Interfaces:
org.apache.avalon.framework.logger.LogEnabled
,InitableByConstraintMap
,Validator<jakarta.servlet.http.Part>
A validator that will compare a Part 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$
- Author:
- John McNally, Quinton McCombs, Colin Chalmers
-
Field Summary
Fields inherited from class org.apache.fulcrum.intake.validator.DefaultValidator
errorMessage, log, maxLength, maxLengthMessage, minLength, minLengthMessage, required, requiredMessage
Fields inherited from interface org.apache.fulcrum.intake.validator.Validator
FLEXIBLE_RULE_NAME, FORMAT_RULE_NAME, INVALID_NUMBER_RULE_NAME, MASK_RULE_NAME, MAX_LENGTH_RULE_NAME, MAX_VALUE_RULE_NAME, MIN_LENGTH_RULE_NAME, MIN_VALUE_RULE_NAME, REQUIRED_RULE_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
assertValidity
(jakarta.servlet.http.Part testValue) Determine whether a testValue meets the criteria specified in the constraints defined for this validatorMethods inherited from class org.apache.fulcrum.intake.validator.DefaultValidator
assertValidity, assertValidity, enableLogging, getMaxLength, getMaxLengthMessage, getMessage, getMinLength, getMinLengthMessage, getRequiredMessage, init, isRequired, isValid, isValid, setMaxLength, setMaxLengthMessage, setMinLength, setMinLengthMessage, setRequired, setRequiredMessage
-
Constructor Details
-
FileValidator
public FileValidator()Default constructor
-
-
Method Details
-
assertValidity
Determine whether a testValue meets the criteria specified in the constraints defined for this validator- Parameters:
testValue
- aPart
to be tested- Throws:
ValidationException
- containing an error message if the testValue did not pass the validation tests.
-