org.apache.shindig.gadgets
Class GadgetContext
java.lang.Object
org.apache.shindig.gadgets.GadgetContext
- Direct Known Subclasses:
- GadgetsHandlerService.MetadataGadgetContext, HttpGadgetContext, JsHandler.JsGadgetContext, JsonRpcGadgetContext, OAuthGadgetContext
public class GadgetContext
- extends Object
Bundles together context data for the current request with server config data.
TODO: This should probably be called "GadgetRequest" instead of GadgetContext, since it is
actually serving as abstraction over different request types.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GadgetContext
public GadgetContext()
GadgetContext
public GadgetContext(GadgetContext delegate)
getParameter
public String getParameter(String name)
- Parameters:
name - The parameter to get data for.
- Returns:
- The parameter set under the given name, or null.
getUrl
public Uri getUrl()
- Returns:
- The url for this gadget.
getModuleId
public int getModuleId()
- Returns:
- The module id for this request.
getLocale
public Locale getLocale()
- Returns:
- The locale for this request.
getRenderingContext
public RenderingContext getRenderingContext()
- Returns:
- The rendering context for this request.
getIgnoreCache
public boolean getIgnoreCache()
- Returns:
- Whether or not to bypass caching behavior for the current request.
getContainer
public String getContainer()
- Returns:
- The container of the current request.
getHost
public String getHost()
- Returns:
- The host for which the current request is being made.
getUserIp
public String getUserIp()
- Returns:
- The IP Address for the current user.
getDebug
public boolean getDebug()
- Returns:
- Whether or not to show debug output.
getView
public String getView()
- Returns:
- Name of view to show
getUserPrefs
public UserPrefs getUserPrefs()
- Returns:
- The user prefs for the current request.
getToken
public SecurityToken getToken()
- Returns:
- The token associated with this request
getUserAgent
public String getUserAgent()
- Returns:
- The user agent string, or null if not present.
Copyright © 2007-2012. All Rights Reserved.