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 |
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 . |
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 otherwiseCopyright © 2019 Apache NiFi Project. All rights reserved.