Interface ValidationContext

All Superinterfaces:
PropertyContext

public interface ValidationContext extends PropertyContext
  • Method Details

    • getControllerServiceLookup

      ControllerServiceLookup getControllerServiceLookup()
      Returns:
      the ControllerServiceLookup which can be used to obtain Controller Services
    • getControllerServiceValidationContext

      ValidationContext getControllerServiceValidationContext(ControllerService controllerService)
      Parameters:
      controllerService - to lookup the validation context of
      Returns:
      a ValidationContext that is appropriate for validating the given ControllerService
    • newExpressionLanguageCompiler

      ExpressionLanguageCompiler newExpressionLanguageCompiler()
      Returns:
      a new ExpressionLanguageCompiler that can be used to compile invalid input: '&' evaluate Attribute Expressions
    • newPropertyValue

      PropertyValue newPropertyValue(String value)
      Parameters:
      value - to make a PropertyValue object for
      Returns:
      a PropertyValue that represents the given value
    • getProperties

      Map<PropertyDescriptor,String> getProperties()
      Returns:
      a Map of all configured Properties
    • getAnnotationData

      String getAnnotationData()
      Returns:
      the currently configured Annotation Data
    • isValidationRequired

      boolean isValidationRequired(ControllerService service)
      There are times when the framework needs to consider a component valid, even if it references an invalid ControllerService. This method will return false if the component is to be considered valid even if the given Controller Service is referenced and is invalid.
      Parameters:
      service - to check if validation is required
      Returns:
      false if the component is to be considered valid even if the given Controller Service is referenced and is invalid
    • isExpressionLanguagePresent

      boolean isExpressionLanguagePresent(String value)
      Parameters:
      value - to test whether expression language is present
      Returns:
      true if the given value contains a NiFi Expression Language expression, false if it does not
    • isExpressionLanguageSupported

      boolean isExpressionLanguageSupported(String propertyName)
      Parameters:
      propertyName - to test whether expression language is supported
      Returns:
      true 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 name
    • getProcessGroupIdentifier

      String getProcessGroupIdentifier()
      Returns the identifier of the ProcessGroup that the component being validated lives in
      Returns:
      the identifier of the ProcessGroup that the component being validated lives in
    • getReferencedParameters

      Collection<String> getReferencedParameters(String propertyName)
      Returns a Collection containing the names of all Parameters that are referenced by the property with the given name
      Returns:
      a Collection containing the names of all Parameters that are referenced by the property with the given name
    • isParameterDefined

      boolean isParameterDefined(String parameterName)
      Parameters:
      parameterName - the name of the Parameter
      Returns:
      true if a Parameter with the given name is defined in the currently selected Parameter Context
    • isParameterSet

      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.
      Parameters:
      parameterName - the name of the parameter
      Returns:
      true if the Parameter is defined and has a non-null value, false otherwise
    • isDependencySatisfied

      boolean isDependencySatisfied(PropertyDescriptor propertyDescriptor, Function<String,PropertyDescriptor> propertyDescriptorLookup)
      Determines whether or not the dependencies of the given Property Descriptor are satisfied. If the given Property Descriptor has no dependency on another property, then the dependency is satisfied. If there is at least one dependency, then all dependencies must be satisfied. In order for a dependency to be considered satisfied, all of the following must be true:
      • The property that is depended upon has all of its dependencies satisfied.
      • If the given Property Descriptor depends on a given AllowableValue, then the property that is depended upon has a value that falls within the given range of Allowable Values for the dependency.
      Parameters:
      propertyDescriptor - the property descriptor
      propertyDescriptorLookup - a lookup for converting from a property name to the property descriptor with that name
      Returns:
      true if all dependencies of the given property descriptor are satisfied, false otherwise
    • isValidateConnections

      default boolean isValidateConnections()
      Determines whether or not incoming and outgoing connections should be validated. If 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.
      Returns:
      true if Connections should be validated, false if Connections should be ignored