org.apache.geronimo.validator
Class AbstractValidator
java.lang.Object
org.apache.geronimo.validator.AbstractValidator
- All Implemented Interfaces:
- Validator
- Direct Known Subclasses:
- EjbValidator
- public abstract class AbstractValidator
- extends Object
- implements Validator
The base class for actual validators. Each validator groups all the tests
that apply to a single module type (so we'd expect to have an EJB validator,
a web app validator, etc.).
- Version:
- $Revision: 1.4 $ $Date: 2004/03/10 09:58:44 $
Method Summary |
abstract Class[] |
getTestClasses()
The subclass should return an array of ValidationTest subclasses. |
boolean |
initialize(PrintWriter out,
String moduleName,
ClassLoader loader,
javax.enterprise.deploy.shared.ModuleType type,
org.apache.xmlbeans.XmlObject[] standardDD,
Object[] serverDD)
Subclasses may override this to double-check the module type and so on,
but they should call this implementation some time in their overridden
version. |
ValidationResult |
validate()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractValidator
public AbstractValidator()
getTestClasses
public abstract Class[] getTestClasses()
- The subclass should return an array of ValidationTest subclasses. This
class will execute all the tests in those classes according to their
DD and XPath configuration.
initialize
public boolean initialize(PrintWriter out,
String moduleName,
ClassLoader loader,
javax.enterprise.deploy.shared.ModuleType type,
org.apache.xmlbeans.XmlObject[] standardDD,
Object[] serverDD)
- Subclasses may override this to double-check the module type and so on,
but they should call this implementation some time in their overridden
version.
- Specified by:
initialize
in interface Validator
- 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 classestype
- 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, since this implementation doesn't actually check
anything.
validate
public ValidationResult validate()
- Specified by:
validate
in interface Validator
- Returns:
- An indicator of whether the validation succeeded, succeeded with
warnings, or failed.
Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.