Class PluginRegistry.ConfigurationValidator

java.lang.Object
de.aristaflow.adept2.base.configuration.ConfigurationValidator
de.aristaflow.adept2.base.registry.PluginRegistry.ConfigurationValidator
Direct Known Subclasses:
LocalServiceRegistry.ConfigurationValidator
Enclosing class:
PluginRegistry

public static class PluginRegistry.ConfigurationValidator extends ConfigurationValidator
Checks that all declared plugin instances are configured properly, that is they have an implementation class and runtime plugins have a plugin classpath.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Checks whether the designated configuration declares plugin types and if so, whether they are configured properly, that is all declared plugin instances have an implementation class or in case of runtime plugins, the plugin type provides a plugin classpath and a valid anonymous instance.
    protected void
    checkPluginDeclaration(Configuration configuration, String pluginType, String pluginInstance)
    Checks whether there is an implementation configured for the designated plugin instance.
    protected void
    checkPluginInstances(Configuration configuration, String pluginType)
    Checks whether the instances of the designated plugin type are configured properly, that is they have an implementation class or in case of runtime plugins, the plugin type provides a plugin classpath and a valid anonymous instance.
    protected void
    Checks whether the designated plugin type declaring runtime plugins ('*') has a classpath configured.
    protected void
    validate(Configuration configuration)
    Checks whether the designated configuration declares plugin types and if so, whether they are configured properly, that is all declared plugin instances have an implementation class or in case of runtime plugins, the plugin type provides a plugin classpath and a valid anonymous instance.

    Methods inherited from class de.aristaflow.adept2.base.configuration.ConfigurationValidator

    rebuke, rebukeIllegalValue, rebukeMissingValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ConfigurationValidator

      public ConfigurationValidator()
  • Method Details

    • checkPluginDeclaration

      protected void checkPluginDeclaration(Configuration configuration, String pluginType, String pluginInstance) throws ConfigurationException
      Checks whether there is an implementation configured for the designated plugin instance.
      Parameters:
      configuration - The configuration to check for implementation propertiy for the designated plugin instance.
      pluginType - The type name of the plugin to check its instance for a present implementation.
      pluginInstance - The name of the plugin instance to check for a present implementation.
      Throws:
      ConfigurationException - If the designated plugin instance does not declare a corresponding implementation, a ConfigurationException will be thrown.
    • checkRuntimePluginDeclaration

      protected void checkRuntimePluginDeclaration(Configuration configuration, String pluginType) throws ConfigurationException
      Checks whether the designated plugin type declaring runtime plugins ('*') has a classpath configured.
      Parameters:
      configuration - The configuration to check for a plugin classpath property for the designated plugin type.
      pluginType - The type name of the plugin to check its instance for a present implementation.
      Throws:
      ConfigurationException - If the designated plugin type does not declare a plugin classpath, a ConfigurationException will be thrown.
    • checkPluginInstances

      protected void checkPluginInstances(Configuration configuration, String pluginType) throws ConfigurationException
      Checks whether the instances of the designated plugin type are configured properly, that is they have an implementation class or in case of runtime plugins, the plugin type provides a plugin classpath and a valid anonymous instance.
      Parameters:
      configuration - The configuration to check for properly configured instances.
      pluginType - The type name of the plugin to check for properly configured instances.
      Throws:
      ConfigurationException - If the instances of the designated plugin type are not configured properly, a ConfigurationException will be thrown.
    • checkAllPluginTypes

      protected void checkAllPluginTypes(Configuration configuration) throws ConfigurationException
      Checks whether the designated configuration declares plugin types and if so, whether they are configured properly, that is all declared plugin instances have an implementation class or in case of runtime plugins, the plugin type provides a plugin classpath and a valid anonymous instance.
      Parameters:
      configuration - The configuration to check for properly configured plugin types.
      Throws:
      ConfigurationException - If there are incorrectly configured plugin types in the designated configuration, a ConfigurationException will be thrown.
    • validate

      protected void validate(Configuration configuration) throws ConfigurationException
      Checks whether the designated configuration declares plugin types and if so, whether they are configured properly, that is all declared plugin instances have an implementation class or in case of runtime plugins, the plugin type provides a plugin classpath and a valid anonymous instance.
      Specified by:
      validate in class ConfigurationValidator
      Parameters:
      configuration - The configuration to check for properly configured plugin types.
      Throws:
      ConfigurationException - If there are incorrectly configured plugin types in the designated configuration, a ConfigurationException will be thrown.
      See Also: