org.rhq.enterprise.server.plugin.pc
Interface ServerPluginValidator
- All Known Implementing Classes:
- AlertPluginValidator, BundlePluginValidator, ContentPluginValidator, EntitlementPluginValidator, GenericPluginValidator, PerspectivePluginValidator
public interface ServerPluginValidator
Validates that a given plugin descriptor is correct.
This is usually used during a build of a server plugin, but can be used at runtime
to confirm a descriptor is valid. This does more than just validating the XML
descriptor parses (in fact, that is confirmed before this validator object is ever
called). Instead, it detects if things such as classnames and configurations match
was is to be expected.
Implementors of this class must have a no-arg constructor so it can be
found and created by ServerPluginValidatorUtil. The names of the
implementor classes (if they are to be used by that utility) must match the
name of the plugin type followed by "Validator" (e.g. "GenericPluginValidator"
or "AlertPluginValidator"). They must be in a subpackage under the
package where this interface is, where that subpackage is named
for that plugin type (minus the word "Plugin" and all lowercase) such as
".generic" or ".alert".
Note that when this validator is invoked, the plugin descriptor has already had
its basics validated (that is, it is assured the descriptor XML is well-formed
and validates against the XML schema, the plugin has been given a version, its
plugin component class is valid and can be instantiated (if one was specified)
among other things). Implementors of this validator class need only validate
specific things that are unique to the specific plugin type for which this
validator is used.
- Author:
- John Mazzitelli
|
Method Summary |
boolean |
validate(ServerPluginEnvironment env)
Given a server plugin environment, this method should validate the descriptor
to ensure it is logically correct. |
validate
boolean validate(ServerPluginEnvironment env)
- Given a server plugin environment, this method should validate the descriptor
to ensure it is logically correct.
- Parameters:
env - the environment of the plugin to test
- Returns:
true if the plugin descriptor is valid, false otherwise
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.