org.apache.shindig.gadgets.oauth
Class OAuthArguments

java.lang.Object
  extended by org.apache.shindig.gadgets.oauth.OAuthArguments

public class OAuthArguments
extends Object

Arguments to an OAuth fetch sent by the client.


Nested Class Summary
static class OAuthArguments.UseToken
          Should the OAuth access token be used?
 
Field Summary
static String ACCESS_TOKEN_URL_PARAM
           
static String AUTHORIZATION_URL_PARAM
           
static String PARAM_LOCATION_PARAM
           
static String PROGRAMMATIC_CONFIG_PARAM
           
static String REQUEST_METHOD_PARAM
           
static String REQUEST_TOKEN_URL_PARAM
           
 
Constructor Summary
OAuthArguments()
          Create an OAuthArguments object with all default values.
OAuthArguments(AuthType auth, javax.servlet.http.HttpServletRequest request)
          Parse OAuthArguments from parameters to the makeRequest servlet.
OAuthArguments(AuthType auth, Map<String,String> map)
          Parse OAuthArguments from a Map of settings
OAuthArguments(OAuthArguments orig)
          Copy constructor.
OAuthArguments(RequestAuthenticationInfo info)
          Parse OAuthArguments from parameters to Preload, proxied content rendering, and OSML tags.
 
Method Summary
 boolean equals(Object obj)
           
 boolean getBypassSpecCache()
           
 String getOrigClientState()
           
 String getReceivedCallbackUrl()
           
 String getRequestOption(String name)
           
 String getRequestOption(String name, String def)
           
 String getRequestToken()
           
 String getRequestTokenSecret()
           
 String getServiceName()
           
 boolean getSignOwner()
           
 boolean getSignViewer()
           
 String getTokenName()
           
 OAuthArguments.UseToken getUseToken()
           
 int hashCode()
           
 boolean isProxiedContentRequest()
           
 boolean mayUseToken()
           
 boolean mustUseToken()
           
 boolean programmaticConfig()
           
 void removeRequestOption(String name)
           
 void setBypassSpecCache(boolean bypassSpecCache)
           
 void setOrigClientState(String origClientState)
           
 void setProxiedContentRequest(boolean proxiedContentRequest)
           
 void setReceivedCallbackUrl(String receivedCallbackUrl)
           
 void setRequestOption(String name, String value)
           
 void setRequestToken(String requestToken)
           
 void setRequestTokenSecret(String requestTokenSecret)
           
 void setServiceName(String serviceName)
           
 void setSignOwner(boolean signOwner)
           
 void setSignViewer(boolean signViewer)
           
 void setTokenName(String tokenName)
           
 void setUseToken(OAuthArguments.UseToken useToken)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROGRAMMATIC_CONFIG_PARAM

public static final String PROGRAMMATIC_CONFIG_PARAM
See Also:
Constant Field Values

REQUEST_METHOD_PARAM

public static final String REQUEST_METHOD_PARAM
See Also:
Constant Field Values

PARAM_LOCATION_PARAM

public static final String PARAM_LOCATION_PARAM
See Also:
Constant Field Values

REQUEST_TOKEN_URL_PARAM

public static final String REQUEST_TOKEN_URL_PARAM
See Also:
Constant Field Values

ACCESS_TOKEN_URL_PARAM

public static final String ACCESS_TOKEN_URL_PARAM
See Also:
Constant Field Values

AUTHORIZATION_URL_PARAM

public static final String AUTHORIZATION_URL_PARAM
See Also:
Constant Field Values
Constructor Detail

OAuthArguments

public OAuthArguments(AuthType auth,
                      javax.servlet.http.HttpServletRequest request)
               throws GadgetException
Parse OAuthArguments from parameters to the makeRequest servlet.

Parameters:
auth - authentication type for the request
request - servlet request
Throws:
GadgetException - if any parameters are invalid.

OAuthArguments

public OAuthArguments(RequestAuthenticationInfo info)
               throws GadgetException
Parse OAuthArguments from parameters to Preload, proxied content rendering, and OSML tags.

Throws:
GadgetException

OAuthArguments

public OAuthArguments(AuthType auth,
                      Map<String,String> map)
               throws GadgetException
Parse OAuthArguments from a Map of settings

Throws:
GadgetException

OAuthArguments

public OAuthArguments()
Create an OAuthArguments object with all default values. The details can be filled in later using the setters. Be careful using this in anything except test code. If you find yourself wanting to use this method in real code, consider writing a new constructor instead.


OAuthArguments

public OAuthArguments(OAuthArguments orig)
Copy constructor.

Method Detail

mustUseToken

public boolean mustUseToken()

mayUseToken

public boolean mayUseToken()

getUseToken

public OAuthArguments.UseToken getUseToken()

setUseToken

public void setUseToken(OAuthArguments.UseToken useToken)

getServiceName

public String getServiceName()

setServiceName

public void setServiceName(String serviceName)

getTokenName

public String getTokenName()

setTokenName

public void setTokenName(String tokenName)

getRequestToken

public String getRequestToken()

setRequestToken

public void setRequestToken(String requestToken)

getRequestTokenSecret

public String getRequestTokenSecret()

setRequestTokenSecret

public void setRequestTokenSecret(String requestTokenSecret)

getOrigClientState

public String getOrigClientState()

setOrigClientState

public void setOrigClientState(String origClientState)

getBypassSpecCache

public boolean getBypassSpecCache()

setBypassSpecCache

public void setBypassSpecCache(boolean bypassSpecCache)

getSignOwner

public boolean getSignOwner()

setSignOwner

public void setSignOwner(boolean signOwner)

getSignViewer

public boolean getSignViewer()

setSignViewer

public void setSignViewer(boolean signViewer)

setRequestOption

public void setRequestOption(String name,
                             String value)

removeRequestOption

public void removeRequestOption(String name)

getRequestOption

public String getRequestOption(String name)

getRequestOption

public String getRequestOption(String name,
                               String def)

isProxiedContentRequest

public boolean isProxiedContentRequest()

setProxiedContentRequest

public void setProxiedContentRequest(boolean proxiedContentRequest)

programmaticConfig

public boolean programmaticConfig()

getReceivedCallbackUrl

public String getReceivedCallbackUrl()

setReceivedCallbackUrl

public void setReceivedCallbackUrl(String receivedCallbackUrl)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2007-2012. All Rights Reserved.