Package com.atlassian.gadgets.spec
Class UserPrefSpec.Builder
java.lang.Object
com.atlassian.gadgets.spec.UserPrefSpec.Builder
- Enclosing class:
- UserPrefSpec
A builder that facilitates construction of
UserPrefSpec objects. The final UserPrefSpec
is created by calling the build() method-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns the final constructedUserPrefSpecSet theDataTypeof theUserPrefSpecunder construction and return thisBuilderto allow further construction to be done.defaultValue(String defaultValue) Set the default value of theUserPrefSpecunder construction and return thisBuilderto allow further construction to be done.displayName(String displayName) Set the display name of theUserPrefSpecunder construction and return thisBuilderto allow further construction to be done.enumValues(Map<String, String> enumValues) Set theMapof the possible values for an enumeratedUserPrefSpecunder construction and return thisBuilderto allow further construction to be done.required(boolean required) Set the setting of theUserPrefSpecunder construction whether it is required or not and return thisBuilderto allow further construction to be done.
-
Method Details
-
displayName
Set the display name of theUserPrefSpecunder construction and return thisBuilderto allow further construction to be done.- Parameters:
displayName- name to show the user for thisUserPrefSpec- Returns:
- this builder to allow for further construction
-
required
Set the setting of theUserPrefSpecunder construction whether it is required or not and return thisBuilderto allow further construction to be done.- Parameters:
required- the setting of thisUserPrefSpecwhether it is required or not- Returns:
- this builder to allow for further construction
-
dataType
Set theDataTypeof theUserPrefSpecunder construction and return thisBuilderto allow further construction to be done.- Parameters:
dataType- theDataTypeof this pref- Returns:
- this builder to allow for further construction
-
enumValues
Set theMapof the possible values for an enumeratedUserPrefSpecunder construction and return thisBuilderto allow further construction to be done.- Parameters:
enumValues- the possible values for an enumerated pref- Returns:
- this builder to allow for further construction
-
defaultValue
Set the default value of theUserPrefSpecunder construction and return thisBuilderto allow further construction to be done.- Parameters:
defaultValue- the pref's default value- Returns:
- this builder to allow for further construction
-
build
Returns the final constructedUserPrefSpec- Returns:
- the
UserPrefSpec
-