org.apache.wicket.validation.validator
Class StringValidator.MinimumLengthValidator

java.lang.Object
  extended by org.apache.wicket.validation.validator.AbstractValidator
      extended by org.apache.wicket.validation.validator.StringValidator
          extended by org.apache.wicket.validation.validator.StringValidator.MinimumLengthValidator
All Implemented Interfaces:
java.io.Serializable, IClusterable, INullAcceptingValidator, IValidator
Enclosing class:
StringValidator

public static class StringValidator.MinimumLengthValidator
extends StringValidator

Validator for checking if the length of a String meets the minimum length requirement.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wicket.validation.validator.StringValidator
StringValidator.ExactLengthValidator, StringValidator.LengthBetweenValidator, StringValidator.MaximumLengthValidator, StringValidator.MinimumLengthValidator
 
Constructor Summary
StringValidator.MinimumLengthValidator(int minimum)
          Constructor that sets a minimum length value.
 
Method Summary
 int getMinimum()
          Retrieves the minimum length value.
protected  void onValidate(IValidatable validatable)
          see AbstractValidator#onValidate(IValidatable)
protected  java.lang.String resourceKey()
          Gets the message resource key for this validator's error message from the ApplicationSettings class.
protected  java.util.Map variablesMap(IValidatable validatable)
          Gets the default Map of variables.
 
Methods inherited from class org.apache.wicket.validation.validator.StringValidator
exactLength, lengthBetween, maximumLength, minimumLength
 
Methods inherited from class org.apache.wicket.validation.validator.AbstractValidator
error, error, error, error, messageModel, resourceKey, validate, validate, validateOnNullValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringValidator.MinimumLengthValidator

public StringValidator.MinimumLengthValidator(int minimum)
Constructor that sets a minimum length value.

Parameters:
minimum - the minimum length value
Method Detail

getMinimum

public final int getMinimum()
Retrieves the minimum length value.

Returns:
the minimum length value

onValidate

protected void onValidate(IValidatable validatable)
see AbstractValidator#onValidate(IValidatable)

Specified by:
onValidate in class AbstractValidator
Parameters:
validatable - the given IValidatable instance

resourceKey

protected java.lang.String resourceKey()
Description copied from class: AbstractValidator
Gets the message resource key for this validator's error message from the ApplicationSettings class. NOTE: THIS METHOD SHOULD NEVER RETURN null.

Overrides:
resourceKey in class AbstractValidator
Returns:
the message resource key for this validator
See Also:
AbstractValidator.resourceKey()

variablesMap

protected java.util.Map variablesMap(IValidatable validatable)
Description copied from class: AbstractValidator
Gets the default Map of variables. NOTE: THIS METHOD SHOULD NEVER RETURN null.

Overrides:
variablesMap in class AbstractValidator
Parameters:
validatable - the IValidatable instance being validated
Returns:
a Map of variables for variable interpolation
See Also:
AbstractValidator.variablesMap(IValidatable)


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.