com.opensymphony.xwork2.validator.metadata
Class StringLengthFieldValidatorDescription

java.lang.Object
  extended by com.opensymphony.xwork2.validator.metadata.AbstractFieldValidatorDescription
      extended by com.opensymphony.xwork2.validator.metadata.StringLengthFieldValidatorDescription
All Implemented Interfaces:
ValidatorDescription

public class StringLengthFieldValidatorDescription
extends AbstractFieldValidatorDescription

StringLengthFieldValidatorDescription

Version:
$Id: StringLengthFieldValidatorDescription.java 1833 2008-06-21 09:29:39Z rainerh $
Author:
Rainer Hermanns

Field Summary
 String maxLength
           
 String minLength
           
 boolean trim
           
 
Fields inherited from class com.opensymphony.xwork2.validator.metadata.AbstractFieldValidatorDescription
fieldName, key, log, message, shortCircuit, simpleValidator
 
Constructor Summary
StringLengthFieldValidatorDescription()
           
StringLengthFieldValidatorDescription(String fieldName)
          Creates an AbstractFieldValidatorDescription with the specified field name.
 
Method Summary
 String asFieldXml()
          Returns the field validator XML definition.
 String asSimpleXml()
          Returns the validator XML definition.
 void setMaxLength(String maxLength)
           
 void setMinLength(String minLength)
           
 void setTrim(boolean trim)
           
 
Methods inherited from class com.opensymphony.xwork2.validator.metadata.AbstractFieldValidatorDescription
asXml, getFieldName, isSimpleValidator, setFieldName, setKey, setMessage, setShortCircuit, setSimpleValidator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

trim

public boolean trim

minLength

public String minLength

maxLength

public String maxLength
Constructor Detail

StringLengthFieldValidatorDescription

public StringLengthFieldValidatorDescription()

StringLengthFieldValidatorDescription

public StringLengthFieldValidatorDescription(String fieldName)
Creates an AbstractFieldValidatorDescription with the specified field name.

Parameters:
fieldName -
Method Detail

setTrim

public void setTrim(boolean trim)

setMinLength

public void setMinLength(String minLength)

setMaxLength

public void setMaxLength(String maxLength)

asFieldXml

public String asFieldXml()
Returns the field validator XML definition.

Specified by:
asFieldXml in class AbstractFieldValidatorDescription
Returns:
the field validator XML definition.

asSimpleXml

public String asSimpleXml()
Returns the validator XML definition.

Specified by:
asSimpleXml in class AbstractFieldValidatorDescription
Returns:
the validator XML definition.


Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.