Class MockReportingContext

java.lang.Object
org.apache.nifi.util.MockControllerServiceLookup
org.apache.nifi.util.MockReportingContext
All Implemented Interfaces:
org.apache.nifi.context.PropertyContext, org.apache.nifi.controller.ControllerServiceLookup, org.apache.nifi.reporting.ReportingContext

public class MockReportingContext extends MockControllerServiceLookup implements org.apache.nifi.reporting.ReportingContext, org.apache.nifi.controller.ControllerServiceLookup
  • Field Details

    • controllerServices

      private final Map<String,ControllerServiceConfiguration> controllerServices
    • eventAccess

      private final MockEventAccess eventAccess
    • properties

      private final Map<org.apache.nifi.components.PropertyDescriptor,String> properties
    • stateManager

      private final org.apache.nifi.components.state.StateManager stateManager
    • componentBulletinsCreated

      private final Map<String,List<org.apache.nifi.reporting.Bulletin>> componentBulletinsCreated
  • Constructor Details

    • MockReportingContext

      public MockReportingContext(Map<String,org.apache.nifi.controller.ControllerService> controllerServices, org.apache.nifi.components.state.StateManager stateManager)
  • Method Details

    • getProperties

      public Map<org.apache.nifi.components.PropertyDescriptor,String> getProperties()
      Specified by:
      getProperties in interface org.apache.nifi.reporting.ReportingContext
    • getAllProperties

      public Map<String,String> getAllProperties()
      Specified by:
      getAllProperties in interface org.apache.nifi.context.PropertyContext
    • getProperty

      public org.apache.nifi.components.PropertyValue getProperty(org.apache.nifi.components.PropertyDescriptor property)
      Specified by:
      getProperty in interface org.apache.nifi.context.PropertyContext
    • setProperty

      public void setProperty(String propertyName, String value)
    • setProperties

      public void setProperties(Map<org.apache.nifi.components.PropertyDescriptor,String> properties)
    • getEventAccess

      public MockEventAccess getEventAccess()
      Specified by:
      getEventAccess in interface org.apache.nifi.reporting.ReportingContext
    • getBulletinRepository

      public org.apache.nifi.reporting.BulletinRepository getBulletinRepository()
      Specified by:
      getBulletinRepository in interface org.apache.nifi.reporting.ReportingContext
    • createBulletin

      public org.apache.nifi.reporting.Bulletin createBulletin(String category, org.apache.nifi.reporting.Severity severity, String message)
      Specified by:
      createBulletin in interface org.apache.nifi.reporting.ReportingContext
    • createBulletin

      public org.apache.nifi.reporting.Bulletin createBulletin(String componentId, String category, org.apache.nifi.reporting.Severity severity, String message)
      Specified by:
      createBulletin in interface org.apache.nifi.reporting.ReportingContext
    • getControllerServiceLookup

      public org.apache.nifi.controller.ControllerServiceLookup getControllerServiceLookup()
      Specified by:
      getControllerServiceLookup in interface org.apache.nifi.reporting.ReportingContext
    • getComponentBulletins

      public List<org.apache.nifi.reporting.Bulletin> getComponentBulletins(String componentId)
      Parameters:
      componentId - identifier of component to get bulletins for
      Returns:
      all Bulletins that have been created for the component with the given ID
    • getStateManager

      public org.apache.nifi.components.state.StateManager getStateManager()
      Specified by:
      getStateManager in interface org.apache.nifi.reporting.ReportingContext
    • isClustered

      public boolean isClustered()
      Specified by:
      isClustered in interface org.apache.nifi.reporting.ReportingContext
    • getClusterNodeIdentifier

      public String getClusterNodeIdentifier()
      Specified by:
      getClusterNodeIdentifier in interface org.apache.nifi.reporting.ReportingContext