|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.automaton.html.HtmlProcessorXValidate
This class implements a error management framework for validators. The base validator class imposes on the user to manage a string array of error messages that may change in size dynamically as validation is carried out. To alleviate this, this class manages a collection of error messages that can be accessed using the methods addMessage(String) and deleteMessage(String). At the end of validation, these error messages are composed into a string array and returned automatically. The main caveat of using this class is that subclasses must implement their validation logic in the doXValidate(...) method instead of the xValidate(...) method.
Constructor Summary | |
HtmlProcessorXValidate()
HtmlProcessorXValidate constructor. |
Method Summary | |
void |
addMessage(java.lang.String message)
Adds a message to the collection of error messages for this validator. |
void |
deleteMessage(java.lang.String message)
Removes a message from the collection of messages for this validator. |
abstract void |
doXValidate(Context context,
java.lang.String transitionName)
This method should be overriden by subclasses to do the actual work of cross-validation. |
boolean |
isEmpty(java.lang.String value)
This is equivalent to calling isEmpty(String, true) |
boolean |
isEmpty(java.lang.String value,
boolean trim)
This method returns true if the string passed to it as argument is either null, or if it contains no data. |
java.lang.String[] |
xValidate(Context ctx)
Performs the operation "cross-validation" service |
java.lang.String[] |
xValidate(Context context,
java.lang.String transitionName)
This method relegates the actual work of cross validation to subclasses. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public HtmlProcessorXValidate()
Method Detail |
public void addMessage(java.lang.String message)
message
- java.lang.Stringpublic void deleteMessage(java.lang.String message)
message
- java.lang.Stringpublic abstract void doXValidate(Context context, java.lang.String transitionName) throws java.lang.Exception
context
- com.ibm.dse.base.ContexttransitionName
- java.lang.Stringpublic boolean isEmpty(java.lang.String value)
value
- java.lang.Stringpublic boolean isEmpty(java.lang.String value, boolean trim)
value
- java.lang.Stringpublic java.lang.String[] xValidate(Context ctx)
public java.lang.String[] xValidate(Context context, java.lang.String transitionName) throws java.lang.Exception
context
- com.ibm.dse.base.ContexttransitionName
- java.lang.String
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |