Class UserPrefSpec

java.lang.Object
com.atlassian.gadgets.spec.UserPrefSpec

@Immutable public final class UserPrefSpec extends Object
Represents a user pref containing the details from the gadget spec XML
  • Method Details

    • getName

      public String getName()
      Returns the pref name.
      Returns:
      the pref name
    • getDisplayName

      public String 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

      public DataType getDataType()
      Returns the DataType of this pref.
      Returns:
      this pref's datatype
    • getEnumValues

      public Map<String,String> getEnumValues()
      Returns the possible values for an enumerated pref.
      Returns:
      possible values for the pref
    • getDefaultValue

      public String getDefaultValue()
      Returns the pref's default value.
      Returns:
      the default value of the pref
    • userPrefSpec

      public static UserPrefSpec.Builder userPrefSpec(String name)
      Factory method to create a new builder which can be used to create UserPrefSpec objects. It returns a Builder which allows you to set the user pref spec values.
      Parameters:
      name - the pref name
      Returns:
      a Builder which allows you to set the user pref spec values
    • userPrefSpec

      public static UserPrefSpec.Builder userPrefSpec(UserPrefSpec userPrefSpec)
      Factory method which allows you to create a new UserPrefSpec object based on an existing UserPrefSpec.
      Parameters:
      userPrefSpec - the UserPrefSpec to start with when building the new UserPrefSpec
      Returns:
      a Builder which allows you to set the gadget spec values
    • toString

      public String toString()
      Overrides:
      toString in class Object