org.iscreen
Interface ValidationService

All Known Implementing Classes:
BaseValidationService, DefaultValidationService, ValidationServiceWrapper

public interface ValidationService

This interface represents the main entry point for performing validations.

Author:
Shellman, Dan

Method Summary
 java.lang.String getServiceName()
          The service name (unique id) of the service.
 void validate(java.lang.Object obj)
          Called to validate an object (typically a JavaBean).
 void validate(java.lang.Object obj, java.util.Locale locale)
          Called to validate an object (typically a JavaBean).
 

Method Detail

validate

void validate(java.lang.Object obj)
              throws ValidationException
Called to validate an object (typically a JavaBean). If the object passes validation, nothing occurs (there should be no side-effects). If one or more Validators find one or more validation failures, then an exception will be thrown containing all validations failures found.

Parameters:
obj - The object (usually a JavaBean) to validate.
Throws:
ValidationException - The exception containing any validation failures.

validate

void validate(java.lang.Object obj,
              java.util.Locale locale)
              throws ValidationException
Called to validate an object (typically a JavaBean). If the object passes validation, nothing occurs (there should be no side-effects). If one or more Validators find one or more validation failures, then an exception will be thrown containing all validations failures found.

Parameters:
obj - The object (usually a JavaBean) to validate.
locale - The locale used for failure message generation.
Throws:
ValidationException - The exception containing any validation failures.

getServiceName

java.lang.String getServiceName()
The service name (unique id) of the service. This is the fully qualified name of the Validation Set that this service represents.

Returns:
Returns the unique service name/id of this service.