public final class EnsureUtil extends Object
Constructor and Description |
---|
EnsureUtil() |
Modifier and Type | Method and Description |
---|---|
protected static String |
determineResourceWhitelistPattern(ProcessEngineConfiguration processEngineConfiguration,
String resourceType) |
static void |
ensureActiveCommandContext(String operation) |
static void |
ensureAtLeastOneNotEmpty(Class<? extends ProcessEngineException> exceptionClass,
String message,
String... values) |
static void |
ensureAtLeastOneNotEmpty(String message,
String... values) |
static void |
ensureAtLeastOneNotNull(Class<? extends ProcessEngineException> exceptionClass,
String message,
Object... values) |
static void |
ensureAtLeastOneNotNull(String message,
Object... values) |
static void |
ensureEquals(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
long obj1,
long obj2) |
static void |
ensureEquals(String variableName,
long obj1,
long obj2) |
static void |
ensureGreaterThanOrEqual(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
long value1,
long value2) |
static void |
ensureGreaterThanOrEqual(String variableName,
long value1,
long value2) |
static void |
ensureGreaterThanOrEqual(String message,
String variableName,
long value1,
long value2) |
static void |
ensureInstanceOf(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Object value,
Class<?> expectedClass) |
static void |
ensureInstanceOf(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Object value,
Class<?> expectedClass) |
static void |
ensureInstanceOf(String variableName,
Object value,
Class<?> expectedClass) |
static void |
ensureInstanceOf(String message,
String variableName,
Object value,
Class<?> expectedClass) |
static void |
ensureLessThan(String message,
String variable,
long value1,
long value2) |
static void |
ensureNotContainsEmptyString(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Collection<String> values) |
static void |
ensureNotContainsEmptyString(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Collection<String> values) |
static void |
ensureNotContainsEmptyString(String variableName,
Collection<String> values) |
static void |
ensureNotContainsEmptyString(String message,
String variableName,
Collection<String> values) |
static void |
ensureNotContainsNull(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Collection<?> values) |
static void |
ensureNotContainsNull(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Collection<?> values) |
static void |
ensureNotContainsNull(String variableName,
Collection<?> values) |
static void |
ensureNotContainsNull(String message,
String variableName,
Collection<?> values) |
static void |
ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Collection collection) |
static void |
ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Map map) |
static void |
ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
String value) |
static void |
ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Collection collection) |
static void |
ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Map map) |
static void |
ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
String value) |
static void |
ensureNotEmpty(String variableName,
Collection collection) |
static void |
ensureNotEmpty(String variableName,
Map map) |
static void |
ensureNotEmpty(String variableName,
String value) |
static void |
ensureNotEmpty(String message,
String variableName,
Collection collection) |
static void |
ensureNotEmpty(String message,
String variableName,
Map map) |
static void |
ensureNotEmpty(String message,
String variableName,
String value) |
static void |
ensureNotNull(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Object... values) |
static void |
ensureNotNull(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Object value) |
static void |
ensureNotNull(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Object... values) |
static void |
ensureNotNull(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Object value) |
static void |
ensureNotNull(String variableName,
Object... values) |
static void |
ensureNotNull(String variableName,
Object value) |
static void |
ensureNotNull(String message,
String variableName,
Object... values) |
static void |
ensureNotNull(String message,
String variableName,
Object value) |
static void |
ensureNull(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Object value) |
static void |
ensureNumberOfElements(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Collection collection,
int elements) |
static void |
ensureNumberOfElements(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Collection collection,
int elements) |
static void |
ensureNumberOfElements(String variableName,
Collection collection,
int elements) |
static void |
ensureNumberOfElements(String message,
String variableName,
Collection collection,
int elements) |
static void |
ensureOnlyOneNotNull(Class<? extends ProcessEngineException> exceptionClass,
String message,
Object... values) |
static void |
ensureOnlyOneNotNull(String message,
Object... values) |
static void |
ensurePositive(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Long value) |
static void |
ensurePositive(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Long value) |
static void |
ensurePositive(String variableName,
Long value) |
static void |
ensurePositive(String message,
String variableName,
Long value) |
static void |
ensureTrue(String message,
boolean value) |
static void |
ensureValidIndividualResourceId(Class<? extends ProcessEngineException> exceptionClass,
String message,
String id) |
static void |
ensureValidIndividualResourceId(String message,
String id) |
static void |
ensureValidIndividualResourceIds(Class<? extends ProcessEngineException> exceptionClass,
String message,
Collection<String> ids) |
static void |
ensureValidIndividualResourceIds(String message,
Collection<String> ids) |
static void |
ensureWhitelistedResourceId(CommandContext commandContext,
String resourceType,
String resourceId) |
protected static String |
formatMessage(String message,
String variableName,
String description) |
protected static String |
formatMessageElement(String element,
String delimiter) |
protected static <T extends ProcessEngineException> |
generateException(Class<T> exceptionClass,
String message,
String variableName,
String description) |
public static void ensureNotNull(Class<? extends ProcessEngineException> exceptionClass, String variableName, Object value)
public static void ensureNotNull(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Object value)
public static void ensureNull(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Object value)
public static void ensureNotNull(Class<? extends ProcessEngineException> exceptionClass, String variableName, Object... values)
public static void ensureNotNull(String message, String variableName, Object... values)
public static void ensureNotNull(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Object... values)
public static void ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass, String variableName, String value)
public static void ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, String value)
public static void ensureNotEmpty(String variableName, Collection collection)
public static void ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass, String variableName, Collection collection)
public static void ensureNotEmpty(String message, String variableName, Collection collection)
public static void ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Collection collection)
public static void ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass, String variableName, Map map)
public static void ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Map map)
public static void ensureEquals(Class<? extends ProcessEngineException> exceptionClass, String variableName, long obj1, long obj2)
public static void ensureEquals(String variableName, long obj1, long obj2)
public static void ensurePositive(Class<? extends ProcessEngineException> exceptionClass, String variableName, Long value)
public static void ensurePositive(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Long value)
public static void ensureLessThan(String message, String variable, long value1, long value2)
public static void ensureGreaterThanOrEqual(String variableName, long value1, long value2)
public static void ensureGreaterThanOrEqual(String message, String variableName, long value1, long value2)
public static void ensureGreaterThanOrEqual(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, long value1, long value2)
public static void ensureInstanceOf(String variableName, Object value, Class<?> expectedClass)
public static void ensureInstanceOf(Class<? extends ProcessEngineException> exceptionClass, String variableName, Object value, Class<?> expectedClass)
public static void ensureInstanceOf(String message, String variableName, Object value, Class<?> expectedClass)
public static void ensureInstanceOf(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Object value, Class<?> expectedClass)
public static void ensureOnlyOneNotNull(Class<? extends ProcessEngineException> exceptionClass, String message, Object... values)
public static void ensureAtLeastOneNotNull(String message, Object... values)
public static void ensureAtLeastOneNotNull(Class<? extends ProcessEngineException> exceptionClass, String message, Object... values)
public static void ensureAtLeastOneNotEmpty(String message, String... values)
public static void ensureAtLeastOneNotEmpty(Class<? extends ProcessEngineException> exceptionClass, String message, String... values)
public static void ensureNotContainsEmptyString(String variableName, Collection<String> values)
public static void ensureNotContainsEmptyString(String message, String variableName, Collection<String> values)
public static void ensureNotContainsEmptyString(Class<? extends ProcessEngineException> exceptionClass, String variableName, Collection<String> values)
public static void ensureNotContainsEmptyString(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Collection<String> values)
public static void ensureNotContainsNull(String variableName, Collection<?> values)
public static void ensureNotContainsNull(String message, String variableName, Collection<?> values)
public static void ensureNotContainsNull(Class<? extends ProcessEngineException> exceptionClass, String variableName, Collection<?> values)
public static void ensureNotContainsNull(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Collection<?> values)
public static void ensureNumberOfElements(String variableName, Collection collection, int elements)
public static void ensureNumberOfElements(String message, String variableName, Collection collection, int elements)
public static void ensureNumberOfElements(Class<? extends ProcessEngineException> exceptionClass, String variableName, Collection collection, int elements)
public static void ensureNumberOfElements(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Collection collection, int elements)
public static void ensureValidIndividualResourceId(String message, String id)
public static void ensureValidIndividualResourceId(Class<? extends ProcessEngineException> exceptionClass, String message, String id)
public static void ensureValidIndividualResourceIds(String message, Collection<String> ids)
public static void ensureValidIndividualResourceIds(Class<? extends ProcessEngineException> exceptionClass, String message, Collection<String> ids)
public static void ensureWhitelistedResourceId(CommandContext commandContext, String resourceType, String resourceId)
public static void ensureTrue(String message, boolean value)
protected static String determineResourceWhitelistPattern(ProcessEngineConfiguration processEngineConfiguration, String resourceType)
protected static <T extends ProcessEngineException> T generateException(Class<T> exceptionClass, String message, String variableName, String description)
protected static String formatMessage(String message, String variableName, String description)
public static void ensureActiveCommandContext(String operation)
Copyright © 2021. All rights reserved.