IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.base.types
Interface Validation

All Known Implementing Classes:
AbstractValidator

public interface Validation

This interface is implemented by all Validators that descend from the abstract implementation, AbstractValidator.

Validators provide behavior to validate business objects in accordance with specific business rules. The majority of such behavior is Type specific.


Method Summary
 java.lang.Object validate(java.lang.Object toValidate, PropertyDescription descriptor)
          Validates the passed object and, if successful, returns the object.
 java.lang.Object validate(java.lang.Object toValidate, PropertyDescription descriptor, Hashtable parameters)
          Validates the passed object and, if successful, returns the object.
 java.lang.Object validate(java.lang.String toValidate, PropertyDescription descriptor)
          Validates the Object resulting from unformatting the passed String into the appropriate Type.
 java.lang.Object validate(java.lang.String toValidate, java.lang.String convType, PropertyDescription descriptor)
          Validates the Object resulting from unformatting (using the convtype) the passed String into the appropriate Type.
 java.lang.Object validate(java.lang.String toValidate, java.lang.String convType, PropertyDescription descriptor, Hashtable parameters)
          Validates the Object resulting from unformatting (using the convtype) the passed String into the appropriate Type.
 void validateParams(PropertyDescription pd)
          Validates the parameters externaly defined for this validator.
 

Method Detail

validate

public java.lang.Object validate(java.lang.Object toValidate,
                                 PropertyDescription descriptor)
                          throws DSETypeException
Validates the passed object and, if successful, returns the object. Parameters required by the specific type validator may be taken from the owner descriptor by using the descriptor passed as an argument.

Parameters:
toValidate - Object
descriptor - PropertyDescription
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 passed object and, if successful, returns the object. Parameters required by the specific type validator may be taken from the Hashtable passed as an argument.

Parameters:
toValidate - Object
descriptor - PropertyDescription
parameters - com.ibm.btt.base.Hashtable
Throws:
DSETypeException - - Thrown if the validation is unsuccessful

validate

public java.lang.Object validate(java.lang.String toValidate,
                                 PropertyDescription descriptor)
                          throws DSETypeException
Validates the Object resulting from unformatting the passed String into the appropriate Type. If it successfully validates the object, the method returns the object. Parameters required by the specific type validator may be taken from the owner descriptor by using the descriptor passed as an argument.

Parameters:
toValidate - String
descriptor - PropertyDescription
Throws:
DSETypeException - - Thrown if the validation is unsuccessful

validate

public java.lang.Object validate(java.lang.String toValidate,
                                 java.lang.String convType,
                                 PropertyDescription descriptor)
                          throws DSETypeException
Validates the Object resulting from unformatting (using the convtype) the passed String into the appropriate Type. If it successfully validates the object, the method returns the object. If the convType is not supported, the method uses the default conversion type. Parameters required by the specific type validator may be taken from the owner descriptor by using the descriptor passed as an argument.

Parameters:
toValidate - String
convType - String
descriptor - PropertyDescription
Throws:
DSETypeException - - Thrown if the validation is unsuccessful

validate

public java.lang.Object validate(java.lang.String toValidate,
                                 java.lang.String convType,
                                 PropertyDescription descriptor,
                                 Hashtable parameters)
                          throws DSETypeException
Validates the Object resulting from unformatting (using the convtype) the passed String into the appropriate Type. If it successfully validates the object, the method returns the object. If the convType is not supported, the method uses the default conversion type. Parameters required by the specific type validator may be taken from the owner descriptor by using the descriptor passed as an argument.

Parameters:
toValidate - String
convType - String
descriptor - PropertyDescription
parameters - com.ibm.btt.base.Hashtable
Throws:
DSETypeException - - Thrown if the validation is unsuccessful

validateParams

public void validateParams(PropertyDescription pd)
                    throws DSETypeException
Validates the parameters externaly defined for this validator.

Parameters:
pd - com.ibm.btt.base.types.PropertyDescription
Throws:
DSETypeException - - Thrown if the parameter validation fails

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005