java.lang.Object
hudson.model.AbstractDescribableImpl<ATXSetting<?>>
de.tracetronic.jenkins.plugins.ecutest.report.atx.installation.ATXSetting<T>
Type Parameters:
T - the type of the setting
All Implemented Interfaces:
Describable<ATXSetting<?>>, Serializable, Cloneable
Direct Known Subclasses:
ATXBooleanSetting, ATXSecretSetting, ATXTextSetting

public abstract class ATXSetting<T> extends AbstractDescribableImpl<ATXSetting<?>> implements Cloneable, Serializable
Class holding the information of a single ATX setting.
See Also:
  • Field Details

    • value

      protected T value
      The current value of the setting as generic type.
  • Constructor Details

    • ATXSetting

      public ATXSetting(String name, ATXSetting.SettingsGroup group, T value)
      Instantiates a new ATXSetting. Settings group, descriptions and default value are synchronized during plugin startup.
      Parameters:
      name - the name
      group - the settings group
      value - the current value
    • ATXSetting

      public ATXSetting(String name, ATXSetting.SettingsGroup group, String descGerman, String descEnglish, T defaultValue)
      Instantiates a new ATXSetting with associated group, descriptions and default value.
      Parameters:
      name - the name
      group - the settings group
      descGerman - the German description
      descEnglish - the English description
      defaultValue - the default value
  • Method Details

    • readResolve

      protected Object readResolve()
      Used for backward compatibility using deprecated configuration map.
      Returns:
      the value to use after deserialization
      Since:
      2.7.0
    • clone

      public ATXSetting<T> clone()
      Overrides:
      clone in class Object
    • getName

      public String getName()
    • getTitle

      public String getTitle()
    • getGroup

      public ATXSetting.SettingsGroup getGroup()
    • getDescGerman

      public String getDescGerman()
    • getDescEnglish

      public String getDescEnglish()
    • getDescription

      public String getDescription()
      The system locale description, defaults to English.
      Returns:
      the description
    • getDefaultValue

      public T getDefaultValue()
    • getValue

      public T getValue()
    • setValue

      public void setValue(T value)
      Sets the current value.
      Parameters:
      value - the new current value
    • isCheckbox

      public boolean isCheckbox()
      Determines whether this setting is checkbox type.
      Returns:
      true if setting is checkbox type, false otherwise
    • isSecret

      public boolean isSecret()
      Determines whether this setting is secret type.
      Returns:
      true if setting is secret type, false otherwise
    • toString

      public static String toString(boolean value)
      Converts a boolean value to Python string equivalent.
      Parameters:
      value - the value
      Returns:
      the string value