Package org.apache.nifi.util
Class MockReportingContext
java.lang.Object
org.apache.nifi.util.MockControllerServiceLookup
org.apache.nifi.util.MockReportingContext
- All Implemented Interfaces:
PropertyContext
,ControllerServiceLookup
,ReportingContext
public class MockReportingContext
extends MockControllerServiceLookup
implements ReportingContext, ControllerServiceLookup
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map
<String, ControllerServiceConfiguration> private final MockEventAccess
private final Map
<PropertyDescriptor, String> private final StateManager
-
Constructor Summary
ConstructorDescriptionMockReportingContext
(Map<String, ControllerService> controllerServices, StateManager stateManager) -
Method Summary
Modifier and TypeMethodDescriptioncreateBulletin
(String componentId, String category, Severity severity, String message) createBulletin
(String category, Severity severity, String message) getComponentBulletins
(String componentId) getProperty
(PropertyDescriptor property) boolean
void
setProperties
(Map<PropertyDescriptor, String> properties) void
setProperty
(String propertyName, String value) Methods inherited from class org.apache.nifi.util.MockControllerServiceLookup
addControllerService, addControllerService, addControllerServices, getConfiguration, getControllerService, getControllerServiceIdentifiers, getControllerServiceName, getControllerServices, getInputRequirement, isControllerServiceEnabled, isControllerServiceEnabled, isControllerServiceEnabling, removeControllerService
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.nifi.controller.ControllerServiceLookup
getControllerService, getControllerServiceIdentifiers, getControllerServiceName, isControllerServiceEnabled, isControllerServiceEnabled, isControllerServiceEnabling
Methods inherited from interface org.apache.nifi.reporting.ReportingContext
isAnalyticsEnabled
-
Field Details
-
controllerServices
-
eventAccess
-
properties
-
stateManager
-
componentBulletinsCreated
-
-
Constructor Details
-
MockReportingContext
public MockReportingContext(Map<String, ControllerService> controllerServices, StateManager stateManager)
-
-
Method Details
-
getProperties
- Specified by:
getProperties
in interfaceReportingContext
-
getAllProperties
- Specified by:
getAllProperties
in interfacePropertyContext
-
getProperty
- Specified by:
getProperty
in interfacePropertyContext
-
setProperty
-
setProperties
-
getEventAccess
- Specified by:
getEventAccess
in interfaceReportingContext
-
getBulletinRepository
- Specified by:
getBulletinRepository
in interfaceReportingContext
-
createBulletin
- Specified by:
createBulletin
in interfaceReportingContext
-
createBulletin
public Bulletin createBulletin(String componentId, String category, Severity severity, String message) - Specified by:
createBulletin
in interfaceReportingContext
-
getControllerServiceLookup
- Specified by:
getControllerServiceLookup
in interfaceReportingContext
-
getComponentBulletins
- Parameters:
componentId
- identifier of component to get bulletins for- Returns:
- all Bulletins that have been created for the component with the given ID
-
getStateManager
- Specified by:
getStateManager
in interfaceReportingContext
-
isClustered
public boolean isClustered()- Specified by:
isClustered
in interfaceReportingContext
-
getClusterNodeIdentifier
- Specified by:
getClusterNodeIdentifier
in interfaceReportingContext
-