Package com.atlassian.gadgets.view
Class ViewType
java.lang.Object
com.atlassian.gadgets.view.ViewType
- All Implemented Interfaces:
Serializable
Represents a context under which a gadget will be viewed.
ViewTypes can be registered via
createViewType and unregistered via removeViewType.- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ViewTypecreateViewType(String name, String... aliases) Creates aViewTypewith the given canonical name and optional aliases.Gets the aliases for thisViewTypeGets the canonical name of thisViewTypestatic booleanremoveViewType(ViewType viewType) Removes aViewType.toString()static ViewTypeReturns theViewTypeassociated with thevalue.
-
Field Details
-
DEFAULT
-
DIRECTORY
-
CANVAS
-
-
Method Details
-
createViewType
Creates aViewTypewith the given canonical name and optional aliases. Thenameandaliasesmust be unique : no twoViewTypescan share names or aliases. If any of thenameoraliasesis associated with anotherViewType, anIllegalArgumentExceptionwill be thrown- Parameters:
name- the unique canonical name for theViewTypealiases- optional aliases for thisViewType- Returns:
- the created
ViewType
-
removeViewType
Removes aViewType. Its name and all its aliases are free to be used in newViewTypes- Parameters:
viewType-- Returns:
-
getCanonicalName
Gets the canonical name of thisViewType- Returns:
- the canonical name
-
getAliases
Gets the aliases for thisViewType- Returns:
- this
ViewType's aliases
-
valueOf
Returns theViewTypeassociated with thevalue. Previously, aViewTypemust have been created (and not subsequently deleted) with the namevalueor with an aliasvalue. If no suchViewTypeexists, anIllegalArgumentExceptionwill be thrown.- Parameters:
value-- Returns:
-
toString
-