All Packages Class Hierarchy This Package Previous Next Index
Interface com.sdi.wap.Validatable
- public interface Validatable
Interface declaration for the Validation architecture
-
getMessage()
- Return the error message for this field.
-
getValue()
- Return the value of this field.
-
isValid()
- Returns true if this field's value meets the syntactic requirements of this
type.
-
setValid(boolean, String)
- Set the validity informormation for this field.
-
setValue(String)
- Set the value of this type.
getMessage
public abstract String getMessage()
- Return the error message for this field. Returns "" if null.
- Returns:
- String
getValue
public abstract String getValue()
- Return the value of this field. Returns "" if the value is null.
- Returns:
- String
isValid
public abstract boolean isValid()
- Returns true if this field's value meets the syntactic requirements of this
type. The getMessage() call can be used to retrieve a string that explains
the problem in the user's terms.
- Returns:
- boolean
setValid
public abstract boolean setValid(boolean isValid,
String s)
- Set the validity informormation for this field. Often used to
override the validity when syntactically valid fields are found
to be semantically invalid
- Parameters:
- boolean - isValid: true if valid
- String - s: the message text.
- Returns:
- boolean
setValue
public abstract boolean setValue(String s)
- Set the value of this type. If the value is syntactically correct,
isValid() will return true and getMessage() will return "". If not
isValid() will return false and getMessage() will return a String
explaining the problem in terms an end-user can understand.
- Returns:
- s boolean indicating whether the valud is valid
All Packages Class Hierarchy This Package Previous Next Index