com.opensymphony.xwork.validator
Class ValidatorConfig

java.lang.Object
  extended by com.opensymphony.xwork.util.location.Located
      extended by com.opensymphony.xwork.validator.ValidatorConfig
All Implemented Interfaces:
Locatable

public class ValidatorConfig
extends Located

Holds the necessary information for configuring an instance of a Validator.

Version:
$Date: 2007-11-26 03:02:22 -0600 (Mon, 26 Nov 2007) $ $Id: ValidatorConfig.java 1687 2007-11-26 09:02:22Z tm_jee $
Author:
James House, Rainer Hermanns, tmjee

Field Summary
 
Fields inherited from class com.opensymphony.xwork.util.location.Located
location
 
Constructor Summary
ValidatorConfig()
           
ValidatorConfig(String validatorType, Map params)
           
 
Method Summary
 String getDefaultMessage()
           
 String getMessageKey()
           
 String[] getMessageParams()
           
 Map getParams()
           
 String getType()
           
 boolean isShortCircuit()
           
 void setDefaultMessage(String defaultMessage)
           
 void setMessageKey(String messageKey)
           
 void setMessageParams(String[] messageParams)
           
 void setParams(Map params)
           
 void setShortCircuit(boolean shortCircuit)
           
 void setType(String validatorType)
           
 
Methods inherited from class com.opensymphony.xwork.util.location.Located
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidatorConfig

public ValidatorConfig()

ValidatorConfig

public ValidatorConfig(String validatorType,
                       Map params)
Parameters:
validatorType -
params -
Method Detail

getDefaultMessage

public String getDefaultMessage()
Returns:
Returns the defaultMessage for the validator.

setDefaultMessage

public void setDefaultMessage(String defaultMessage)
Parameters:
defaultMessage - The defaultMessage to set on the validator.

getMessageKey

public String getMessageKey()
Returns:
Returns the messageKey for the validator.

setMessageKey

public void setMessageKey(String messageKey)
Parameters:
messageKey - The messageKey to set on the validator.

setMessageParams

public void setMessageParams(String[] messageParams)
Parameters:
messageParams - The i18n message parameters/arguments to be used.

getMessageParams

public String[] getMessageParams()
Returns:
The i18n message parameters/arguments to be used.

isShortCircuit

public boolean isShortCircuit()
Returns:
Returns wether the shortCircuit flag should be set on the validator.

setShortCircuit

public void setShortCircuit(boolean shortCircuit)
Parameters:
shortCircuit - Whether the validator's shortCircuit flag should be set.

getParams

public Map getParams()
Returns:
Returns the configured params to set on the validator.

setParams

public void setParams(Map params)
Parameters:
params - The configured params to set on the validator.

getType

public String getType()
Returns:
Returns the type of validator to configure.

setType

public void setType(String validatorType)
Parameters:
validatorType - The type of validator to configure.

WebWork Project Page