com.opensymphony.xwork2.validator.metadata
Class AbstractFieldValidatorDescription

java.lang.Object
  extended by com.opensymphony.xwork2.validator.metadata.AbstractFieldValidatorDescription
All Implemented Interfaces:
ValidatorDescription
Direct Known Subclasses:
ConversionErrorFieldValidatorDescription, DateRangeFieldValidatorDescription, DoubleRangeFieldValidatorDescription, EmailValidatorDescription, FieldExpressionValidatorDescription, IntRangeFieldValidatorDescription, RequiredFieldValidatorDescription, RequiredStringValidatorDescription, StringLengthFieldValidatorDescription, URLValidatorDescription, VisitorFieldValidatorDescription

public abstract class AbstractFieldValidatorDescription
extends java.lang.Object
implements ValidatorDescription

AbstractFieldValidatorDescription

Version:
$Id: AbstractFieldValidatorDescription.java 894090 2009-12-27 18:18:29Z martinc $
Author:
Rainer Hermanns

Field Summary
 java.lang.String fieldName
           
 java.lang.String key
           
protected static Logger log
          Jakarta commons-logging reference.
 java.lang.String message
           
 boolean shortCircuit
           
 boolean simpleValidator
           
 
Constructor Summary
AbstractFieldValidatorDescription()
           
AbstractFieldValidatorDescription(java.lang.String fieldName)
          Creates an AbstractFieldValidatorDescription with the specified field name.
 
Method Summary
abstract  java.lang.String asFieldXml()
          Returns the field validator XML definition.
abstract  java.lang.String asSimpleXml()
          Returns the validator XML definition.
 java.lang.String asXml()
          Returns the validator XML definition.
 java.lang.String getFieldName()
          Sets the field name for this validator rule.
 boolean isSimpleValidator()
           
 void setFieldName(java.lang.String fieldName)
          Sets the field name for this validator rule.
 void setKey(java.lang.String key)
          Sets the I18N message key.
 void setMessage(java.lang.String message)
          Sets the default validator failure message.
 void setShortCircuit(boolean shortCircuit)
          Set the shortCircuit flag.
 void setSimpleValidator(boolean simpleValidator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Logger log
Jakarta commons-logging reference.


fieldName

public java.lang.String fieldName

key

public java.lang.String key

message

public java.lang.String message

shortCircuit

public boolean shortCircuit

simpleValidator

public boolean simpleValidator
Constructor Detail

AbstractFieldValidatorDescription

public AbstractFieldValidatorDescription()

AbstractFieldValidatorDescription

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

Parameters:
fieldName -
Method Detail

getFieldName

public java.lang.String getFieldName()
Sets the field name for this validator rule.

Specified by:
getFieldName in interface ValidatorDescription
Returns:
fieldName the field name for this validator rule

setFieldName

public void setFieldName(java.lang.String fieldName)
Sets the field name for this validator rule.

Parameters:
fieldName - the field name for this validator rule

setKey

public void setKey(java.lang.String key)
Sets the I18N message key.

Specified by:
setKey in interface ValidatorDescription
Parameters:
key - the I18N message key

setMessage

public void setMessage(java.lang.String message)
Sets the default validator failure message.

Specified by:
setMessage in interface ValidatorDescription
Parameters:
message - the default validator failure message

setShortCircuit

public void setShortCircuit(boolean shortCircuit)
Set the shortCircuit flag.

Specified by:
setShortCircuit in interface ValidatorDescription
Parameters:
shortCircuit - the shortCircuit flag.

setSimpleValidator

public void setSimpleValidator(boolean simpleValidator)

isSimpleValidator

public boolean isSimpleValidator()
Specified by:
isSimpleValidator in interface ValidatorDescription

asXml

public java.lang.String asXml()
Returns the validator XML definition.

Specified by:
asXml in interface ValidatorDescription
Returns:
the validator XML definition.

asFieldXml

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

Returns:
the field validator XML definition.

asSimpleXml

public abstract java.lang.String asSimpleXml()
Returns the validator XML definition.

Returns:
the validator XML definition.


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