com.bea.web.validation
Class Word
java.lang.Object
com.bea.web.validation.Word
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- DateWord, DoubleWord, EmailWord, FloatWord, IdentifierWord, IntegerWord, URLWord
- public class Word
- extends Object
- implements Serializable
Encapsulates metadata about a single data element in a model. Words provide
validation of values gathered at runtime. Words are capable of generating
localized messages when reporting on the outcome validating a value. Words
can validate a value against a regular expression by default. Additionally,
the Word class can override the validate method to supply custom validation.
- Author:
- Copyright (c) 1998-2000 by BEA Systems, Inc. All Rights Reserved.
- See Also:
- Serialized Form
Constructor Summary |
Word()
|
Word
public Word()
isRequired
public final boolean isRequired()
setRequired
public final void setRequired(boolean bIsRequired)
setPattern
public final void setPattern(String strPattern)
throws MalformedPatternException
- Throws:
MalformedPatternException
getPattern
public final String getPattern()
matchesPattern
protected final boolean matchesPattern(String strValue)
validate
public IValidationResult validate(String strValue,
ResourceBundle bundle)
setKey
public final void setKey(String strKey)
getKey
public final String getKey()
formatMessage
protected String formatMessage(ResourceBundle bundle,
String strTemplateKey,
Object obj)
formatMessage
protected String formatMessage(ResourceBundle bundle,
String strTemplateKey,
Object[] aObj)
getResource
protected String getResource(ResourceBundle bundle,
String strKey)
toString
public String toString()