Enum GerritTriggerParameters.ParameterMode
- java.lang.Object
-
- java.lang.Enum<GerritTriggerParameters.ParameterMode>
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerParameters.ParameterMode
-
- All Implemented Interfaces:
Serializable
,Comparable<GerritTriggerParameters.ParameterMode>
- Enclosing class:
- GerritTriggerParameters
public static enum GerritTriggerParameters.ParameterMode extends Enum<GerritTriggerParameters.ParameterMode>
How a parameter should be added to the triggered build. Some parameters likeGerritTriggerParameters.GERRIT_CHANGE_COMMIT_MESSAGE
andGerritTriggerParameters.GERRIT_CHANGE_SUBJECT
can be bulky and not often used in the build. This allows the user to specify how those specific parameters should be added.NONE
means that they are not added at all.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BASE64
The parameter will be added as aBase64EncodedStringParameterValue
.NONE
The parameter will not be added.PLAIN
The parameter will be added as a human readableTextParameterValue
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
encodeBase64(String original)
Encodes the string as Base64.String
toString()
static GerritTriggerParameters.ParameterMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static GerritTriggerParameters.ParameterMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PLAIN
public static final GerritTriggerParameters.ParameterMode PLAIN
The parameter will be added as a human readableTextParameterValue
.
-
BASE64
public static final GerritTriggerParameters.ParameterMode BASE64
The parameter will be added as aBase64EncodedStringParameterValue
.
-
NONE
public static final GerritTriggerParameters.ParameterMode NONE
The parameter will not be added.
-
-
Method Detail
-
values
public static GerritTriggerParameters.ParameterMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (GerritTriggerParameters.ParameterMode c : GerritTriggerParameters.ParameterMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GerritTriggerParameters.ParameterMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
encodeBase64
public static String encodeBase64(String original) throws UnsupportedEncodingException
Encodes the string as Base64.- Parameters:
original
- the string to encode- Returns:
- a new encoded string for the original.
- Throws:
UnsupportedEncodingException
- if so
-
toString
public String toString()
- Overrides:
toString
in classEnum<GerritTriggerParameters.ParameterMode>
-
-