org.apache.shindig.gadgets.oauth
Enum OAuthError

java.lang.Object
  extended by java.lang.Enum<OAuthError>
      extended by org.apache.shindig.gadgets.oauth.OAuthError
All Implemented Interfaces:
Serializable, Comparable<OAuthError>

public enum OAuthError
extends Enum<OAuthError>

Error strings to be returned to gadgets as "oauthError" data.


Enum Constant Summary
BAD_OAUTH_CONFIGURATION
          The request cannot be completed because the gadget's OAuth configuration is incorrect.
BAD_OAUTH_TOKEN_URL
          The request cannot be completed because the gadget didn't specify an endpoint required for redirection-based authorization.
INVALID_PARAMETER
          The request contains an invalid parameter.
INVALID_REQUEST
          The request cannot be completed because the request options were invalid.
INVALID_TRUSTED_PARAMETER
          The request contains an invalid trusted parameter.
INVALID_URL
          The URL is invalid
MISSING_OAUTH_PARAMETER
          The request cannot be completed due to missing oauth field(s)
MISSING_SERVER_RESPONSE
          The request did not yield a response from the server
NOT_OWNER
          The user is not the owner of the page.
UNAUTHENTICATED
          The user is not authenticated.
UNKNOWN_PARAMETER_LOCATION
           
UNKNOWN_PROBLEM
          The request cannot be completed for an unspecified reason.
UNSUPPORTED_HTTP_METHOD
          The requested HTTP method is not supported
 
Method Summary
 String toString()
           
static OAuthError valueOf(String name)
          Returns the enum constant of this type with the specified name.
static OAuthError[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BAD_OAUTH_CONFIGURATION

public static final OAuthError BAD_OAUTH_CONFIGURATION
The request cannot be completed because the gadget's OAuth configuration is incorrect. Generic message.


BAD_OAUTH_TOKEN_URL

public static final OAuthError BAD_OAUTH_TOKEN_URL
The request cannot be completed because the gadget didn't specify an endpoint required for redirection-based authorization.


MISSING_OAUTH_PARAMETER

public static final OAuthError MISSING_OAUTH_PARAMETER
The request cannot be completed due to missing oauth field(s)


MISSING_SERVER_RESPONSE

public static final OAuthError MISSING_SERVER_RESPONSE
The request did not yield a response from the server


UNSUPPORTED_HTTP_METHOD

public static final OAuthError UNSUPPORTED_HTTP_METHOD
The requested HTTP method is not supported


UNKNOWN_PROBLEM

public static final OAuthError UNKNOWN_PROBLEM
The request cannot be completed for an unspecified reason.


UNAUTHENTICATED

public static final OAuthError UNAUTHENTICATED
The user is not authenticated.


NOT_OWNER

public static final OAuthError NOT_OWNER
The user is not the owner of the page.


INVALID_URL

public static final OAuthError INVALID_URL
The URL is invalid


INVALID_PARAMETER

public static final OAuthError INVALID_PARAMETER
The request contains an invalid parameter.


INVALID_TRUSTED_PARAMETER

public static final OAuthError INVALID_TRUSTED_PARAMETER
The request contains an invalid trusted parameter.


UNKNOWN_PARAMETER_LOCATION

public static final OAuthError UNKNOWN_PARAMETER_LOCATION

INVALID_REQUEST

public static final OAuthError INVALID_REQUEST
The request cannot be completed because the request options were invalid. Generic message.

Method Detail

values

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

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

valueOf

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

toString

public String toString()
Overrides:
toString in class Enum<OAuthError>


Copyright © 2007-2012. All Rights Reserved.