com.samsung.android.penup
Class ResponseResult
- java.lang.Object
-
- com.samsung.android.penup.ResponseResult
-
public final class ResponseResult extends java.lang.Object
This class represents the result of the response received from the PEN.UP service.- Since:
- PEN.UP 1.0
-
-
Field Summary
Fields Modifier and Type Field and Description static int
CODE_ACCESS_TOKEN_EXPIRED
The result code for when the access token is expiredstatic int
CODE_AUTHENTICATION_CANCELED
The result code for when the authentication is canceled by userstatic int
CODE_AUTHENTICATION_ERROR
The result code for when the authentication error occurredstatic int
CODE_AUTHENTICATION_REQUIRED
The result code for when the authentication is requiredstatic int
CODE_INTERNAL_SERVER_ERROR
The result code for when the internal server error occurredstatic int
CODE_INVALID_ACCESS_TOKEN
The result code for when the access token is invalidstatic int
CODE_INVALID_CLIENT_ID
The result code for when the client ID is invalidstatic int
CODE_KEY_HASH_MISMATCHED
The result code for when the key hash is mismatchedstatic int
CODE_NETWORK_ERROR
The result code for when the network connection error occurredstatic int
CODE_NOT_EXIST_ARTIST
The result code for when the artist does not existstatic int
CODE_NOT_EXIST_ARTWORK
The result code for when the artwork does not existstatic int
CODE_NOT_EXIST_COLLECTION
The result code for when the collection does not existstatic int
CODE_NOT_EXIST_TAG
The result code for when the tag does not existstatic int
CODE_PERMISSION_DENIED
The result code for when the permission is deniedstatic int
CODE_POST_DIALOG_CANCELED
The result code for when the post dialog is canceled by userstatic int
CODE_SUCCESS
The result code for the successstatic int
CODE_TIMEOUT
The result code for when the timeout is exceeded
-
Constructor Summary
Constructors Constructor and Description ResponseResult(int code, java.lang.String message)
Constructs an instance of ResponseResult with the specified parameters.
-
Method Summary
Methods Modifier and Type Method and Description int
getCode()
Gets the result code.java.lang.String
getMessage()
Gets the result message.boolean
isSuccess()
Checks whether the request is successfully processed and the corresponding response is received.
-
-
-
Field Detail
-
CODE_SUCCESS
public static final int CODE_SUCCESS
The result code for the success- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_INTERNAL_SERVER_ERROR
public static final int CODE_INTERNAL_SERVER_ERROR
The result code for when the internal server error occurred- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_AUTHENTICATION_REQUIRED
public static final int CODE_AUTHENTICATION_REQUIRED
The result code for when the authentication is required- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_AUTHENTICATION_ERROR
public static final int CODE_AUTHENTICATION_ERROR
The result code for when the authentication error occurred- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_AUTHENTICATION_CANCELED
public static final int CODE_AUTHENTICATION_CANCELED
The result code for when the authentication is canceled by user- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_INVALID_CLIENT_ID
public static final int CODE_INVALID_CLIENT_ID
The result code for when the client ID is invalid- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_PERMISSION_DENIED
public static final int CODE_PERMISSION_DENIED
The result code for when the permission is denied- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_ACCESS_TOKEN_EXPIRED
public static final int CODE_ACCESS_TOKEN_EXPIRED
The result code for when the access token is expired- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_INVALID_ACCESS_TOKEN
public static final int CODE_INVALID_ACCESS_TOKEN
The result code for when the access token is invalid- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_KEY_HASH_MISMATCHED
public static final int CODE_KEY_HASH_MISMATCHED
The result code for when the key hash is mismatched- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_NOT_EXIST_ARTIST
public static final int CODE_NOT_EXIST_ARTIST
The result code for when the artist does not exist- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_NOT_EXIST_ARTWORK
public static final int CODE_NOT_EXIST_ARTWORK
The result code for when the artwork does not exist- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_NOT_EXIST_COLLECTION
public static final int CODE_NOT_EXIST_COLLECTION
The result code for when the collection does not exist- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_NOT_EXIST_TAG
public static final int CODE_NOT_EXIST_TAG
The result code for when the tag does not exist- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_POST_DIALOG_CANCELED
public static final int CODE_POST_DIALOG_CANCELED
The result code for when the post dialog is canceled by user- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_NETWORK_ERROR
public static final int CODE_NETWORK_ERROR
The result code for when the network connection error occurred- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
CODE_TIMEOUT
public static final int CODE_TIMEOUT
The result code for when the timeout is exceeded- See Also:
- Constant Field Values
- Since:
- PEN.UP 1.0
-
-
Constructor Detail
-
ResponseResult
public ResponseResult(int code, java.lang.String message)
Constructs an instance of ResponseResult with the specified parameters.- Parameters:
code
- The result code which is one of the followings:
CODE_SUCCESS
CODE_INTERNAL_SERVER_ERROR
CODE_AUTHENTICATION_REQUIRED
CODE_AUTHENTICATION_ERROR
CODE_AUTHENTICATION_CANCELED
CODE_INVALID_CLIENT_ID
CODE_PERMISSION_DENIED
CODE_ACCESS_TOKEN_EXPIRED
CODE_INVALID_ACCESS_TOKEN
CODE_KEY_HASH_MISMATCHED
CODE_NOT_EXIST_ARTIST
CODE_NOT_EXIST_ARTWORK
CODE_NOT_EXIST_COLLECTION
CODE_NOT_EXIST_TAG
CODE_POST_DIALOG_CANCELED
CODE_NETWORK_ERROR
CODE_TIMEOUT
message
- The result message to describe the code- Since:
- PEN.UP 1.0
-
-
Method Detail
-
getCode
public int getCode()
Gets the result code.- Returns:
- The result code which is one of the followings:
CODE_SUCCESS
CODE_INTERNAL_SERVER_ERROR
CODE_AUTHENTICATION_REQUIRED
CODE_AUTHENTICATION_ERROR
CODE_AUTHENTICATION_CANCELED
CODE_INVALID_CLIENT_ID
CODE_PERMISSION_DENIED
CODE_ACCESS_TOKEN_EXPIRED
CODE_INVALID_ACCESS_TOKEN
CODE_KEY_HASH_MISMATCHED
CODE_NOT_EXIST_ARTIST
CODE_NOT_EXIST_ARTWORK
CODE_NOT_EXIST_COLLECTION
CODE_NOT_EXIST_TAG
CODE_POST_DIALOG_CANCELED
CODE_NETWORK_ERROR
CODE_TIMEOUT
- Since:
- PEN.UP 1.0
-
getMessage
public java.lang.String getMessage()
Gets the result message.- Returns:
- The result message
- See Also:
getCode()
- Since:
- PEN.UP 1.0
-
isSuccess
public boolean isSuccess()
Checks whether the request is successfully processed and the corresponding response is received.- Returns:
true
if the request is successfully processed and the corresponding response is received,
false
otherwise- Since:
- PEN.UP 1.0
-
-