Interface NiFiWebConfigurationContext


public interface NiFiWebConfigurationContext
NiFi web context providing limited access to dataflow configuration for component custom UIs.
  • Method Details

    • getControllerService

      ControllerService getControllerService(String serviceIdentifier, String componentId)
      Parameters:
      serviceIdentifier - of the controller service
      componentId - the id of the component that is referencing the controller service
      Returns:
      the ControllerService for the specified identifier. If a corresponding service cannot be found, null is returned. If this NiFi is clustered, the only services available will be those those availability is NCM only
    • saveActions

      void saveActions(NiFiWebRequestContext requestContext, Collection<ConfigurationAction> actions)
      Provides a mechanism for custom UIs to save actions to appear in NiFi configuration history. Note all fields within each Action must be populated. Null values will result in a failure to insert the audit record. Since the saving to these actions is separate from the actual configuration change, a failure to insert here will just generate a warning log message. The recording of these actions typically happens after a configuration change is applied. Since those changes have already been applied to the flow, we cannot revert them because of a failure to insert an audit record.
      Parameters:
      requestContext - context of the request
      actions - to save
      Throws:
      IllegalArgumentException - When the requestContext isn't fully populated or isn't appropriate for the given request
    • getCurrentUserIdentity

      String getCurrentUserIdentity()
      Returns:
      the current user identity. The value may be a DN, an email, a username, or any string that identities the user. Returns null if no user is found
    • updateComponent

      Sets the annotation data for the underlying component.
      Parameters:
      configurationContext - config context
      annotationData - the data
      properties - component properties
      Returns:
      the configuration for the underlying component
      Throws:
      ResourceNotFoundException - if the underlying component does not exit
      InvalidRevisionException - if a revision other than the current revision is given
      ClusterRequestException - if the annotation data was unable to be set for the underlying component. This exception will only be thrown when operating in a cluster.
      IllegalArgumentException - When the requestContext isn't fully populated or isn't appropriate for the given request
    • getComponentDetails

      Gets the details for the underlying component (including configuration, validation errors, and annotation data).
      Parameters:
      requestContext - context of request
      Returns:
      the configuration for the underlying component
      Throws:
      ResourceNotFoundException - if the underlying component does not exit
      ClusterRequestException - if the underlying component was unable to be retrieved from the cluster. This exception will only be thrown when operating in a cluster.
      IllegalArgumentException - When the requestContext isn't fully populated or isn't appropriate for the given request