IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base.types
Class KCollValidator

java.lang.Object
  extended by com.ibm.btt.base.types.AbstractValidator
      extended by com.ibm.btt.base.types.KCollValidator
All Implemented Interfaces:
TypeConstants, Validation, java.io.Externalizable, java.io.Serializable

public class KCollValidator
extends AbstractValidator

This class is a Validator for compound business objects that are KeyedCollections. It checks if the inner elements of the keyed collection are valid. It should be extended if further rules (related to the business object that the keyed collection represents) are required.

See Also:
Serialized Form

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
KCollValidator()
          Creates a KCollValidator object.
KCollValidator(java.util.Hashtable keyValuePairs)
          Creates a KCollValidator object.
 
Method Summary
 java.lang.Object validate(java.lang.Object toValidate, PropertyDescription descriptor)
          Validates the object passed and, if successful, returns the object.
 java.lang.Object validate(java.lang.Object toValidate, PropertyDescription descriptor, Hashtable parameters)
          Validates the object passed and, if successful, returns the object.
 java.lang.Object validateForType(java.lang.Object toValidate, PropertyDescription descriptor, Hashtable parameters)
          Validates the object passed (which must be a keyed collection or a hashtable containing the keyed collection elements) and, if successful, returns the object.
protected  java.lang.Object validateHashtable(Hashtable elements, PropertyDescription descriptor)
          Validates the keyed collection elements passed within the Hashtable and, if succcessful, returns the Hashtable.
 
Methods inherited from class com.ibm.btt.base.types.AbstractValidator
getParameters, readExternal, validate, validate, validate, validateForType, validateParams, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KCollValidator

public KCollValidator()
Creates a KCollValidator object.


KCollValidator

public KCollValidator(java.util.Hashtable keyValuePairs)
Creates a KCollValidator object.

Parameters:
keyValuePairs - java.util.Hashtable
Method Detail

validate

public java.lang.Object validate(java.lang.Object toValidate,
                                 PropertyDescription descriptor)
                          throws DSETypeException
Validates the object passed and, if successful, returns the object.

Specified by:
validate in interface Validation
Overrides:
validate in class AbstractValidator
Parameters:
toValidate - Object
descriptor - PropertyDescription
Returns:
Object
Throws:
DSETypeException - Thrown if the validation is unsuccessful

validate

public java.lang.Object validate(java.lang.Object toValidate,
                                 PropertyDescription descriptor,
                                 Hashtable parameters)
                          throws DSETypeException
Validates the object passed and, if successful, returns the object.

Specified by:
validate in interface Validation
Overrides:
validate in class AbstractValidator
Parameters:
toValidate - Object
descriptor - PropertyDescription
parameters - com.ibm.btt.base.Hashtable
Returns:
Object
Throws:
DSETypeException - - Thrown if the validation is unsuccessful

validateForType

public java.lang.Object validateForType(java.lang.Object toValidate,
                                        PropertyDescription descriptor,
                                        Hashtable parameters)
                                 throws DSETypeException
Validates the object passed (which must be a keyed collection or a hashtable containing the keyed collection elements) and, if successful, returns the object. Validation succeeds if all elements in the keyed collection are valid.

Overrides:
validateForType in class AbstractValidator
Parameters:
toValidate - Object
descriptor - PropertyDescription
parameters - com.ibm.btt.base.Hashtable
Returns:
Object
Throws:
DSETypeException - - Thrown if the validation is unsuccessful

validateHashtable

protected java.lang.Object validateHashtable(Hashtable elements,
                                             PropertyDescription descriptor)
                                      throws DSETypeException
Validates the keyed collection elements passed within the Hashtable and, if succcessful, returns the Hashtable.

Parameters:
elements - Hashtable
descriptor - PropertyDescription
Returns:
java.lang.Object
Throws:
DSETypeException - - Thrown if the validation is unsuccessful

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011