java.lang.Object
hudson.model.AbstractDescribableImpl<ATXConfig>
de.tracetronic.jenkins.plugins.ecutest.report.atx.installation.ATXConfig
All Implemented Interfaces:
Describable<ATXConfig>, Serializable, Cloneable

public class ATXConfig extends AbstractDescribableImpl<ATXConfig> implements Cloneable, Serializable
Class holding the ATX configuration grouped by setting sections.
See Also:
  • Constructor Details

    • ATXConfig

      public ATXConfig()
      Instantiates a new ATXConfig with the default configuration.
    • ATXConfig

      @DataBoundConstructor public ATXConfig(List<ATXSetting<?>> settings, List<ATXCustomSetting> customSettings)
      Instantiates a new ATXConfig.
      Parameters:
      settings - the ATX settings map
      customSettings - the custom settings
  • Method Details

    • readResolve

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

      public ATXConfig clone()
      Overrides:
      clone in class Object
    • getSettings

      public List<ATXSetting<?>> getSettings()
    • setSettings

      public void setSettings(List<ATXSetting<?>> settings)
    • getCustomSettings

      public List<ATXCustomSetting> getCustomSettings()
    • setCustomSettings

      public void setCustomSettings(List<ATXCustomSetting> customSettings)
    • getSettingByName

      public Optional<ATXSetting<?>> getSettingByName(String name)
      Gets the ATX setting by given setting name.
      Parameters:
      name - the setting name
      Returns:
      the ATX setting or null if not found
    • getCustomSettingByName

      public Optional<ATXCustomSetting> getCustomSettingByName(String name)
      Gets the ATX custom setting by given setting name.
      Parameters:
      name - the custom setting name
      Returns:
      the ATX setting or null if not found
    • getSettingsByGroup

      public List<ATXSetting<?>> getSettingsByGroup(ATXSetting.SettingsGroup group)
      Gets all ATX settings which belongs to a settings group.
      Parameters:
      group - the settings group
      Returns:
      the list of ATX settings or empty list if not found
    • getSettingsByGroupName

      public List<ATXSetting<?>> getSettingsByGroupName(String groupName)
      Gets all ATX settings which belongs to a named settings group.
      Parameters:
      groupName - the group name
      Returns:
      the settings by group name
    • getSettingValueByName

      public Object getSettingValueByName(String name) throws IllegalArgumentException
      Gets the ATX setting value by given setting name from all ATX settings.
      Parameters:
      name - the setting name
      Returns:
      the setting value or null if not found
      Throws:
      IllegalArgumentException
    • getSettingValueBySettings

      @CheckForNull public Object getSettingValueBySettings(String name, List<ATXSetting<?>> settings)
      Gets the ATX setting value by given setting name from a list of ATX settings.
      Parameters:
      name - the setting name
      settings - the setting list to search in
      Returns:
      the setting value or null if not found
    • getSettingValueByGroup

      @CheckForNull public Object getSettingValueByGroup(String name, ATXSetting.SettingsGroup group)
      Gets the ATX setting by given setting name and a list of ATX settings.
      Parameters:
      name - the setting name
      group - the settings group
      Returns:
      the ATX setting or null if not found
    • setSettingValueByName

      public void setSettingValueByName(String name, Object value)
      Sets the ATX setting value by name if present.
      Parameters:
      name - the setting name
      value - the setting value
    • getSettingsGroup

      public static ATXSetting.SettingsGroup getSettingsGroup(String groupName)
      Gets the ATX settings group by name.
      Parameters:
      groupName - the group name
      Returns:
      the settings group