de.smartics.exceptions.i18n.app
Enum ConfigurationExceptionCode

Package class diagram package ConfigurationExceptionCode
java.lang.Object
  extended by java.lang.Enum<ConfigurationExceptionCode>
      extended by de.smartics.exceptions.i18n.app.ConfigurationExceptionCode
All Implemented Interfaces:
NumberCode, Code, Serializable, Comparable< ConfigurationExceptionCode>

public enum ConfigurationExceptionCode
     
     
extends Enum< ConfigurationExceptionCode>
implements NumberCode

Defines the exception codes for problems with the configuration of the library.


Enum Constant Summary
COMPOUND_MESSAGE_MISSING
          A configuration error signaling that values for a compound message a missing.
CONFIGURATION_INACCESSIBLE_GETTER
          A configuration error signaling an inaccessible getter.
CONFIGURATION_INACCESSIBLE_PROPERTY
          A configuration error signaling that a property is not accessible.
CONFIGURATION_MISSING_GETTER
          A configuration error signaling missing getter.
CONFIGURATION_NO_GETTER_FOR_PROPERTY
          A configuration error signaling that there is no getter to access a property.
CONFIGURATION_NOARG
          A configuration error signaling that the getter method does not exist.
CONFIGURATION_OGNL_SYNTAX_ERROR
          A configuration error signaling that there is an error in the OGNL expression of a value.
CONFIGURATION_PROPERTY_RUNTIME_ACCESS
          A configuration error signaling a runtime problem while accessing the property.
CONFIGURATION_RUNTIME_ACCESS
          A configuration error signaling a runtime problem while running the getter method's code.
CONFIGURATION_SECURITY
          A configuration error signaling that accessing the getter raised a security exception.
GENERIC
          The generic configuration error.
 
Method Summary
 String getCode()
          Returns the string representation of the code.
 String getComponentId()
          Returns the component identifier that raised an exception with this code.
 String getDisplayId()
          Returns the string representation of the code.
 Integer getMajorNumber()
          Returns the major number of the code defines a group of codes.
 Integer getMinorNumber()
          Returns the minor number gives additional information about the problem.
 String toString()
          Returns the string representation of the object.
static ConfigurationExceptionCode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ConfigurationExceptionCode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GENERIC

public static final ConfigurationExceptionCode GENERIC
The generic configuration error.


CONFIGURATION_MISSING_GETTER

public static final ConfigurationExceptionCode CONFIGURATION_MISSING_GETTER
A configuration error signaling missing getter.


CONFIGURATION_INACCESSIBLE_GETTER

public static final ConfigurationExceptionCode CONFIGURATION_INACCESSIBLE_GETTER
A configuration error signaling an inaccessible getter.


CONFIGURATION_RUNTIME_ACCESS

public static final ConfigurationExceptionCode CONFIGURATION_RUNTIME_ACCESS
A configuration error signaling a runtime problem while running the getter method's code.


CONFIGURATION_NOARG

public static final ConfigurationExceptionCode CONFIGURATION_NOARG
A configuration error signaling that the getter method does not exist.


CONFIGURATION_SECURITY

public static final ConfigurationExceptionCode CONFIGURATION_SECURITY
A configuration error signaling that accessing the getter raised a security exception.


CONFIGURATION_PROPERTY_RUNTIME_ACCESS

public static final ConfigurationExceptionCode CONFIGURATION_PROPERTY_RUNTIME_ACCESS
A configuration error signaling a runtime problem while accessing the property.


CONFIGURATION_INACCESSIBLE_PROPERTY

public static final ConfigurationExceptionCode CONFIGURATION_INACCESSIBLE_PROPERTY
A configuration error signaling that a property is not accessible.


CONFIGURATION_NO_GETTER_FOR_PROPERTY

public static final ConfigurationExceptionCode CONFIGURATION_NO_GETTER_FOR_PROPERTY
A configuration error signaling that there is no getter to access a property.


CONFIGURATION_OGNL_SYNTAX_ERROR

public static final ConfigurationExceptionCode CONFIGURATION_OGNL_SYNTAX_ERROR
A configuration error signaling that there is an error in the OGNL expression of a value.


COMPOUND_MESSAGE_MISSING

public static final ConfigurationExceptionCode COMPOUND_MESSAGE_MISSING
A configuration error signaling that values for a compound message a missing.

Method Detail

values

public static ConfigurationExceptionCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ConfigurationExceptionCode c : ConfigurationExceptionCode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ConfigurationExceptionCode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getCode

public String getCode()
Description copied from interface: Code
Returns the string representation of the code.

This is the code within the component and lacks the component identifier. If the component is interested in the code, this identifier is used.

Specified by:
getCode in interface Code
Returns:
the string representation of the code.

getComponentId

public String getComponentId()
Returns the component identifier that raised an exception with this code.

This number enables the system to separate the error codes of different sub systems.

Specified by:
getComponentId in interface Code
Returns:
the component identifier.

getMajorNumber

public Integer getMajorNumber()
Description copied from interface: NumberCode
Returns the major number of the code defines a group of codes. This group is associated with a certain type of problem within the component.

For example HTTP knows the major numbers 100, 200, 300, 400, etc.

Specified by:
getMajorNumber in interface NumberCode
Returns:
the major number of the code defines a group of codes.

getMinorNumber

public Integer getMinorNumber()
Description copied from interface: NumberCode
Returns the minor number gives additional information about the problem. It specifies exactly the type of problem. If this value is null, there is no minor number specified.

For example HTTP knows the minor number 4 for page not found. This will add with the major number to 404.

Specified by:
getMinorNumber in interface NumberCode
Returns:
the minor number gives additional information about the problem.

getDisplayId

public String getDisplayId()
Description copied from interface: Code
Returns the string representation of the code. This includes the component identifier and the code. If the code is presented (e.g. in a log file) the return value of this method is used.

This returns the same value as Code.toString() as this method can be used via property getter.

Specified by:
getDisplayId in interface Code
Returns:
the string representation of the code.

toString

public String toString()
Returns the string representation of the object.

Specified by:
toString in interface Code
Overrides:
toString in class Enum<ConfigurationExceptionCode>
Returns:
the string representation of the object.


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