Enum BambooYamlVersion
- java.lang.Object
-
- java.lang.Enum<BambooYamlVersion>
-
- com.atlassian.bamboo.configuration.external.yaml.BambooYamlVersion
-
- All Implemented Interfaces:
Serializable
,Comparable<BambooYamlVersion>
public enum BambooYamlVersion extends Enum<BambooYamlVersion>
Version of the Bamboo simplified YAML format.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NotNull BambooYamlVersion
fromVersion(@NotNull String version)
Convert the given string value to an instance of this enum.String
getVersion()
The string value which is to be used in the YAML document to determine the YAML format version.static BambooYamlVersion
valueOf(String name)
Returns the enum constant of this type with the specified name.static BambooYamlVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
VERSION_1
public static final BambooYamlVersion VERSION_1
First version, supporting only plans with very limited configuration options.
-
VERSION_2
public static final BambooYamlVersion VERSION_2
Second version, supporting plans, deployments, plan permissions and deployment permissions.
-
-
Method Detail
-
values
public static BambooYamlVersion[] 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 (BambooYamlVersion c : BambooYamlVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BambooYamlVersion 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
-
getVersion
public String getVersion()
The string value which is to be used in the YAML document to determine the YAML format version.
-
fromVersion
@NotNull public static @NotNull BambooYamlVersion fromVersion(@NotNull @NotNull String version) throws YamlSpecsValidationException
Convert the given string value to an instance of this enum. The string should correspond to the ones obtained throughgetVersion()
.- Throws:
YamlSpecsValidationException
- if the given string is invalid
-
-