com.atlassian.gadgets
Class GadgetRequestContext.Builder

java.lang.Object
  extended by com.atlassian.gadgets.GadgetRequestContext.Builder
Enclosing class:
GadgetRequestContext

public static class GadgetRequestContext.Builder
extends Object

A builder that facilitates construction of GadgetRequestContext objects. The final GadgetRequestContext is created by calling the build() method


Constructor Summary
GadgetRequestContext.Builder()
           
 
Method Summary
 GadgetRequestContext build()
          Returns the final constructed GadgetRequestContext.
 GadgetRequestContext.Builder debug(boolean debug)
          Sets whether debugging should be enabled when rendering the gadget.
static GadgetRequestContext.Builder gadgetRequestContext()
          Get a new GadgetRequestContext Builder.
 GadgetRequestContext.Builder ignoreCache(boolean ignoreCache)
          Set the cache setting of the GadgetRequestContext under construction and return this Builder to allow further construction to be done.
 GadgetRequestContext.Builder locale(Locale locale)
          Set the Locale of the GadgetRequestContext under construction and return this Builder to allow further construction to be done.
 GadgetRequestContext.Builder viewer(String viewer)
          Set the current user of the GadgetRequestContext under construction and return this Builder to allow further construction to be done.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GadgetRequestContext.Builder

public GadgetRequestContext.Builder()
Method Detail

gadgetRequestContext

public static GadgetRequestContext.Builder gadgetRequestContext()
Get a new GadgetRequestContext Builder.

Returns:
the new builder

build

public GadgetRequestContext build()
Returns the final constructed GadgetRequestContext.

Returns:
the GadgetRequestContext

locale

public GadgetRequestContext.Builder locale(Locale locale)
Set the Locale of the GadgetRequestContext under construction and return this Builder to allow further construction to be done.

Parameters:
locale - the Locale to use for the GadgetRequestContext
Returns:
this builder to allow for further construction

ignoreCache

public GadgetRequestContext.Builder ignoreCache(boolean ignoreCache)
Set the cache setting of the GadgetRequestContext under construction and return this Builder to allow further construction to be done.

Parameters:
ignoreCache - the cache setting of this GadgetRequestContext
Returns:
this builder to allow for further construction

viewer

public GadgetRequestContext.Builder viewer(String viewer)
Set the current user of the GadgetRequestContext under construction and return this Builder to allow further construction to be done.

Parameters:
viewer - the current user to use for the GadgetRequestContext
Returns:
this builder to allow for further construction

debug

public GadgetRequestContext.Builder debug(boolean debug)
Sets whether debugging should be enabled when rendering the gadget. When debugging is enabled, the JavaScript for the features used by the gadget will be served in non-minimized, making it easier to debug.

Parameters:
debug - enable or disable debugging
Returns:
this builder to allow for further construction


Copyright © 2013 Atlassian. All Rights Reserved.