Class GadgetSpec

java.lang.Object
com.atlassian.gadgets.spec.GadgetSpec

@Immutable public final class GadgetSpec extends Object
Represents a gadget specification
  • Method Details

    • getUrl

      public URI getUrl()
      Get the uri for this gadget spec
      Returns:
      the uri for this gadget spec
    • getUserPrefs

      public Iterable<UserPrefSpec> getUserPrefs()
      Get the user prefs in this spec
      Returns:
      an iterable of the user prefs in this spec
    • supportsViewType

      public boolean supportsViewType(ViewType viewType)
      Check if a particular view is supported in this spec
      Parameters:
      viewType - to check if supported
      Returns:
      true if the view is supported, according to the spec
    • isScrolling

      public boolean isScrolling()
      Get the scrolling setting of the gadget in this spec
      Returns:
      true if the gadget should be displayed scrollably if applicable
    • getHeight

      public int getHeight()
      Get the height of the gadget in this spec
      Returns:
      the height of the gadget in this spec
    • getWidth

      public int getWidth()
      Get the width of the gadget in this spec
      Returns:
      the width of the gadget in this spec
    • getTitle

      public String getTitle()
      Get the title of the gadget in this spec
      Returns:
      the title of the gadget in this spec
    • getTitleUrl

      public URI getTitleUrl()
      Get the url that the title of the gadget in this spec should link to
      Returns:
      the title url of the gadget in this spec
    • getThumbnail

      public URI getThumbnail()
      Get the URI for the thumbnail image representing the gadget
      Returns:
      the URI for the thumbnail image representing the gadget
    • getAuthor

      public String getAuthor()
      Get the author of the gadget in this spec
      Returns:
      the author of the gadget in this spec
    • getAuthorEmail

      public String getAuthorEmail()
      Get the email for the author of the gadget in this spec
      Returns:
      the email of the author of the gadget in this spec
    • getDescription

      public String getDescription()
      Get the description of the gadget in this spec
      Returns:
      the description of the gadget in this spec
    • getColorMode

      public String getColorMode()
      Get the colorMode of the gadget in this spec
      Returns:
      the colorMode of the gadget in this spec
    • getTheme

      public String getTheme()
      Get the theme of the gadget in this spec
      Returns:
      the theme of the gadget in this spec
    • getDirectoryTitle

      public String getDirectoryTitle()
      Get the title for the directory of the gadget in this spec
      Returns:
      the title for the directory of the gadget in this spec
    • getFeatures

      public Map<String,Feature> getFeatures()
      Get the features in this spec
      Returns:
      a map of feature name Strings to Feature objects
    • getUnsupportedFeatureNames

      public Iterable<String> getUnsupportedFeatureNames()
      Get the features that are needed (required, not optional) but aren't available
      Returns:
      a group of feature names for features that are listed as required in this spec but aren't supported by the container
    • gadgetSpec

      public static GadgetSpec.Builder gadgetSpec(URI specUri)
      Factory method to create a new builder which can be used to create GadgetSpec objects. It returns a Builder which allows you to set the gadget spec values.
      Parameters:
      specUri - URI of the gadget
      Returns:
      a Builder which allows you to set the gadget spec values
    • gadgetSpec

      public static GadgetSpec.Builder gadgetSpec(GadgetSpec gadgetSpec)
      Factory method which allows you to create a new GadgetSpec object based on an existing GadgetSpec.
      Parameters:
      gadgetSpec - the GadgetSpec to start with when building the new GadgetSpec
      Returns:
      a Builder which allows you to set the gadget spec values
    • toString

      public String toString()
      Overrides:
      toString in class Object