Package com.atlassian.gadgets.spec
Class GadgetSpec
java.lang.Object
com.atlassian.gadgets.spec.GadgetSpec
Represents a gadget specification
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder that facilitates construction ofGadgetSpecobjects. -
Method Summary
Modifier and TypeMethodDescriptionstatic GadgetSpec.BuildergadgetSpec(GadgetSpec gadgetSpec) Factory method which allows you to create a newGadgetSpecobject based on an existingGadgetSpec.static GadgetSpec.BuildergadgetSpec(URI specUri) Factory method to create a new builder which can be used to createGadgetSpecobjects.Get the author of the gadget in this specGet the email for the author of the gadget in this specGet the colorMode of the gadget in this specGet the description of the gadget in this specGet the title for the directory of the gadget in this specGet the features in this specintGet the height of the gadget in this specgetTheme()Get the theme of the gadget in this specGet the URI for the thumbnail image representing the gadgetgetTitle()Get the title of the gadget in this specGet the url that the title of the gadget in this spec should link toGet the features that are needed (required, not optional) but aren't availablegetUrl()Get the uri for this gadget specGet the user prefs in this specintgetWidth()Get the width of the gadget in this specbooleanGet the scrolling setting of the gadget in this specbooleansupportsViewType(ViewType viewType) Check if a particular view is supported in this spectoString()
-
Method Details
-
getUrl
Get the uri for this gadget spec- Returns:
- the uri for this gadget spec
-
getUserPrefs
Get the user prefs in this spec- Returns:
- an iterable of the user prefs in this spec
-
supportsViewType
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
Get the title of the gadget in this spec- Returns:
- the title of the gadget in this spec
-
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
Get the URI for the thumbnail image representing the gadget- Returns:
- the URI for the thumbnail image representing the gadget
-
getAuthor
Get the author of the gadget in this spec- Returns:
- the author of the gadget in this spec
-
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
Get the description of the gadget in this spec- Returns:
- the description of the gadget in this spec
-
getColorMode
Get the colorMode of the gadget in this spec- Returns:
- the colorMode of the gadget in this spec
-
getTheme
Get the theme of the gadget in this spec- Returns:
- the theme of the gadget in this spec
-
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
Get the features in this spec- Returns:
- a map of feature name Strings to Feature objects
-
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
Factory method to create a new builder which can be used to createGadgetSpecobjects. It returns aBuilderwhich allows you to set the gadget spec values.- Parameters:
specUri-URIof the gadget- Returns:
- a
Builderwhich allows you to set the gadget spec values
-
gadgetSpec
Factory method which allows you to create a newGadgetSpecobject based on an existingGadgetSpec.- Parameters:
gadgetSpec- theGadgetSpecto start with when building the newGadgetSpec- Returns:
- a
Builderwhich allows you to set the gadget spec values
-
toString
-