@Tags(value={"reporting","script","execute","groovy","python","jython","jruby","ruby","javascript","js","lua","luaj"}) @CapabilityDescription(value="Provides reporting and status information to a script. ReportingContext, ComponentLog, and VirtualMachineMetrics objects are made available as variables (context, log, and vmMetrics, respectively) to the script for further processing. The context makes various information available such as events, provenance, bulletins, controller services, process groups, Java Virtual Machine metrics, etc.") @DynamicProperty(name="A script engine property to update", value="The value to set it to", supportsExpressionLanguage=true, description="Updates a script engine property specified by the Dynamic Property\'s key with the value specified by the Dynamic Property\'s value") @Restricted(value="Provides operator the ability to execute arbitrary code assuming all permissions that NiFi has.") public class ScriptedReportingTask extends AbstractReportingTask
Modifier and Type | Field and Description |
---|---|
protected ScriptingComponentHelper |
scriptingComponentHelper |
Constructor and Description |
---|
ScriptedReportingTask() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Collection<ValidationResult> |
customValidate(ValidationContext validationContext)
Allows subclasses to perform their own validation on the already set
properties.
|
protected PropertyDescriptor |
getSupportedDynamicPropertyDescriptor(java.lang.String propertyDescriptorName)
Returns a PropertyDescriptor for the given name.
|
protected java.util.List<PropertyDescriptor> |
getSupportedPropertyDescriptors()
Returns a list of property descriptors supported by this processor.
|
void |
onTrigger(ReportingContext context)
This method is called on a scheduled interval to allow the Reporting Task
to perform its tasks.
|
void |
setup(ConfigurationContext context)
Performs setup operations when the processor is scheduled to run.
|
getControllerServiceLookup, getIdentifier, getLogger, getName, getSchedulingPeriod, init, initialize
equals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, toString, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
protected volatile ScriptingComponentHelper scriptingComponentHelper
protected java.util.List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class AbstractConfigurableComponent
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(java.lang.String propertyDescriptorName)
getSupportedDynamicPropertyDescriptor
in class AbstractConfigurableComponent
propertyDescriptorName
- used to lookup if any property descriptors exist for that nameprotected java.util.Collection<ValidationResult> customValidate(ValidationContext validationContext)
AbstractConfigurableComponent
customValidate
in class AbstractConfigurableComponent
validationContext
- provides a mechanism for obtaining externally
managed values, such as property values and supplies convenience methods
for operating on those values@OnScheduled public void setup(ConfigurationContext context)
context
- the context in which to perform the setup operationspublic void onTrigger(ReportingContext context)
ReportingTask
context
- reporting context