com.atlassian.gadgets
Class GadgetRequestContext

java.lang.Object
  extended by com.atlassian.gadgets.GadgetRequestContext

public final class GadgetRequestContext
extends Object

Holds information associated with a gadget request that the system will need to use. GadgetRequestContext objects should be created using the GadgetRequestContext.Builder class. By doing a static import of the GadgetRequestContext.Builder.gadgetRequestContext() method, you can create a GadgetRequestContext as follows:

  GadgetRequestContext gadgetRequestContext = gadgetRequestContext().viewer("Bob").build();
 


Nested Class Summary
static class GadgetRequestContext.Builder
          A builder that facilitates construction of GadgetRequestContext objects.
 
Field Summary
static GadgetRequestContext NO_CURRENT_REQUEST
           
 
Method Summary
 boolean getIgnoreCache()
          Returns the cache setting used for this request.
 Locale getLocale()
          Returns the locale used for this request.
 String getViewer()
          Returns the viewer (the current user) for this request.
 boolean isDebuggingEnabled()
          Returns true if the gadget should be rendered with debugging enabled, otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_CURRENT_REQUEST

public static final GadgetRequestContext NO_CURRENT_REQUEST
Method Detail

getLocale

public Locale getLocale()
Returns the locale used for this request.

Returns:
the Locale used for this request

getIgnoreCache

public boolean getIgnoreCache()
Returns the cache setting used for this request.

Returns:
the RequestCacheSetting used for this request

getViewer

public String getViewer()
Returns the viewer (the current user) for this request.

Returns:
the String representing the viewer for this request

isDebuggingEnabled

public boolean isDebuggingEnabled()
Returns true if the gadget should be rendered with debugging enabled, otherwise. When this returns true, the JavaScript for the features used by the gadget will be served in non-minimized, making it easier to debug.

Returns:
true if the gadget should be rendered with debugging enabled, otherwise


Copyright © 2009 Atlassian. All Rights Reserved.