|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.etill.framework.payapi.ParameterValidationItem
The ParameterValidationItem object is used to verify a parameter's value and insert that parameter and its value into a ParameterTable if the parameter passes verification.
A cassette's ParameterValidationTable should be built during
cassette initialization. The table should contain the parsing rules,
expressed in terms of the various subclasses of
com.ibm.etill.framework.payapi.ParameterValidationItem, for every protocol
data parameter that the cassette supports. Note that only one such table
should exist for the cassette. Each time the Framework parses an incoming
command that is directed toward the cassette, it will call the following
method on the cassette's com.ibm.etill.framework.cassette.Cassette object
to access the cassette's validation table: public Hashtable
getParameterValidationTable
. After accessing the cassette's table,
the Framework parses the protocol data parameters according to the rule
defined in the table.
This class is meant to be extended. A child class must implement the
validateAndInsertValue
method.
Method Summary | |
---|---|
String |
getAliasKey()
Get the parameter name alias for this parameter. |
Object |
validateAndInsert(byte[] value,
ParameterTable resultTable)
Validates and inserts valid values into the table if the parameter validates. |
Object |
validateAndInsert(String[] values,
ParameterTable resultTable,
String overrideParameterName)
Validates and inserts a vector of values into a table if it validates. |
Object |
validateAndInsert(Vector values,
ParameterTable resultTable)
Validates and inserts a vector of values into a table if it validates. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public final Object validateAndInsert(byte[] value, ParameterTable resultTable) throws ETillAbortOperation
validateAndInsertValue
which must be overridden in a child class.value
- value that is to be inserted in the resultTable if it validatesresultTable
- a ParameterTable object that value/key pair will be inserted
into if the parameter validatesETillAbortOperation
- thrown to report errorspublic final Object validateAndInsert(Vector values, ParameterTable resultTable) throws ETillAbortOperation
validateAndInsertValue
which must be overridden in a child class.values
- values that are to be validated and inserted in the resultTableresultTable
- a ParameterTable object that value will be inserted into if it is validETillAbortOperation
- thrown to report errorspublic Object validateAndInsert(String[] values, ParameterTable resultTable, String overrideParameterName) throws ETillAbortOperation
validateAndInsert
in interface com.ibm.etill.framework.payapi.validation.IParameterValidator
values
- a vector of values that are to be inserted if it validatesresultTable
- a ParameterTable object that value/key pair will be inserted
into if the parameter validatesoverrideParameterName
- the key that should be inserted into resultTable if validation is successful
If this value is null, then the parameterName specified on the constructor will be used.ETillAbortOperation
- thrown to report errorspublic String getAliasKey()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |