Class Property

java.lang.Object
com.thoughtworks.go.plugin.api.config.Property
Direct Known Subclasses:
PackageMaterialProperty, TaskConfigProperty

@Deprecated public class Property extends Object
Deprecated.
Represents single configuration property. A given property can have set of metadata which can be represented by options. The valid options are Property.REQUIRED, Property.PART_OF_IDENTITY, Property.SECURE, Property.DISPLAY_NAME and Property.DISPLAY_ORDER
  • Field Details

    • REQUIRED

      public static final Option<Boolean> REQUIRED
      Deprecated.
      Option to specify if a property is a mandatory when configuration is captured
    • PART_OF_IDENTITY

      public static final Option<Boolean> PART_OF_IDENTITY
      Deprecated.
      Option to specify if a property is part of group of properties used to uniquely identify material
    • SECURE

      public static final Option<Boolean> SECURE
      Deprecated.
      Option to specify if a property is a secure property. If the property is secure, property value will be always stored (in configuration) and displayed in encrypted text
    • DISPLAY_NAME

      public static final Option<String> DISPLAY_NAME
      Deprecated.
      Option to specify the display name for the property
    • DISPLAY_ORDER

      public static final Option<Integer> DISPLAY_ORDER
      Deprecated.
      Option to specify order of display of property on screen
  • Constructor Details

    • Property

      public Property(String key)
      Deprecated.
    • Property

      protected Property(String key, String value)
      Deprecated.
    • Property

      public Property(String key, String value, String defaultValue)
      Deprecated.
  • Method Details

    • getKey

      public String getKey()
      Deprecated.
      Gets property key
      Returns:
      property key
    • with

      public final <T> Property with(Option<T> option, T value)
      Deprecated.
      Adds an option
      Type Parameters:
      T - Type of option value
      Parameters:
      option - Option type to be added
      value - Option value
      Returns:
      current property instance (this)
    • getValue

      public String getValue()
      Deprecated.
      Gets property value.
      Returns:
      property value
    • getOption

      public <T> T getOption(Option<T> option)
      Deprecated.
      Gets value for given option
      Type Parameters:
      T - type of option
      Parameters:
      option - for which value needs to fetched
      Returns:
      option value
    • getOptions

      public Options getOptions()
      Deprecated.
      Gets all options of property
      Returns:
      all options of property
    • withDefault

      public Property withDefault(String defaultValue)
      Deprecated.