Class UserPrefSpec.Builder

java.lang.Object
com.atlassian.gadgets.spec.UserPrefSpec.Builder
Enclosing class:
UserPrefSpec

public static class UserPrefSpec.Builder extends Object
A builder that facilitates construction of UserPrefSpec objects. The final UserPrefSpec is created by calling the build() method
  • Method Details

    • displayName

      public UserPrefSpec.Builder displayName(String displayName)
      Set the display name of the UserPrefSpec under construction and return this Builder to allow further construction to be done.
      Parameters:
      displayName - name to show the user for this UserPrefSpec
      Returns:
      this builder to allow for further construction
    • required

      public UserPrefSpec.Builder required(boolean required)
      Set the setting of the UserPrefSpec under construction whether it is required or not and return this Builder to allow further construction to be done.
      Parameters:
      required - the setting of this UserPrefSpec whether it is required or not
      Returns:
      this builder to allow for further construction
    • dataType

      public UserPrefSpec.Builder dataType(DataType dataType)
      Set the DataType of the UserPrefSpec under construction and return this Builder to allow further construction to be done.
      Parameters:
      dataType - the DataType of this pref
      Returns:
      this builder to allow for further construction
    • enumValues

      public UserPrefSpec.Builder enumValues(Map<String,String> enumValues)
      Set the Map of the possible values for an enumerated UserPrefSpec under construction and return this Builder to allow further construction to be done.
      Parameters:
      enumValues - the possible values for an enumerated pref
      Returns:
      this builder to allow for further construction
    • defaultValue

      public UserPrefSpec.Builder defaultValue(String defaultValue)
      Set the default value of the UserPrefSpec under construction and return this Builder to allow further construction to be done.
      Parameters:
      defaultValue - the pref's default value
      Returns:
      this builder to allow for further construction
    • build

      public UserPrefSpec build()
      Returns the final constructed UserPrefSpec
      Returns:
      the UserPrefSpec