public final class ImporterUtils extends Object
Methods from this class prefixed with check
throw exceptions on failures. For validation utility
methods which return validation problems instead of throwing, use ValidationUtils
.
Modifier and Type | Method and Description |
---|---|
static void |
checkArgument(@NotNull ValidationContext validationContext,
boolean expression,
Object errorMessage) |
static void |
checkNoErrors(@NotNull List<ValidationProblem> errors) |
static void |
checkNoErrors(@NotNull Optional<ValidationProblem> error) |
static String |
checkNotBlank(@NotNull String argumentName,
@Nullable String o)
Used to extra validate argument that shouldn't be blank.
|
static String |
checkNotBlank(@NotNull ValidationContext validationContext,
@NotNull String argumentName,
@Nullable String o)
Used to extra validate argument that shouldn't be blank.
|
static String |
checkNotEmpty(@NotNull String argumentName,
@Nullable String s) |
static String |
checkNotEmpty(@NotNull ValidationContext validationContext,
@NotNull String argumentName,
@Nullable String s) |
static void |
checkNotNegative(@NotNull String argumentName,
int value)
Used during building properties to check that a number is a non-negative integer.
|
static void |
checkNotNegative(@NotNull ValidationContext validationContext,
@NotNull String argumentName,
int value)
Used during building properties to check that a number is a non-negative integer.
|
static <T> T |
checkNotNull(@NotNull String argumentName,
T o)
Used to extra validate argument that shouldn't be null to throw our exception instead of NPE.
|
static <T> T |
checkNotNull(@NotNull ValidationContext validationContext,
@NotNull String argumentName,
T o)
Used to extra validate argument that shouldn't be null to throw our exception instead of NPE.
|
static void |
checkPluginKey(@NotNull ValidationContext validationContext,
@NotNull AtlassianModuleProperties actual,
@NotNull AtlassianModuleProperties expected) |
static void |
checkPositive(@NotNull String argumentName,
int value)
Used during building properties to check that a number is a positive integer.
|
static void |
checkPositive(@NotNull String argumentName,
long value)
Used during building properties to check that a number is a positive integer.
|
static void |
checkPositive(@NotNull ValidationContext validationContext,
@NotNull String argumentName,
int value)
Used during building properties to check that a number is a positive integer.
|
static void |
checkPositive(@NotNull ValidationContext validationContext,
@NotNull String argumentName,
long value)
Used during building properties to check that a number is a positive integer.
|
static void |
checkRequired(@NotNull ValidationContext validationContext,
@Nullable Object o)
Used during building properties object when some property is missing.
|
static void |
checkRequired(@NotNull ValidationContext validationContext,
@NotNull String propertyName,
@Nullable Object o)
Used during building properties object when some property is missing.
|
static void |
checkRequiredNotBlank(@NotNull ValidationContext validationContext,
@Nullable String s)
Used during building properties object when some property is missing.
|
static void |
checkThat(@NotNull String message,
@NotNull boolean condition) |
static void |
checkThat(@NotNull ValidationContext validationContext,
boolean condition,
@NotNull String messageFormat,
Object... messageArgs) |
public static void checkPluginKey(@NotNull @NotNull ValidationContext validationContext, @NotNull @NotNull AtlassianModuleProperties actual, @NotNull @NotNull AtlassianModuleProperties expected) throws PropertiesValidationException
PropertiesValidationException
public static void checkThat(@NotNull @NotNull ValidationContext validationContext, boolean condition, @NotNull @NotNull String messageFormat, @NotNull Object... messageArgs) throws PropertiesValidationException
PropertiesValidationException
public static void checkThat(@NotNull @NotNull String message, @NotNull @NotNull boolean condition) throws PropertiesValidationException
PropertiesValidationException
public static void checkNoErrors(@NotNull @NotNull List<ValidationProblem> errors) throws PropertiesValidationException
PropertiesValidationException
public static void checkNoErrors(@NotNull @NotNull Optional<ValidationProblem> error) throws PropertiesValidationException
PropertiesValidationException
public static void checkRequired(@NotNull @NotNull ValidationContext validationContext, @Nullable @Nullable Object o) throws PropertiesValidationException
PropertiesValidationException
public static void checkRequired(@NotNull @NotNull ValidationContext validationContext, @NotNull @NotNull String propertyName, @Nullable @Nullable Object o) throws PropertiesValidationException
PropertiesValidationException
public static void checkRequiredNotBlank(@NotNull @NotNull ValidationContext validationContext, @Nullable @Nullable String s) throws PropertiesValidationException
PropertiesValidationException
public static <T> T checkNotNull(@NotNull @NotNull String argumentName, @Nullable T o) throws PropertiesValidationException
PropertiesValidationException
public static <T> T checkNotNull(@NotNull @NotNull ValidationContext validationContext, @NotNull @NotNull String argumentName, @Nullable T o) throws PropertiesValidationException
PropertiesValidationException
public static String checkNotEmpty(@NotNull @NotNull String argumentName, @Nullable @Nullable String s) throws PropertiesValidationException
PropertiesValidationException
public static String checkNotEmpty(@NotNull @NotNull ValidationContext validationContext, @NotNull @NotNull String argumentName, @Nullable @Nullable String s) throws PropertiesValidationException
PropertiesValidationException
public static void checkArgument(@NotNull @NotNull ValidationContext validationContext, boolean expression, Object errorMessage)
public static String checkNotBlank(@NotNull @NotNull String argumentName, @Nullable @Nullable String o) throws PropertiesValidationException
PropertiesValidationException
public static String checkNotBlank(@NotNull @NotNull ValidationContext validationContext, @NotNull @NotNull String argumentName, @Nullable @Nullable String o) throws PropertiesValidationException
PropertiesValidationException
public static void checkNotNegative(@NotNull @NotNull String argumentName, int value) throws PropertiesValidationException
PropertiesValidationException
public static void checkNotNegative(@NotNull @NotNull ValidationContext validationContext, @NotNull @NotNull String argumentName, int value) throws PropertiesValidationException
PropertiesValidationException
public static void checkPositive(@NotNull @NotNull String argumentName, int value) throws PropertiesValidationException
PropertiesValidationException
public static void checkPositive(@NotNull @NotNull String argumentName, long value) throws PropertiesValidationException
PropertiesValidationException
public static void checkPositive(@NotNull @NotNull ValidationContext validationContext, @NotNull @NotNull String argumentName, int value) throws PropertiesValidationException
PropertiesValidationException
public static void checkPositive(@NotNull @NotNull ValidationContext validationContext, @NotNull @NotNull String argumentName, long value) throws PropertiesValidationException
PropertiesValidationException
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.