de.smartics.properties.api.config.domain
Class ConfigurationValidationException

Package class diagram package ConfigurationValidationException
java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by de.smartics.exceptions.AbstractCoreRuntimeException
                  extended by de.smartics.exceptions.i18n.AbstractMessageRuntimeException
                      extended by de.smartics.properties.api.core.app.PropertyRootException
                          extended by de.smartics.properties.api.config.codes.ConfigurationRootException
                              extended by de.smartics.properties.api.config.domain.ConfigurationException
                                  extended by de.smartics.properties.api.config.domain.ConfigurationValidationException
All Implemented Interfaces:
de.smartics.exceptions.CoreException, de.smartics.exceptions.i18n.LocalizedException, Serializable

public class ConfigurationValidationException
     
     
extends ConfigurationException

Signals that the configuration is invalid or at least properties cannot be validated because there are no properties descriptors registered for them.

Implementation Notes:
Note that the message text is not part of the public API and may change without notice.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class de.smartics.exceptions.i18n.AbstractMessageRuntimeException
messageBean
 
Fields inherited from class de.smartics.exceptions.AbstractCoreRuntimeException
info
 
Constructor Summary
ConfigurationValidationException(ConfigurationKey<?> key, List<PropertyException> propertyViolations, List<PropertyDescriptor> mandatoryProperties, UnknownProperties unknownProperties)
          Convenience constructor without root cause.
ConfigurationValidationException(Throwable cause, ConfigurationKey<?> key, List<PropertyException> propertyViolations, List<PropertyDescriptor> mandatoryProperties, UnknownProperties unknownProperties)
          Default Constructor.
 
Method Summary
 List<PropertyDescriptor> getMandatoryProperties()
          Returns the list of mandatory properties for which no value has been provided.
 String getMandatoryPropertiesAsText()
          Returns the missing mandatory properties as message text.
 int getMandatoryPropertiesCount()
          Returns the count of missing mandatory properties.
 List<PropertyException> getPropertyViolations()
          Returns the list of violations.
 UnknownProperties getUnknownProperties()
          Returns the list of unknown properties.
 String getUnknownPropertiesAsText()
          Returns the unknown properties as message text.
 int getUnknownPropertiesCount()
          Returns the count of unknown properties.
 int getViolationCount()
          Returns the count of violations.
 String getViolationsAsText(Locale locale)
          Returns the violations as message text.
 
Methods inherited from class de.smartics.properties.api.config.domain.ConfigurationException
getKey
 
Methods inherited from class de.smartics.exceptions.i18n.AbstractMessageRuntimeException
createMessages, createMessages, getCauseTrail, getCauseTrail, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getLocalizedTextMessage, getLocalizedTextMessage, getLocalizedTextMessage, getMessage, getMessage, getMessage, getMessageBean, getMessages, getMessages, toString
 
Methods inherited from class de.smartics.exceptions.AbstractCoreRuntimeException
getCause, getClassLoader, getCode, getId, getTime, truncateCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.smartics.exceptions.CoreException
getCause, getCode, getId, getStackTrace, getTime, setStackTrace, truncateCause
 

Constructor Detail

ConfigurationValidationException

public ConfigurationValidationException(ConfigurationKey<?> key,
                                        List<PropertyException> propertyViolations,
                                        List<PropertyDescriptor> mandatoryProperties,
                                        UnknownProperties unknownProperties)
Convenience constructor without root cause.

Parameters:
key - the key to the configuration that signaled problems.
propertyViolations - the list of violations.
mandatoryProperties - the list of mandatory properties for which no value has been provided.
unknownProperties - the list of unknown properties.

ConfigurationValidationException

public ConfigurationValidationException(Throwable cause,
                                        ConfigurationKey<?> key,
                                        List<PropertyException> propertyViolations,
                                        List<PropertyDescriptor> mandatoryProperties,
                                        UnknownProperties unknownProperties)
Default Constructor.

Parameters:
cause - the cause (which is saved for later retrieval by the AbstractCoreRuntimeException.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
key - the key to the configuration that signaled problems.
propertyViolations - the list of violations.
mandatoryProperties - the list of mandatory properties for which no value has been provided.
unknownProperties - the list of unknown properties.
Method Detail

getPropertyViolations

public final List<PropertyException> getPropertyViolations()
Returns the list of violations.

Returns:
the list of violations.

getMandatoryProperties

public final List<PropertyDescriptor> getMandatoryProperties()
Returns the list of mandatory properties for which no value has been provided.

Returns:
the list of mandatory properties for which no value has been provided.

getUnknownProperties

public final UnknownProperties getUnknownProperties()
Returns the list of unknown properties.

Returns:
the list of unknown properties.

getViolationsAsText

@MessageParam(value="violations")
public final String getViolationsAsText(Locale locale)
Returns the violations as message text.

Parameters:
locale - the locale to use.
Returns:
the violations as message text.

getViolationCount

@MessageParam(value="violationCount")
public final int getViolationCount()
Returns the count of violations.

Returns:
the count of violations.

getMandatoryPropertiesAsText

@MessageParam(value="mandatoryProperties")
public final String getMandatoryPropertiesAsText()
Returns the missing mandatory properties as message text.

Returns:
the missing mandatory properties as message text.

getMandatoryPropertiesCount

@MessageParam(value="mandatoryPropertiesCount")
public final int getMandatoryPropertiesCount()
Returns the count of missing mandatory properties.

Returns:
the count of missing mandatory properties.

getUnknownPropertiesAsText

@MessageParam(value="unknownProperties")
public final String getUnknownPropertiesAsText()
Returns the unknown properties as message text.

Returns:
the unknown mandatory properties as message text.

getUnknownPropertiesCount

@MessageParam(value="unknownPropertiesCount")
public final int getUnknownPropertiesCount()
Returns the count of unknown properties.

Returns:
the count of unknown mandatory properties.


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