Package com.atlassian.bamboo.validation
Class YamlValidatorHelper
java.lang.Object
com.atlassian.bamboo.validation.YamlValidatorHelper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
ensureBoolean
(@Nullable Object o) static @Nullable Boolean
ensureBooleanOrNull
(@Nullable Object o) static <T extends Enum<T>>
TensureConstantOfEnumOrNull
(@NotNull Class<T> enumClass, @Nullable Object o) static int
ensureInteger
(@Nullable Object o) static @Nullable Integer
ensureIntegerOrNull
(@Nullable Object o) ensureListOfMapsOfStringToObjectOrNull
(@Nullable Object o) static @Nullable List<?>
ensureListOrNull
(@Nullable Object o) ensureMapOfStringToObject
(@Nullable Object o) ensureMapOfStringToObjectOrNull
(@Nullable Object o) ensureMapOfStringToStringOrNull
(@Nullable Object o) static @Nullable Map<?,
?> ensureMapOrNull
(@Nullable Object o) static @NotNull String
ensureString
(@Nullable Object o) static @Nullable String
ensureStringOrNull
(@Nullable Object o)
-
Constructor Details
-
YamlValidatorHelper
public YamlValidatorHelper()
-
-
Method Details
-
ensureInteger
- Throws:
YamlValidationException
-
ensureIntegerOrNull
@Nullable public static @Nullable Integer ensureIntegerOrNull(@Nullable @Nullable Object o) throws YamlValidationException - Throws:
YamlValidationException
-
ensureBoolean
- Throws:
YamlValidationException
-
ensureBooleanOrNull
@Nullable public static @Nullable Boolean ensureBooleanOrNull(@Nullable @Nullable Object o) throws YamlValidationException - Throws:
YamlValidationException
-
ensureString
@NotNull public static @NotNull String ensureString(@Nullable @Nullable Object o) throws YamlValidationException - Throws:
YamlValidationException
-
ensureStringOrNull
@Nullable public static @Nullable String ensureStringOrNull(@Nullable @Nullable Object o) throws YamlValidationException - Throws:
YamlValidationException
-
ensureMapOrNull
@Nullable public static @Nullable Map<?,?> ensureMapOrNull(@Nullable @Nullable Object o) throws YamlValidationException - Throws:
YamlValidationException
-
ensureMapOfStringToObjectOrNull
@Nullable public static @Nullable Map<String,Object> ensureMapOfStringToObjectOrNull(@Nullable @Nullable Object o) throws YamlValidationException - Throws:
YamlValidationException
-
ensureMapOfStringToObject
@NotNull public static @NotNull Map<String,Object> ensureMapOfStringToObject(@Nullable @Nullable Object o) throws YamlValidationException - Throws:
YamlValidationException
-
ensureListOrNull
@Nullable public static @Nullable List<?> ensureListOrNull(@Nullable @Nullable Object o) throws YamlValidationException - Throws:
YamlValidationException
-
ensureListOfMapsOfStringToObjectOrNull
@Nullable public static @Nullable List<Map<String,Object>> ensureListOfMapsOfStringToObjectOrNull(@Nullable @Nullable Object o) throws YamlValidationException - Throws:
YamlValidationException
-
ensureMapOfStringToStringOrNull
@Nullable public static @Nullable Map<String,String> ensureMapOfStringToStringOrNull(@Nullable @Nullable Object o) throws YamlValidationException - Throws:
YamlValidationException
-
ensureConstantOfEnumOrNull
@Nullable public static <T extends Enum<T>> T ensureConstantOfEnumOrNull(@NotNull @NotNull Class<T> enumClass, @Nullable @Nullable Object o) throws YamlValidationException - Throws:
YamlValidationException
-