|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.xui.validation.XBaseValidator
public abstract class XBaseValidator
A basic implementation of the XValidator interface
Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
| Field Summary | |
|---|---|
protected java.lang.Object |
container
Container to be used for validation methods |
protected int |
errorLevel
The level of the errors detected by the validation |
protected java.lang.String |
formattedMessage
The formatted message |
protected boolean |
mandatory
boolean indicating whether component requires input |
protected int |
mask
The event mask of the validation |
protected java.lang.String |
message
The unformatted message to be displayed |
protected boolean |
start
Indicates that the validation has started |
protected java.lang.reflect.Method |
validationMethod
Method to be used for callback validations |
protected java.lang.String |
validationName
The name of the validation which is being handled by this validator |
protected java.lang.String |
value
Used to store the current value contained in the component |
| Fields inherited from interface net.xoetrope.xui.validation.XValidator |
|---|
IGNORE_BLANKS, LEVEL_ERROR, LEVEL_IGNORE, LEVEL_WARNING, MANDATORY, STRICT_CHECK, WEAK_CHECK |
| Constructor Summary | |
|---|---|
XBaseValidator()
null ctor |
|
XBaseValidator(java.lang.String name,
int validatorMask)
Constructor sets up member variables |
|
| Method Summary | |
|---|---|
int |
getLevel()
Get the error level of the validations |
int |
getMask()
Get the event mask. |
java.lang.String |
getMessage()
Get the validation message which is formatted after the tokens have been replaced |
java.lang.String |
getName()
Get the name of the validation |
protected java.lang.String |
getText(java.lang.Object c)
Get the text value of the component. |
java.lang.String |
getValueAsString()
Get the value as a string object |
java.lang.Object |
invokeMethod()
Call the funcion to get the value we are validating. |
protected void |
replaceToken(java.lang.String lookup,
java.lang.String replacement)
Carry out a replacement on the validation message |
protected void |
replaceTokens()
Replace any further tokens in the message |
void |
setMask(int newMask)
Set the event mask. |
void |
setName(java.lang.String name)
Set the name of the validation |
void |
setup(XmlElement element)
Set the validation parameters |
void |
setValidationMethod(java.lang.reflect.Method m,
java.lang.Object c)
Set the Method of the XPage to be invoked when we are doing a funcion validation |
protected void |
throwException()
Replace the remaining tokens and throw the exception |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.xoetrope.xui.validation.XValidator |
|---|
validate |
| Field Detail |
|---|
protected boolean mandatory
protected java.lang.String message
protected java.lang.String value
protected java.lang.String formattedMessage
protected java.lang.String validationName
protected java.lang.Object container
protected java.lang.reflect.Method validationMethod
protected int mask
protected int errorLevel
protected boolean start
| Constructor Detail |
|---|
public XBaseValidator()
public XBaseValidator(java.lang.String name,
int validatorMask)
name - The name of the validation being used by this validatorvalidatorMask - The event mask of the validation.| Method Detail |
|---|
public int getMask()
getMask in interface XValidatorpublic void setMask(int newMask)
newMask - The new mask which is to be used by the validator
public void setValidationMethod(java.lang.reflect.Method m,
java.lang.Object c)
setValidationMethod in interface XValidatorc - The component being validatedm - The method to be invokedpublic java.lang.String getName()
getName in interface XValidatorpublic void setName(java.lang.String name)
name - the new namepublic java.lang.String getMessage()
getMessage in interface XValidatorpublic void setup(XmlElement element)
element - the validator parameterspublic java.lang.String getValueAsString()
getValueAsString in interface XValidatorpublic int getLevel()
getLevel in interface XValidatorpublic java.lang.Object invokeMethod()
protected void replaceToken(java.lang.String lookup,
java.lang.String replacement)
lookup - The text to findreplacement - The text to replace the text withprotected void replaceTokens()
protected java.lang.String getText(java.lang.Object c)
c - The component
protected void throwException()
throws java.lang.Exception
java.lang.Exception - Throw an exception so that it can be caught
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||