Package com.atlassian.gadgets.spec
Class UserPrefSpec
java.lang.Object
com.atlassian.gadgets.spec.UserPrefSpec
Represents a user pref containing the details from the gadget spec XML
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder that facilitates construction ofUserPrefSpecobjects. -
Method Summary
Modifier and TypeMethodDescriptionReturns theDataTypeof this pref.Returns the pref's default value.Returns the display name of this parameter.Returns the possible values for an enumerated pref.getName()Returns the pref name.booleanReturns true if the pref is required.toString()static UserPrefSpec.BuilderuserPrefSpec(UserPrefSpec userPrefSpec) Factory method which allows you to create a newUserPrefSpecobject based on an existingUserPrefSpec.static UserPrefSpec.BuilderuserPrefSpec(String name) Factory method to create a new builder which can be used to createUserPrefSpecobjects.
-
Method Details
-
getName
Returns the pref name.- Returns:
- the pref name
-
getDisplayName
Returns the display name of this parameter.- Returns:
- the name to show the user for this pref
-
isRequired
public boolean isRequired()Returns true if the pref is required.- Returns:
- true if the pref is required
-
getDataType
Returns theDataTypeof this pref.- Returns:
- this pref's datatype
-
getEnumValues
Returns the possible values for an enumerated pref.- Returns:
- possible values for the pref
-
getDefaultValue
Returns the pref's default value.- Returns:
- the default value of the pref
-
userPrefSpec
Factory method to create a new builder which can be used to createUserPrefSpecobjects. It returns aBuilderwhich allows you to set the user pref spec values.- Parameters:
name- the pref name- Returns:
- a
Builderwhich allows you to set the user pref spec values
-
userPrefSpec
Factory method which allows you to create a newUserPrefSpecobject based on an existingUserPrefSpec.- Parameters:
userPrefSpec- theUserPrefSpecto start with when building the newUserPrefSpec- Returns:
- a
Builderwhich allows you to set the gadget spec values
-
toString
-