org.apache.avalon.phoenix.components.configuration.validator
Class NoopConfigurationValidator

java.lang.Object
  |
  +--org.apache.avalon.phoenix.components.configuration.validator.NoopConfigurationValidator
All Implemented Interfaces:
ConfigurationValidator, ConfigurationValidatorMBean

public class NoopConfigurationValidator
extends Object
implements ConfigurationValidator, ConfigurationValidatorMBean

A ConfigurationValidator that always says everything is okay

Author:
Peter Royal

Fields inherited from interface org.apache.avalon.phoenix.interfaces.ConfigurationValidator
ROLE
 
Constructor Summary
NoopConfigurationValidator()
           
 
Method Summary
 void addSchema(String application, String block, String schemaType, String url)
          Add configuration schema to validator
 String getSchema(String application, String block)
          Get the XML that represents the schema for the specified application and block.
 String getSchemaType(String application, String block)
          Get the schema type for the specified application and block.
 boolean isFeasiblyValid(String application, String block, Configuration configuration)
          Check to see if configuration is feasibly valid.
 boolean isValid(String application, String block, Configuration configuration)
          Check to see if configuration is valid.
 boolean isValid(String application, String block, String configurationXml)
           
 void removeSchema(String application, String block)
          Add configuration schema to validator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoopConfigurationValidator

public NoopConfigurationValidator()
Method Detail

addSchema

public void addSchema(String application,
                      String block,
                      String schemaType,
                      String url)
               throws ConfigurationException
Description copied from interface: ConfigurationValidator
Add configuration schema to validator
Specified by:
addSchema in interface ConfigurationValidator
Following copied from interface: org.apache.avalon.phoenix.interfaces.ConfigurationValidator
Parameters:
application - Application name
block - Block name to store configuration for
url - url that the schema may be located at
Throws:
ConfigurationException - if schema is invalid

removeSchema

public void removeSchema(String application,
                         String block)
Description copied from interface: ConfigurationValidator
Add configuration schema to validator
Specified by:
removeSchema in interface ConfigurationValidator
Following copied from interface: org.apache.avalon.phoenix.interfaces.ConfigurationValidator
Parameters:
application - Application name
block - Block name to store configuration for
url - url that the schema may be located at
Throws:
ConfigurationException - if schema is invalid

isValid

public boolean isValid(String application,
                       String block,
                       Configuration configuration)
                throws ConfigurationException
Description copied from interface: ConfigurationValidator
Check to see if configuration is valid.
Specified by:
isValid in interface ConfigurationValidator
Following copied from interface: org.apache.avalon.phoenix.interfaces.ConfigurationValidator
Parameters:
application - Application name
block - Block name to store configuration for
configuration - Configuration to check
Returns:
true if configuration is valid
Throws:
ConfigurationException - if no schema is found

isFeasiblyValid

public boolean isFeasiblyValid(String application,
                               String block,
                               Configuration configuration)
                        throws ConfigurationException
Description copied from interface: ConfigurationValidator
Check to see if configuration is feasibly valid. That is, does this configuration match the schema in its current state, but not neccessarily fullfill the requirements of the schema. Implementations are not required to support checking feasibility. If feasibility cannot be checked, the implementation should always return true
Specified by:
isFeasiblyValid in interface ConfigurationValidator
Following copied from interface: org.apache.avalon.phoenix.interfaces.ConfigurationValidator
Parameters:
application - Application name
block - Block name to store configuration for
configuration - Configuration to check
Returns:
true if configuration is feasibly valid
Throws:
ConfigurationException - if no schema is found

getSchema

public String getSchema(String application,
                        String block)
Description copied from interface: ConfigurationValidatorMBean
Get the XML that represents the schema for the specified application and block. Returns null if no schema.
Specified by:
getSchema in interface ConfigurationValidatorMBean
Following copied from interface: org.apache.avalon.phoenix.interfaces.ConfigurationValidatorMBean
Parameters:
application - to get schema for
block - to get schema for
Returns:
schema as string, or null if none exists

getSchemaType

public String getSchemaType(String application,
                            String block)
Description copied from interface: ConfigurationValidatorMBean
Get the schema type for the specified application and block. Returns null if no schema
Specified by:
getSchemaType in interface ConfigurationValidatorMBean
Following copied from interface: org.apache.avalon.phoenix.interfaces.ConfigurationValidatorMBean
Parameters:
application - to get schema for
block - to get schema for
Returns:
schema type, or null if none exists

isValid

public boolean isValid(String application,
                       String block,
                       String configurationXml)
                throws ConfigurationException


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.