All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.sdi.wap.Validatable

public interface Validatable
Interface declaration for the Validation architecture


Method Index

 o getMessage()
Return the error message for this field.
 o getValue()
Return the value of this field.
 o isValid()
Returns true if this field's value meets the syntactic requirements of this type.
 o setValid(boolean, String)
Set the validity informormation for this field.
 o setValue(String)
Set the value of this type.

Methods

 o getMessage
 public abstract String getMessage()
Return the error message for this field. Returns "" if null.

Returns:
String
 o getValue
 public abstract String getValue()
Return the value of this field. Returns "" if the value is null.

Returns:
String
 o 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
 o 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
 o 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