java.lang.Object
org.apache.nifi.processor.util.StandardValidators
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Validatorstatic final Validatorstatic final Validatorstatic final Validatorstatic final Validatorstatic final ValidatorThis validator will evaluate an expression using ONLY environment properties, then validate that the result is a supported character set.static final Validatorstatic final Validatorstatic final ValidatorValidatorthat ensures that value is a non-empty comma separated list of hostname:portstatic final Validatorstatic final Validatorstatic final Validatorstatic final ValidatorValidatorthat ensures that value has 1+ non-whitespace charactersstatic final ValidatorValidatorthat ensures that value's length > 0 and that expression language is presentstatic final ValidatorValidatorthat ensures that value's length > 0static final Validatorstatic final Validatorstatic final Validatorstatic final Validatorstatic final Validatorstatic final Validatorstatic final Validatorstatic final Validatorstatic final Validatorstatic final Validatorstatic final Validatorstatic final Validator -
Method Summary
Modifier and TypeMethodDescriptionstatic ValidatorcreateAttributeExpressionLanguageValidator(AttributeExpression.ResultType expectedResultType) static ValidatorcreateAttributeExpressionLanguageValidator(AttributeExpression.ResultType expectedResultType, boolean allowExtraCharacters) static ValidatorcreateDataSizeBoundsValidator(long minBytesInclusive, long maxBytesInclusive) static ValidatorcreateDirectoryExistsValidator(boolean allowExpressionLanguage, boolean createDirectoryIfMissing) static ValidatorcreateListValidator(boolean trimEntries, boolean excludeEmptyEntries, Validator elementValidator) static ValidatorcreateListValidator(boolean trimEntries, boolean excludeEmptyEntries, Validator validator, boolean ensureElementValidation) static ValidatorcreateLongValidator(long minimum, long maximum, boolean inclusive) static ValidatorcreateNonNegativeFloatingPointValidator(double maximum) static ValidatorcreateRegexMatchingValidator(Pattern pattern) static ValidatorcreateRegexMatchingValidator(Pattern pattern, boolean evaluateExpressions) static ValidatorcreateRegexMatchingValidator(Pattern pattern, boolean evaluateExpressions, String validationMessage) static ValidatorcreateRegexValidator(int minCapturingGroups, int maxCapturingGroups, boolean supportAttributeExpressionLanguage) Creates a @{link Validator} that ensure that a value is a valid Java Regular Expression with at leastminCapturingGroupscapturing groups and at mostmaxCapturingGroupscapturing groups.static ValidatorcreateTimePeriodValidator(long minTime, TimeUnit minTimeUnit, long maxTime, TimeUnit maxTimeUnit)
-
Field Details
-
ATTRIBUTE_KEY_VALIDATOR
-
ATTRIBUTE_KEY_PROPERTY_NAME_VALIDATOR
-
POSITIVE_INTEGER_VALIDATOR
-
POSITIVE_LONG_VALIDATOR
-
NUMBER_VALIDATOR
-
PORT_VALIDATOR
-
NON_EMPTY_VALIDATOR
Validatorthat ensures that value's length > 0 -
NON_EMPTY_EL_VALIDATOR
Validatorthat ensures that value's length > 0 and that expression language is present -
HOSTNAME_PORT_LIST_VALIDATOR
Validatorthat ensures that value is a non-empty comma separated list of hostname:port -
NON_BLANK_VALIDATOR
Validatorthat ensures that value has 1+ non-whitespace characters -
BOOLEAN_VALIDATOR
-
INTEGER_VALIDATOR
-
LONG_VALIDATOR
-
ISO8601_INSTANT_VALIDATOR
-
NON_NEGATIVE_INTEGER_VALIDATOR
-
CHARACTER_SET_VALIDATOR
-
CHARACTER_SET_VALIDATOR_WITH_EVALUATION
This validator will evaluate an expression using ONLY environment properties, then validate that the result is a supported character set. -
SINGLE_CHAR_VALIDATOR
-
URL_VALIDATOR
-
URI_VALIDATOR
-
URI_LIST_VALIDATOR
-
REGULAR_EXPRESSION_VALIDATOR
-
REGULAR_EXPRESSION_WITH_EL_VALIDATOR
-
ATTRIBUTE_EXPRESSION_LANGUAGE_VALIDATOR
-
TIME_PERIOD_VALIDATOR
-
DATA_SIZE_VALIDATOR
-
FILE_EXISTS_VALIDATOR
-
-
Method Details
-
createDirectoryExistsValidator
public static Validator createDirectoryExistsValidator(boolean allowExpressionLanguage, boolean createDirectoryIfMissing) -
createListValidator
-
createListValidator
-
createTimePeriodValidator
-
createAttributeExpressionLanguageValidator
public static Validator createAttributeExpressionLanguageValidator(AttributeExpression.ResultType expectedResultType) -
createDataSizeBoundsValidator
public static Validator createDataSizeBoundsValidator(long minBytesInclusive, long maxBytesInclusive) -
createRegexMatchingValidator
-
createRegexMatchingValidator
-
createRegexMatchingValidator
-
createRegexValidator
public static Validator createRegexValidator(int minCapturingGroups, int maxCapturingGroups, boolean supportAttributeExpressionLanguage) Creates a @{link Validator} that ensure that a value is a valid Java Regular Expression with at leastminCapturingGroupscapturing groups and at mostmaxCapturingGroupscapturing groups. IfsupportAttributeExpressionLanguageis set totrue, the value may also include the Expression Language, but the result of evaluating the Expression Language will be applied before the Regular Expression is performed. In this case, the Expression Language will not support FlowFile Attributes but only System/JVM Properties- Parameters:
minCapturingGroups- minimum capturing groups allowedmaxCapturingGroups- maximum capturing groups allowedsupportAttributeExpressionLanguage- whether or not to support expression language- Returns:
- validator
-
createAttributeExpressionLanguageValidator
public static Validator createAttributeExpressionLanguageValidator(AttributeExpression.ResultType expectedResultType, boolean allowExtraCharacters) -
createLongValidator
-
createNonNegativeFloatingPointValidator
-