org.javaswift.joss.exception
Enum HttpStatusToExceptionMapper

java.lang.Object
  extended by java.lang.Enum<HttpStatusToExceptionMapper>
      extended by org.javaswift.joss.exception.HttpStatusToExceptionMapper
All Implemented Interfaces:
Serializable, Comparable<HttpStatusToExceptionMapper>

public enum HttpStatusToExceptionMapper
extends Enum<HttpStatusToExceptionMapper>


Enum Constant Summary
_202
           
_304
           
_401
           
_403
           
_404
           
_409
           
_411
           
_412
           
_422
           
 
Field Summary
protected  Class<? extends CommandException> exceptionToThrow
           
 
Method Summary
 CommandExceptionError getError()
           
 CommandException getException(CommandExceptionError customError)
           
 Class<? extends CommandException> getExceptionToThrow()
           
 int getHttpStatus()
           
static HttpStatusToExceptionMapper valueOf(String name)
          Returns the enum constant of this type with the specified name.
static HttpStatusToExceptionMapper[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

_202

public static final HttpStatusToExceptionMapper _202

_401

public static final HttpStatusToExceptionMapper _401

_403

public static final HttpStatusToExceptionMapper _403

_404

public static final HttpStatusToExceptionMapper _404

_304

public static final HttpStatusToExceptionMapper _304

_409

public static final HttpStatusToExceptionMapper _409

_411

public static final HttpStatusToExceptionMapper _411

_412

public static final HttpStatusToExceptionMapper _412

_422

public static final HttpStatusToExceptionMapper _422
Field Detail

exceptionToThrow

protected Class<? extends CommandException> exceptionToThrow
Method Detail

values

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

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

valueOf

public static HttpStatusToExceptionMapper 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

getHttpStatus

public int getHttpStatus()

getExceptionToThrow

public Class<? extends CommandException> getExceptionToThrow()

getError

public CommandExceptionError getError()

getException

public CommandException getException(CommandExceptionError customError)
                              throws CommandException
Throws:
CommandException


Copyright © 2012-2014 42 BV. All Rights Reserved.