public interface ValidationContext extends PropertyContext
Modifier and Type | Method and Description |
---|---|
String |
getAnnotationData() |
ControllerServiceLookup |
getControllerServiceLookup() |
ValidationContext |
getControllerServiceValidationContext(ControllerService controllerService) |
String |
getProcessGroupIdentifier()
Returns the identifier of the ProcessGroup that the component being validated lives in
|
Map<PropertyDescriptor,String> |
getProperties() |
Collection<String> |
getReferencedParameters(String propertyName)
Returns a Collection containing the names of all Parameters that are referenced by the property with the given name
|
boolean |
isDependencySatisfied(PropertyDescriptor propertyDescriptor,
Function<String,PropertyDescriptor> propertyDescriptorLookup)
Determines whether or not the dependencies of the given Property Descriptor are satisfied.
|
boolean |
isExpressionLanguagePresent(String value) |
boolean |
isExpressionLanguageSupported(String propertyName) |
boolean |
isParameterDefined(String parameterName) |
boolean |
isParameterSet(String parameterName)
Returns
true if a Parameter with the given name is defined and has a non-null value, false if either the Parameter
is not defined or the Parameter is defined but has a value of null . |
default boolean |
isValidateConnections()
Determines whether or not incoming and outgoing connections should be validated.
|
boolean |
isValidationRequired(ControllerService service)
There are times when the framework needs to consider a component valid,
even if it references an invalid ControllerService.
|
ExpressionLanguageCompiler |
newExpressionLanguageCompiler() |
PropertyValue |
newPropertyValue(String value) |
getAllProperties, getProperty
ControllerServiceLookup getControllerServiceLookup()
ControllerServiceLookup
which can be used to obtain
Controller ServicesValidationContext getControllerServiceValidationContext(ControllerService controllerService)
controllerService
- to lookup the validation context ofControllerService
ExpressionLanguageCompiler newExpressionLanguageCompiler()
ExpressionLanguageCompiler
that can be used to
compile & evaluate Attribute ExpressionsPropertyValue newPropertyValue(String value)
value
- to make a PropertyValue object forMap<PropertyDescriptor,String> getProperties()
String getAnnotationData()
boolean isValidationRequired(ControllerService service)
false
if the component is to be considered valid even
if the given Controller Service is referenced and is invalid.service
- to check if validation is requiredfalse
if the component is to be considered valid
even if the given Controller Service is referenced and is invalidboolean isExpressionLanguagePresent(String value)
value
- to test whether expression language is presenttrue
if the given value contains a NiFi Expression
Language expression, false
if it does notboolean isExpressionLanguageSupported(String propertyName)
propertyName
- to test whether expression language is supportedtrue
if the property with the given name supports
the NiFi Expression Language, false
if the property does not
support the Expression Language or is not a valid property nameString getProcessGroupIdentifier()
Collection<String> getReferencedParameters(String propertyName)
boolean isParameterDefined(String parameterName)
parameterName
- the name of the Parametertrue
if a Parameter with the given name is defined in the currently selected Parameter Contextboolean isParameterSet(String parameterName)
true
if a Parameter with the given name is defined and has a non-null value, false
if either the Parameter
is not defined or the Parameter is defined but has a value of null
.parameterName
- the name of the parametertrue
if the Parameter is defined and has a non-null value, false otherwiseboolean isDependencySatisfied(PropertyDescriptor propertyDescriptor, Function<String,PropertyDescriptor> propertyDescriptorLookup)
propertyDescriptor
- the property descriptorpropertyDescriptorLookup
- a lookup for converting from a property name to the property descriptor with that nametrue
if all dependencies of the given property descriptor are satisfied, false
otherwisedefault boolean isValidateConnections()
true
, then the validation should verify that all Relationships either have one or more connections that include the Relationship,
or that the Relationship is auto-terminated.
Additionally, if true
, then any Processor with an InputRequirement
of InputRequirement.Requirement#INPUT_REQUIRED
should be invalid unless it has an incoming (non-looping) connection, and any Processor with an InputRequirement
of InputRequirement.Requirement#INPUT_FORBIDDEN
should be invalid if it does have any incoming connection.true
if Connections should be validated, false
if Connections should be ignoredCopyright © 2022 Apache NiFi Project. All rights reserved.