@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, initializeequals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateprotected volatile ScriptingComponentHelper scriptingComponentHelper
protected java.util.List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentprotected PropertyDescriptor getSupportedDynamicPropertyDescriptor(java.lang.String propertyDescriptorName)
getSupportedDynamicPropertyDescriptor in class AbstractConfigurableComponentpropertyDescriptorName - used to lookup if any property descriptors exist for that nameprotected java.util.Collection<ValidationResult> customValidate(ValidationContext validationContext)
AbstractConfigurableComponentcustomValidate in class AbstractConfigurableComponentvalidationContext - 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)
ReportingTaskcontext - reporting context