Class ATXSetting<T>
- 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ATXSetting.SettingsGroup
The enum Settings group.
-
Constructor Summary
Constructors Constructor Description ATXSetting(String name, ATXSetting.SettingsGroup group, String descGerman, String descEnglish, T defaultValue)
Instantiates a newATXSetting
with associated group, descriptions and default value.ATXSetting(String name, ATXSetting.SettingsGroup group, T value)
Instantiates a newATXSetting
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ATXSetting<T>
clone()
T
getDefaultValue()
String
getDescEnglish()
String
getDescGerman()
String
getDescription()
The system locale description, defaults to English.ATXSetting.SettingsGroup
getGroup()
String
getName()
String
getTitle()
T
getValue()
boolean
isCheckbox()
Determines whether this setting is checkbox type.boolean
isSecret()
Determines whether this setting is secret type.protected Object
readResolve()
Used for backward compatibility using deprecated configuration map.void
setValue(T value)
Sets the current value.static String
toString(boolean value)
Converts a boolean value to Python string equivalent.-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Field Detail
-
value
protected T value
The current value of the setting as generic type.
-
-
Constructor Detail
-
ATXSetting
public ATXSetting(String name, ATXSetting.SettingsGroup group, T value)
Instantiates a newATXSetting
. Settings group, descriptions and default value are synchronized during plugin startup.- Parameters:
name
- the namegroup
- the settings groupvalue
- the current value
-
ATXSetting
public ATXSetting(String name, ATXSetting.SettingsGroup group, String descGerman, String descEnglish, T defaultValue)
Instantiates a newATXSetting
with associated group, descriptions and default value.- Parameters:
name
- the namegroup
- the settings groupdescGerman
- the German descriptiondescEnglish
- the English descriptiondefaultValue
- the default value
-
-
Method Detail
-
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()
-
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
-
-