org.sovt.impl
Class AbstractValidator

java.lang.Object
  extended byorg.sovt.impl.AbstractValidator
All Implemented Interfaces:
Validator
Direct Known Subclasses:
GroupValidator, LengthValidator, RequiredValidator

public abstract class AbstractValidator
extends java.lang.Object
implements Validator

This validator provides storage for single message. All subclassed validators do not need to create setMsg(String) method. You can specify optional "msg" or "message" parameter in an xml configuration file for such validators.

Author:
Vilmantas Baranauskas (vilmantas_baranauskas@yahoo.com)

Constructor Summary
AbstractValidator()
           
 
Method Summary
 java.lang.Object clone()
          Just returns super.clone().
 java.lang.String getMessage()
          Returns stored message.
 void setMessage(java.lang.String pMessage)
          Set message in case of failure.
 void setMsg(java.lang.String pMessage)
          Set message in case of failure.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sovt.Validator
validate
 

Constructor Detail

AbstractValidator

public AbstractValidator()
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Just returns super.clone(). There is no need to do a deep-cloning.

Specified by:
clone in interface Validator
Returns:
clone of itself.
Throws:
java.lang.CloneNotSupportedException

getMessage

public java.lang.String getMessage()
Returns stored message.

Returns:
stored message.

setMsg

public void setMsg(java.lang.String pMessage)
Set message in case of failure.

Parameters:
pMessage - used in case of failure.

setMessage

public void setMessage(java.lang.String pMessage)
Set message in case of failure.

Parameters:
pMessage - used in case of failure.


Copyright © 2003-2005 . All Rights Reserved.