public final class GadgetRequestContext extends Object
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().user(new GadgetRequestContext.User("bob", "bob)).build();
Modifier and Type | Class and Description |
---|---|
static class |
GadgetRequestContext.Builder
A builder that facilitates construction of
GadgetRequestContext objects. |
static class |
GadgetRequestContext.User |
Modifier and Type | Field and Description |
---|---|
static GadgetRequestContext |
NO_CURRENT_REQUEST |
Modifier and Type | Method and Description |
---|---|
boolean |
getIgnoreCache()
Returns the cache setting used for this request.
|
Locale |
getLocale()
Returns the locale used for this request.
|
com.atlassian.fugue.Option<GadgetRequestContext.User> |
getUser()
Returns the current user or none if user is anonymous.
|
View |
getView()
Returns the dashboard view.
|
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. |
public static final GadgetRequestContext NO_CURRENT_REQUEST
public Locale getLocale()
Locale
used for this requestpublic boolean getIgnoreCache()
RequestCacheSetting
used for this requestpublic String getViewer()
getUser()
public View getView()
public boolean isDebuggingEnabled()
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.true
if the gadget should be rendered with debugging enabled, otherwisepublic com.atlassian.fugue.Option<GadgetRequestContext.User> getUser()
Copyright © 2018 Atlassian. All rights reserved.