org.decisiondeck.jmcda.persist.xmcda2.utils
Enum XMCDAErrorsManager.ErrorManagement

java.lang.Object
  extended by java.lang.Enum<XMCDAErrorsManager.ErrorManagement>
      extended by org.decisiondeck.jmcda.persist.xmcda2.utils.XMCDAErrorsManager.ErrorManagement
All Implemented Interfaces:
Serializable, Comparable<XMCDAErrorsManager.ErrorManagement>
Enclosing class:
XMCDAErrorsManager

public static enum XMCDAErrorsManager.ErrorManagement
extends Enum<XMCDAErrorsManager.ErrorManagement>

Indicates what to do when unexpected data is read. When the COLLECT strategy is used, the user should make sure the errors will go somewhere. If the user does not care about errors and simply want to discard them, the LOG strategy should be chosen as it does not waste memory and it does not completely hide errors.


Enum Constant Summary
COLLECT
          Do not stop reading at unexpected data: collect errors for further retrieval.
LOG
          Do not stop reading at unexpected data, log the error and go on.
THROW
          Stop reading at first error and throw an InvalidInputException exception.
 
Method Summary
static XMCDAErrorsManager.ErrorManagement valueOf(String name)
          Returns the enum constant of this type with the specified name.
static XMCDAErrorsManager.ErrorManagement[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

THROW

public static final XMCDAErrorsManager.ErrorManagement THROW
Stop reading at first error and throw an InvalidInputException exception.


COLLECT

public static final XMCDAErrorsManager.ErrorManagement COLLECT
Do not stop reading at unexpected data: collect errors for further retrieval.


LOG

public static final XMCDAErrorsManager.ErrorManagement LOG
Do not stop reading at unexpected data, log the error and go on.

Method Detail

values

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

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

valueOf

public static XMCDAErrorsManager.ErrorManagement 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


Copyright © 2011. All Rights Reserved.