IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base.types.impl
Class BaseValidator<K,T extends BaseValidator.ValidationParamBean>

java.lang.Object
  extended by com.ibm.btt.base.types.AbstractValidator
      extended by com.ibm.btt.base.types.impl.BaseValidator<K,T>
All Implemented Interfaces:
TypeConstants, Validation, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
BooleanValidator, ByteArrayValidator, CurrencyValidator, DateValidator, DurationValidator, NumberValidator, StringValidator, XMLGregorianCalendarValidator

public abstract class BaseValidator<K,T extends BaseValidator.ValidationParamBean>
extends AbstractValidator

See Also:
Serialized Form

Nested Class Summary
static class BaseValidator.ValidationParamBean
           
 
Field Summary
 
Fields inherited from class com.ibm.btt.base.types.AbstractValidator
keyValuePairs
 
Fields inherited from interface com.ibm.btt.base.types.TypeConstants
amended, CONV_TYPE_DEFAULT, CONV_TYPE_HOST, CONV_TYPE_HTML, CONV_TYPE_OUTPUT, CONV_TYPE_SER, CONV_TYPE_XML, disabled, hidden, isAmended, isDisabled, isHidden, isMandatory, isOmitted, isReadOnly, mandatory, omitted, readOnly, TYPE_DEFAULT, TYPE_REGISTRY_INIT_SIZE
 
Constructor Summary
BaseValidator()
           
BaseValidator(java.util.Hashtable<?,?> keyValuePairs)
           
 
Method Summary
protected  java.lang.Object getParameter(java.lang.String key, java.util.Hashtable<?,?> parameters, PropertyDescription descriptor)
           
protected  T getParameterBean()
           
abstract  void validate(K convertedValue, T params)
          Verify the legality of specified input object depends on BTT type parameters
 java.lang.Object validate(java.lang.Object arg0, PropertyDescription arg1)
          Validates the object and, if successful, returns the object.
 java.lang.Object validate(java.lang.Object value, PropertyDescription descriptor, Hashtable parameters)
          Validates the object and, if successful, returns the object.
 java.lang.Object validate(java.lang.String arg0, PropertyDescription arg1)
          Validates the object and, if successful, returns the object.
 java.lang.Object validate(java.lang.String arg0, java.lang.String arg1, PropertyDescription arg2)
          Validates the object and, if successful, returns the object.
 java.lang.Object validate(java.lang.String arg0, java.lang.String covnType, PropertyDescription pd, Hashtable parameters)
          Validates the object and, if successful, returns the object.
 java.lang.Object validateForType(java.lang.Object toValidate, PropertyDescription descriptor)
          Deprecated. 
 java.lang.Object validateForType(java.lang.Object toValidate, PropertyDescription descriptor, Hashtable parameters)
          Deprecated. 
 
Methods inherited from class com.ibm.btt.base.types.AbstractValidator
getParameters, readExternal, validateParams, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseValidator

public BaseValidator()

BaseValidator

public BaseValidator(java.util.Hashtable<?,?> keyValuePairs)
Method Detail

validate

public abstract void validate(K convertedValue,
                              T params)
                       throws DSETypeException
Verify the legality of specified input object depends on BTT type parameters

Parameters:
convertedValue - Specified input object
params - BTT type parameters
Throws:
DSETypeException - Throw DSETypeException when failed to verify the specified input object.

getParameterBean

protected T getParameterBean()
                                                                throws java.lang.Exception
Throws:
java.lang.Exception

getParameter

protected java.lang.Object getParameter(java.lang.String key,
                                        java.util.Hashtable<?,?> parameters,
                                        PropertyDescription descriptor)

validate

public java.lang.Object validate(java.lang.Object value,
                                 PropertyDescription descriptor,
                                 Hashtable parameters)
                          throws DSETypeException
Description copied from class: AbstractValidator
Validates the object and, if successful, returns the object. Otherwise, the method throws the appropriate exception. Parameters required by the specific type validator may be taken from the Hashtable passed as an argument.

Specified by:
validate in interface Validation
Overrides:
validate in class AbstractValidator
Parameters:
value - Object
descriptor - PropertyDescription
parameters - com.ibm.btt.base.Hashtable
Throws:
DSETypeException - Validation is unsuccessful.

validate

public java.lang.Object validate(java.lang.Object arg0,
                                 PropertyDescription arg1)
                          throws DSETypeException
Description copied from class: AbstractValidator
Validates the object and, if successful, returns the object. Otherwise, the method throws the appropriate exception. Parameters required by the specific type validator may be taken from the owner descriptor by using the descriptor passed as an argument.

Specified by:
validate in interface Validation
Overrides:
validate in class AbstractValidator
Parameters:
arg0 - Object
arg1 - PropertyDescription
Throws:
DSETypeException - Validation is unsuccessful.

validate

public java.lang.Object validate(java.lang.String arg0,
                                 PropertyDescription arg1)
                          throws DSETypeException
Description copied from class: AbstractValidator
Validates the object and, if successful, returns the object. Otherwise, the method throws the appropriate exception. Parameters required by the specific type validator may be taken from the owner descriptor by using the descriptor passed as an argument.

Specified by:
validate in interface Validation
Overrides:
validate in class AbstractValidator
Parameters:
arg0 - String
arg1 - PropertyDescription
Throws:
DSETypeException - Validation is unsuccessful.

validate

public java.lang.Object validate(java.lang.String arg0,
                                 java.lang.String arg1,
                                 PropertyDescription arg2)
                          throws DSETypeException
Description copied from class: AbstractValidator
Validates the object and, if successful, returns the object. Otherwise, the method throws the appropriate exception. If convType is not supported, the default conversion type is used. Parameters required by the specific type validator may be taken from the owner descriptor by using the descriptor passed as an argument.

Specified by:
validate in interface Validation
Overrides:
validate in class AbstractValidator
Parameters:
arg0 - String
arg1 - String
arg2 - PropertyDescription
Throws:
DSETypeException - Validation is unsuccessful.

validate

public java.lang.Object validate(java.lang.String arg0,
                                 java.lang.String covnType,
                                 PropertyDescription pd,
                                 Hashtable parameters)
                          throws DSETypeException
Description copied from class: AbstractValidator
Validates the object and, if successful, returns the object. Otherwise, the method throws the appropriate exception. If convType is not supported the default conversion type is used. Parameters required by the specific type validator may be taken from the Hashtable passed as an argument.

Specified by:
validate in interface Validation
Overrides:
validate in class AbstractValidator
Parameters:
arg0 - String
covnType - String
pd - PropertyDescription
parameters - com.ibm.btt.base.Hashtable
Throws:
DSETypeException - Validation is unsuccessful.

validateForType

@Deprecated
public java.lang.Object validateForType(java.lang.Object toValidate,
                                                   PropertyDescription descriptor,
                                                   Hashtable parameters)
                                 throws DSETypeException
Deprecated. 

Description copied from class: AbstractValidator
Validates the object and, if successful, returns the object. Otherwise, the method throws the appropriate exception. Parameters required by the specific type validator may be taken from the Hashtable passed as an argument.

Overrides:
validateForType in class AbstractValidator
Parameters:
toValidate - Object
descriptor - PropertyDescription
parameters - com.ibm.btt.base.Hashtable
Throws:
DSETypeException - Validation is unsuccessful.

validateForType

@Deprecated
public java.lang.Object validateForType(java.lang.Object toValidate,
                                                   PropertyDescription descriptor)
                                 throws DSETypeException
Deprecated. 

Description copied from class: AbstractValidator
Validates the object and, if successful, returns the object. Otherwise, the method throws the appropriate exception. Parameters required by the specific type validator may be taken from the owner descriptor by using the descriptor passed as an argument.

Overrides:
validateForType in class AbstractValidator
Parameters:
toValidate - Object
descriptor - PropertyDescription
Throws:
DSETypeException - Validation is unsuccessful.

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011