net.oauth
Enum ParameterStyle

java.lang.Object
  extended by java.lang.Enum<ParameterStyle>
      extended by net.oauth.ParameterStyle
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ParameterStyle>

public enum ParameterStyle
extends java.lang.Enum<ParameterStyle>

Where to place OAuth parameters in an HTTP message. The alternatives are summarized in OAuth Core under Consumer Request Parameters.


Enum Constant Summary
AUTHORIZATION_HEADER
          Send parameters whose names begin with "oauth_" in an HTTP header, and other parameters (whose names don't begin with "oauth_") in either the message body or URL query string.
BODY
          Send all parameters in the message body, with a Content-Type of application/x-www-form-urlencoded.
QUERY_STRING
          Send all parameters in the query string part of the URL.
 
Method Summary
static ParameterStyle valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ParameterStyle[] 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

AUTHORIZATION_HEADER

public static final ParameterStyle AUTHORIZATION_HEADER
Send parameters whose names begin with "oauth_" in an HTTP header, and other parameters (whose names don't begin with "oauth_") in either the message body or URL query string. The header formats are specified by OAuth Core under OAuth HTTP Authorization Scheme.


BODY

public static final ParameterStyle BODY
Send all parameters in the message body, with a Content-Type of application/x-www-form-urlencoded.


QUERY_STRING

public static final ParameterStyle QUERY_STRING
Send all parameters in the query string part of the URL.

Method Detail

values

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

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

valueOf

public static ParameterStyle valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null


Copyright © 2009. All Rights Reserved.