public abstract class AbstractConfigurableComponent extends Object implements ConfigurableComponent
Constructor and Description |
---|
AbstractConfigurableComponent() |
Modifier and Type | Method and Description |
---|---|
protected Collection<ValidationResult> |
customValidate(ValidationContext validationContext)
Allows subclasses to perform their own validation on the already set
properties.
|
boolean |
equals(Object obj) |
private PropertyDescriptor |
getPropertyDescriptor(PropertyDescriptor specDescriptor) |
PropertyDescriptor |
getPropertyDescriptor(String descriptorName) |
List<PropertyDescriptor> |
getPropertyDescriptors()
Returns a
List of all PropertyDescriptor s that this
component supports. |
protected PropertyDescriptor |
getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
Used to allow subclasses to determine what PropertyDescriptor if any to
use when a property is requested for which a descriptor is not already
registered.
|
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors()
Allows subclasses to register which property descriptor objects are
supported.
|
int |
hashCode() |
void |
onPropertyModified(PropertyDescriptor descriptor,
String oldValue,
String newValue)
Hook method allowing subclasses to eagerly react to a configuration
change for the given property descriptor.
|
String |
toString() |
Collection<ValidationResult> |
validate(ValidationContext context)
Validates a set of properties, returning ValidationResults for any
invalid properties.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getIdentifier
protected Collection<ValidationResult> customValidate(ValidationContext validationContext)
validationContext
- provides a mechanism for obtaining externally
managed values, such as property values and supplies convenience methods
for operating on those valuespublic final PropertyDescriptor getPropertyDescriptor(String descriptorName)
getPropertyDescriptor
in interface ConfigurableComponent
descriptorName
- to lookup the descriptorprivate PropertyDescriptor getPropertyDescriptor(PropertyDescriptor specDescriptor)
public final Collection<ValidationResult> validate(ValidationContext context)
ConfigurableComponent
validate
in interface ConfigurableComponent
context
- of validationpublic void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue)
onPropertyModified
in interface ConfigurableComponent
descriptor
- of the modified propertyoldValue
- non-null property value (previous)newValue
- the new property value or if null indicates the property
was removedprotected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
Used to allow subclasses to determine what PropertyDescriptor if any to use when a property is requested for which a descriptor is not already registered. By default this method simply returns a null descriptor. By overriding this method processor implementations can support dynamic properties since this allows them to register properties on demand. It is acceptable for a dynamically generated property to indicate it is required so long as it is understood it is only required once set. Dynamic properties by definition cannot be required until used.
This method should be side effect free in the subclasses in terms of how often it is called for a given property name because there is guarantees how often it will be called for a given property name.
Default is null.
propertyDescriptorName
- used to lookup if any property descriptors exist for that nameprotected List<PropertyDescriptor> getSupportedPropertyDescriptors()
public final List<PropertyDescriptor> getPropertyDescriptors()
ConfigurableComponent
List
of all PropertyDescriptor
s that this
component supports.getPropertyDescriptors
in interface ConfigurableComponent
Copyright © 2018 Apache NiFi Project. All rights reserved.