Class GadgetRequestContext.Builder

java.lang.Object
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 Details

    • Builder

      public Builder()
  • Method Details

    • 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
    • view

      public GadgetRequestContext.Builder view(View view)
      Set the current view of the GadgetRequestContext under construction and return this Builder to allow further construction to be done.
      Parameters:
      view - view in which the dashboard item is rendering
      Returns:
      this builder to allow for further construction
    • user

      Sets the current user.
      Parameters:
      user - the current user.
      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