org.apache.qpid.management.domain.model
Class ValidationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.qpid.management.domain.model.ValidationException
All Implemented Interfaces:
Serializable

public class ValidationException
extends Exception

Thrown when an attempt is made in order to update / change the state of an object and a constraint on that state is violated.

See Also:
Serialized Form

Field Summary
static String MAX_LENGTH
           
static String MAX_VALUE
           
static String MIN_VALUE
           
 
Constructor Summary
ValidationException(String constraintName, Number constraintValue, String featureName, Object featureValue)
          Builds a new validation exception with the specified parameters.
 
Method Summary
 String getConstraintName()
          Returns the name of the violated constraint.
 Number getConstraintValue()
          Returns the value of the violated constraint.
 String getFeatureName()
          Returns the name of the violating feature.
 Object getFeatureValue()
          Returns the value of the violating feature.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_LENGTH

public static final String MAX_LENGTH
See Also:
Constant Field Values

MAX_VALUE

public static final String MAX_VALUE
See Also:
Constant Field Values

MIN_VALUE

public static final String MIN_VALUE
See Also:
Constant Field Values
Constructor Detail

ValidationException

ValidationException(String constraintName,
                    Number constraintValue,
                    String featureName,
                    Object featureValue)
Builds a new validation exception with the specified parameters.

Parameters:
constraintName - the name of the violated constraint.
constraintValue - the value of the violated constraint.
featureName - the name of the violating feature.
featureValue - the value of the violating feature.
Method Detail

getFeatureValue

public Object getFeatureValue()
Returns the value of the violating feature.

Returns:
the value of the violating feature.

getFeatureName

public String getFeatureName()
Returns the name of the violating feature.

Returns:
the name of the violating feature.

getConstraintValue

public Number getConstraintValue()
Returns the value of the violated constraint.

Returns:
the value of the violated constraint.

getConstraintName

public String getConstraintName()
Returns the name of the violated constraint.

Returns:
the name of the violated constraint.


Licensed to the Apache Software Foundation