© 2002 BEA Systems, Inc.


com.bea.p13n.appflow.webflow.forms
Interface Validator

All Known Implementing Classes:
DoubleValueValidator, LongValueValidator

public interface Validator
extends WebflowFormConstants

A generic interface implemented by plugable Validators. It is the Validators responsibility to update the ValidatedValues with the correct status and message. The Validator need not increment the invalidFieldCount as this is done by the ValidatedForm object. For convenience we have extended the WebflowFormConstants interface, as this interface contains the constants needed to update the ValidatedValues.


Fields inherited from class com.bea.p13n.appflow.webflow.forms.WebflowFormConstants
EMPTY_STRING, INVALID_FIELD_COUNT_PROPERTY_NAME, MESSAGES_PROPERTY_NAME, STATUS_INVALID, STATUS_UNSPECIFIED, STATUS_VALID, STATUSES_PROPERTY_NAME, VALUES_PROPERTY_NAME
 
Method Summary
 java.lang.String validate(ValidatedValues validatedValues, java.lang.String key, java.lang.Object expression, java.lang.String message)
          Validate the value of the field in the validatedValues object.
 

Method Detail

validate

public java.lang.String validate(ValidatedValues validatedValues,
                                 java.lang.String key,
                                 java.lang.Object expression,
                                 java.lang.String message)
Validate the value of the field in the validatedValues object. It is the implementation objects responsiblilty to update the ValidatedValue with the status, value and message.

Parameters:
validatedValues - contains hashmaps of values, status, messages
key - the key into the validatedValues to retrieve value, status and message
expression - optional object the validator can use to assist in validating the data
message - the message that will get displayed on the html form if the field is invalid, The implementation object should be able to handle null. (i.e suppply default messages, The implementation object should also make sure the message is internationalized. via the WLS message catalog)
Returns:
value formatted value of the request parameter

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved