de.smartics.properties.spi.config.validation
Class ConfigurationValidator

Package class diagram package ConfigurationValidator
java.lang.Object
  extended by de.smartics.properties.spi.config.validation.ConfigurationValidator
All Implemented Interfaces:
Serializable

public final class ConfigurationValidator
     
     
extends Object
implements Serializable

Helper to validate sets of properties. Helpful for ConfigurationProperties.

See Also:
Serialized Form

Constructor Summary
ConfigurationValidator(ConfigurationPropertiesManagement configuration)
          Default constructor for non-lenient validation.
ConfigurationValidator(ConfigurationPropertiesManagement configuration, boolean lenient)
          Default constructor.
 
Method Summary
 void validate(PropertyCollection properties)
          Validates the given properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationValidator

public ConfigurationValidator(ConfigurationPropertiesManagement configuration)
Default constructor for non-lenient validation.

Parameters:
configuration - the configuration to validate.

ConfigurationValidator

public ConfigurationValidator(ConfigurationPropertiesManagement configuration,
                              boolean lenient)
Default constructor.

Parameters:
configuration - the configuration to validate.
lenient - the lenient flag that tells the validation process to handle unknown properties gracefully if set to true.
Method Detail

validate

public void validate(PropertyCollection properties)
              throws de.smartics.util.lang.NullArgumentException,
                     ConfigurationValidationException
Validates the given properties.

Parameters:
properties - the properties to validate.
Throws:
de.smartics.util.lang.NullArgumentException - if properties is null.
ConfigurationValidationException - if validation fails.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.