org.apache.geronimo.validator
Interface Validator

All Known Implementing Classes:
AbstractValidator

public interface Validator

The main interface for all application validators. To use one, you initialize it with the application module it should validate, and then call the validate method. In general, a single validator can validate many application modules over its lifetime with repeated calls to initialize and validate, but it cannot validate two application modules simultaneously.

Version:
$Revision: 1.4 $ $Date: 2004/03/10 09:58:44 $

Method Summary
 boolean initialize(PrintWriter out, String moduleName, ClassLoader loader, javax.enterprise.deploy.shared.ModuleType type, org.apache.xmlbeans.XmlObject[] standardDD, Object[] serverDD)
          Prepares the validator to validate an application module.
 ValidationResult validate()
           
 

Method Detail

initialize

public boolean initialize(PrintWriter out,
                          String moduleName,
                          ClassLoader loader,
                          javax.enterprise.deploy.shared.ModuleType type,
                          org.apache.xmlbeans.XmlObject[] standardDD,
                          Object[] serverDD)
Prepares the validator to validate an application module.

Parameters:
out - The writer used by the validator to present messages to the user.
moduleName - The display name for this module, used to identify where errors originated from.
loader - The ClassLoader used to access module classes
type - The type of module in question (WAR, EAR, etc.). In general this is a sanity check as validators will be devoted to handling a specific module.
standardDD - The metadata representation of the standard deployment descriptors for the module. There will always be at least one, and may be more. Note that the file name is available from the XmlDocumentProperties.
serverDD - The metadata representation of the app-server-specific deployment descriptors for the module.
Returns:
true if the validator is going to be able to validate this application module. May be false, for example, if this validator does not handle this module type, the expected deployment descriptors are missing, etc.

validate

public ValidationResult validate()
Returns:
An indicator of whether the validation succeeded, succeeded with warnings, or failed.


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.