|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.automaton.html.HtmlProcessorXValidate
public abstract class HtmlProcessorXValidate
This class implements a error management toolkit for validators. The base validator class forces 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 addMessage(String) and deleteMessage(String) methods. 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. |
protected void |
doValidate(java.lang.String fullyQualifiedName,
DataField df,
Context ctxt)
Should be overriden by subclasses to do the actual work of semantic validation or validation based on business rules for the given field. |
abstract void |
doXValidate(Context context,
java.lang.String transitionName)
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)
Returns true if the string passed to it as argument is either null or if it contains no data. |
void |
validate(java.lang.String fullyQualifiedName,
DataField df,
Context ctxt)
Delegates the actual work of semantic validation for a data field to subclasses. |
java.lang.String[] |
xValidate(Context ctx)
Performs the operation cross-validation service |
java.lang.String[] |
xValidate(Context context,
java.lang.String transitionName)
Delegates 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.Stringprotected void doValidate(java.lang.String fullyQualifiedName, DataField df, Context ctxt) throws DSETypeException
fullyQualifiedName
- java.lang.Stringdf
- com.ibm.btt.base.DataFieldcontext
- com.ibm.btt.base.Context
DSETypeException
- -
If the field has not been successfully validated.public abstract void doXValidate(Context context, java.lang.String transitionName) throws java.lang.Exception
context
- com.ibm.btt.base.ContexttransitionName
- java.lang.String
java.lang.Exception
public boolean isEmpty(java.lang.String value)
value
- java.lang.String
public boolean isEmpty(java.lang.String value, boolean trim)
value
- java.lang.String
public void validate(java.lang.String fullyQualifiedName, DataField df, Context ctxt) throws DSETypeException
validate
in interface OperationXValidate
fullyQualifiedName
- java.lang.Stringdf
- com.ibm.btt.base.DataFieldcontext
- com.ibm.btt.base.Context
DSETypeException
- -
If the field has not been successfully validated.public java.lang.String[] xValidate(Context ctx)
OperationXValidate
xValidate
in interface OperationXValidate
public java.lang.String[] xValidate(Context context, java.lang.String transitionName) throws java.lang.Exception
xValidate
in interface ProcessorXValidate
context
- com.ibm.btt.base.ContexttransitionName
- java.lang.String
java.lang.Exception
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |