mirror of https://github.com/apache/nifi.git
NIFI-1573 Allow programmatic access to a Processor's name
This commit is contained in:
parent
58e50ae39d
commit
738236a41d
|
@ -160,4 +160,9 @@ public interface ProcessContext {
|
|||
* @return the StateManager that can be used to store and retrieve state for this component
|
||||
*/
|
||||
StateManager getStateManager();
|
||||
|
||||
/**
|
||||
* @return the configured name of this processor
|
||||
*/
|
||||
String getName();
|
||||
}
|
||||
|
|
|
@ -355,4 +355,9 @@ public class MockProcessContext extends MockControllerServiceLookup implements S
|
|||
public StateManager getStateManager() {
|
||||
return stateManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,4 +108,9 @@ public class MockProcessContext implements ProcessContext {
|
|||
public StateManager getStateManager() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -243,4 +243,9 @@ public class ConnectableProcessContext implements ProcessContext {
|
|||
public StateManager getStateManager() {
|
||||
return stateManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return connectable.getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -216,4 +216,9 @@ public class StandardProcessContext implements ProcessContext, ControllerService
|
|||
public StateManager getStateManager() {
|
||||
return stateManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return procNode.getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,4 +147,9 @@ public class StandardSchedulingContext implements SchedulingContext {
|
|||
public StateManager getStateManager() {
|
||||
return stateManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return processorNode.getName();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue