@Deprecated
public class OAuthException
extends java.lang.Exception
Constructor and Description |
---|
OAuthException(OAuthError error,
java.lang.String description,
java.lang.String errorUri)
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.json.JSONObject |
createErrorDocument()
Deprecated.
Returns a JSON representation of the current object as a
JSONObject . |
OAuthError |
getError()
Deprecated.
Returns the kind of OAuth error.
|
java.lang.String |
getErrorDescription()
Deprecated.
Returns the description of the error.
|
java.lang.String |
getErrorUri()
Deprecated.
Returns the URI of the resource that gives more details about the error.
|
java.lang.String |
getErrorURI()
Deprecated.
use
getErrorUri() instead. |
void |
setError(OAuthError error)
Deprecated.
Sets the kind of OAuth error.
|
void |
setErrorDescription(java.lang.String errorDescription)
Deprecated.
Sets the description of the error.
|
void |
setErrorUri(java.lang.String errorUri)
Deprecated.
Sets the URI of the resource that gives more details about the error.
|
static OAuthException |
toOAuthException(Form parameters)
Deprecated.
Returns a new
OAuthException based on the given parameters. |
static OAuthException |
toOAuthException(org.json.JSONObject json)
Deprecated.
Returns a new
OAuthException based on the JSON payload. |
static OAuthException |
toOAuthException(java.lang.Throwable exception)
Deprecated.
Returns a new
OAuthException based on the given exception. |
public OAuthException(OAuthError error, java.lang.String description, java.lang.String errorUri)
error
- The OAuth error.description
- The description of the exception.errorUri
- The URI of the resource that gives more details about the error.public static OAuthException toOAuthException(Form parameters)
OAuthException
based on the given parameters. It especially looks for the given parameters:OAuthResourceDefs.ERROR
for the kind of Exception (see OAuthError
for the supported values),OAuthResourceDefs.ERROR_DESC
for the description,OAuthResourceDefs.ERROR_URI
for the URI of a documentation resource. parameters
- The parameters used to set up the OAuthException
.OAuthException
.public static OAuthException toOAuthException(org.json.JSONObject json) throws org.json.JSONException
OAuthException
based on the JSON payload. It especially looks for the given parameters:OAuthResourceDefs.ERROR
for the kind of Exception (see OAuthError
for the supported values),OAuthResourceDefs.ERROR_DESC
for the description,OAuthResourceDefs.ERROR_URI
for the URI of a documentation resource. json
- The JSON object used to set up the OAuthException
.OAuthException
.org.json.JSONException
public static OAuthException toOAuthException(java.lang.Throwable exception)
OAuthException
based on the given exception.exception
- The exception.OAuthException
.public org.json.JSONObject createErrorDocument() throws org.json.JSONException
JSONObject
.JSONObject
.org.json.JSONException
public OAuthError getError()
public java.lang.String getErrorDescription()
public java.lang.String getErrorUri()
@Deprecated public java.lang.String getErrorURI()
getErrorUri()
instead.public void setError(OAuthError error)
error
- The kind of OAuth error.public void setErrorDescription(java.lang.String errorDescription)
errorDescription
- The description of the error.public void setErrorUri(java.lang.String errorUri)
errorUri
- The URI of the resource that gives more details about the error.Copyright © 2005-2020 Restlet.