Class PluginRegistry.ConfigurationValidator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkAllPluginTypes​(org.apache.commons.configuration2.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.
      protected void checkPluginDeclaration​(org.apache.commons.configuration2.Configuration configuration, String pluginType, String pluginInstance)
      Checks whether there is an implementation configured for the designated plugin instance.
      protected void checkPluginInstances​(org.apache.commons.configuration2.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 checkRuntimePluginDeclaration​(org.apache.commons.configuration2.Configuration configuration, String pluginType)
      Checks whether the designated plugin type declaring runtime plugins ('*') has a classpath configured.
      protected void validate​(org.apache.commons.configuration2.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.
    • Constructor Detail

      • ConfigurationValidator

        public ConfigurationValidator()
    • Method Detail

      • checkPluginDeclaration

        protected void checkPluginDeclaration​(org.apache.commons.configuration2.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​(org.apache.commons.configuration2.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​(org.apache.commons.configuration2.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​(org.apache.commons.configuration2.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​(org.apache.commons.configuration2.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:
        checkAllPluginTypes(Configuration)