net.stepniak.picheese.error.server
Enum ServerErrorType

java.lang.Object
  extended by java.lang.Enum<ServerErrorType>
      extended by net.stepniak.picheese.error.server.ServerErrorType
All Implemented Interfaces:
Serializable, Comparable<ServerErrorType>

public enum ServerErrorType
extends Enum<ServerErrorType>


Enum Constant Summary
ALREADY_RATED_PHOTO
           
BAD_REQUEST
           
FORBIDDEN
           
HTTPS_REQUIRED
           
IMAGE_CONTENT
           
IMAGE_CONTENT_SIZE
           
IMAGE_MIME_TYPE
           
INTERNAL_EXCEPTION
           
INVALID_AUTH_FOR_USER
           
INVALID_KEY
           
INVALID_SESSION_ID
           
METHOD_NOT_ALLOWED
           
NOT_FOUND
           
PARAM_DESCRIPTION
           
PARAM_DESCRIPTION_LENGTH
           
PARAM_IMAGE_BASE64
           
PARAM_KEY
           
PARAM_PAGE_LIMIT
           
PARAM_PAGE_NUMBER
           
PARAM_RATE
           
PARAM_SESSION_ID
           
PARAM_TITLE
           
PARAM_TITLE_LENGTH
           
PARAM_URL
           
PARAM_USER_EMAIL
           
PARAM_USER_EMAIL_LENGTH
           
PARAM_USER_NAME
           
PARAM_USER_NAME_LENGTH
           
UNAUTHORIZED
           
UNAUTHORIZED_SESSION_ID
           
UNSUPPORTED_MEDIA_TYPE
           
USER_ALREADY_EXISTS
           
 
Method Summary
static ServerErrorType create(String errorCode)
           
 String getErrorCode()
           
 String getMsg()
           
 void throwException()
           
static ServerErrorType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ServerErrorType[] 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

METHOD_NOT_ALLOWED

public static final ServerErrorType METHOD_NOT_ALLOWED

BAD_REQUEST

public static final ServerErrorType BAD_REQUEST

NOT_FOUND

public static final ServerErrorType NOT_FOUND

INTERNAL_EXCEPTION

public static final ServerErrorType INTERNAL_EXCEPTION

HTTPS_REQUIRED

public static final ServerErrorType HTTPS_REQUIRED

UNAUTHORIZED

public static final ServerErrorType UNAUTHORIZED

FORBIDDEN

public static final ServerErrorType FORBIDDEN

UNSUPPORTED_MEDIA_TYPE

public static final ServerErrorType UNSUPPORTED_MEDIA_TYPE

PARAM_KEY

public static final ServerErrorType PARAM_KEY

PARAM_SESSION_ID

public static final ServerErrorType PARAM_SESSION_ID

PARAM_IMAGE_BASE64

public static final ServerErrorType PARAM_IMAGE_BASE64

PARAM_URL

public static final ServerErrorType PARAM_URL

PARAM_DESCRIPTION

public static final ServerErrorType PARAM_DESCRIPTION

PARAM_DESCRIPTION_LENGTH

public static final ServerErrorType PARAM_DESCRIPTION_LENGTH

PARAM_TITLE

public static final ServerErrorType PARAM_TITLE

PARAM_TITLE_LENGTH

public static final ServerErrorType PARAM_TITLE_LENGTH

PARAM_PAGE_NUMBER

public static final ServerErrorType PARAM_PAGE_NUMBER

PARAM_PAGE_LIMIT

public static final ServerErrorType PARAM_PAGE_LIMIT

PARAM_RATE

public static final ServerErrorType PARAM_RATE

PARAM_USER_EMAIL

public static final ServerErrorType PARAM_USER_EMAIL

PARAM_USER_EMAIL_LENGTH

public static final ServerErrorType PARAM_USER_EMAIL_LENGTH

PARAM_USER_NAME

public static final ServerErrorType PARAM_USER_NAME

PARAM_USER_NAME_LENGTH

public static final ServerErrorType PARAM_USER_NAME_LENGTH

INVALID_KEY

public static final ServerErrorType INVALID_KEY

UNAUTHORIZED_SESSION_ID

public static final ServerErrorType UNAUTHORIZED_SESSION_ID

INVALID_SESSION_ID

public static final ServerErrorType INVALID_SESSION_ID

INVALID_AUTH_FOR_USER

public static final ServerErrorType INVALID_AUTH_FOR_USER

USER_ALREADY_EXISTS

public static final ServerErrorType USER_ALREADY_EXISTS

ALREADY_RATED_PHOTO

public static final ServerErrorType ALREADY_RATED_PHOTO

IMAGE_MIME_TYPE

public static final ServerErrorType IMAGE_MIME_TYPE

IMAGE_CONTENT

public static final ServerErrorType IMAGE_CONTENT

IMAGE_CONTENT_SIZE

public static final ServerErrorType IMAGE_CONTENT_SIZE
Method Detail

values

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

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

valueOf

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

getMsg

public String getMsg()

getErrorCode

public String getErrorCode()

throwException

public void throwException()
                    throws ServerBaseException
Throws:
ServerBaseException

create

public static ServerErrorType create(String errorCode)


Copyright © 2013. All Rights Reserved.