de.smartics.exceptions.i18n.app
Enum ParseExceptionCode

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

public enum ParseExceptionCode
     
     
extends Enum< ParseExceptionCode>
implements NumberCode

Defines the parsing exception codes for this package.


Enum Constant Summary
GENERIC
          The generic parsing error.
MISSING_PARENT_PROPERTY_ATTRIBUTE
          Parsing the value for a parent attribute failed because the attribute in front of the =-sign is missing.
MISSING_PARENT_PROPERTY_INDEX
          Parsing the value for a parent attribute failed because the index after the =-sign is missing.
MISSING_PARENT_PROPERTY_SEPARATOR
          Parsing the value for a parent attribute failed because the = -sign is missing.
OGNL
          Parsing an OGNL path expression failed.
 
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 ParseExceptionCode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ParseExceptionCode[] 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 ParseExceptionCode GENERIC
The generic parsing error.


OGNL

public static final ParseExceptionCode OGNL
Parsing an OGNL path expression failed.


MISSING_PARENT_PROPERTY_SEPARATOR

public static final ParseExceptionCode MISSING_PARENT_PROPERTY_SEPARATOR
Parsing the value for a parent attribute failed because the = -sign is missing. The =-sign separates the attribute name from the index information.

The parent attribute is an attribute specified by the super class of an exception. The parent exception may be of a standard library and therefore cannot be annotated so the annotation is placed in the subclass.


MISSING_PARENT_PROPERTY_ATTRIBUTE

public static final ParseExceptionCode MISSING_PARENT_PROPERTY_ATTRIBUTE
Parsing the value for a parent attribute failed because the attribute in front of the =-sign is missing.

The parent attribute is an attribute specified by the super class of an exception. The parent exception may be of a standard library and therefore cannot be annotated so the annotation is placed in the subclass.


MISSING_PARENT_PROPERTY_INDEX

public static final ParseExceptionCode MISSING_PARENT_PROPERTY_INDEX
Parsing the value for a parent attribute failed because the index after the =-sign is missing.

The parent attribute is an attribute specified by the super class of an exception. The parent exception may be of a standard library and therefore cannot be annotated so the annotation is placed in the subclass.

Method Detail

values

public static ParseExceptionCode[] 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 (ParseExceptionCode c : ParseExceptionCode.values())
    System.out.println(c);

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

valueOf

public static ParseExceptionCode 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()
Description copied from interface: Code
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<ParseExceptionCode>
Returns:
the string representation of the object.


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