public interface PropertyValue
A PropertyValue provides a mechanism whereby the currently configured value of a processor property can be obtained in different forms.
Modifier and Type | Method and Description |
---|---|
Boolean |
asBoolean() |
ControllerService |
asControllerService() |
<T extends ControllerService> |
asControllerService(Class<T> serviceType) |
Double |
asDataSize(DataUnit dataUnit) |
Double |
asDouble() |
Float |
asFloat() |
Integer |
asInteger() |
Long |
asLong() |
Long |
asTimePeriod(TimeUnit timeUnit) |
PropertyValue |
evaluateAttributeExpressions()
Replaces values in the Property Value using the Attribute Expression
Language; a PropertyValue with the new value is then returned, supporting
call chaining.
|
PropertyValue |
evaluateAttributeExpressions(AttributeValueDecorator decorator)
Replaces values in the Property Value using the Attribute Expression
Language.
|
PropertyValue |
evaluateAttributeExpressions(FlowFile flowFile)
Replaces values in the Property Value using the Attribute Expression
Language; a PropertyValue with the new value is then returned, supporting
call chaining.
|
PropertyValue |
evaluateAttributeExpressions(FlowFile flowFile,
AttributeValueDecorator decorator)
Replaces values in the Property Value using the Attribute Expression
Language.
|
String |
getValue() |
boolean |
isSet() |
String getValue()
Integer asInteger()
null
if not setNumberFormatException
- if not able to parseLong asLong()
null
if not setNumberFormatException
- if not able to parseBoolean asBoolean()
null
if not setFloat asFloat()
null
if not setNumberFormatException
- if not able to parseDouble asDouble()
null
if not setNumberFormatException
- if not able to parseLong asTimePeriod(TimeUnit timeUnit)
timeUnit
- specifies the TimeUnit to convert the time duration intonull
Double asDataSize(DataUnit dataUnit)
dataUnit
- specifies the DataUnit to convert the data size intonull
ControllerService asControllerService()
this
, or null
if either the value is not set or
the value does not identify a ControllerService<T extends ControllerService> T asControllerService(Class<T> serviceType) throws IllegalArgumentException
T
- the generic type of the controller serviceserviceType
- the class of the Controller Servicethis
, or null
if either the value is not set or
the value does not identify a ControllerService. The object returned by
this method is explicitly cast to type specified, if the type specified
is valid. Otherwise, throws an IllegalArgumentExceptionIllegalArgumentException
- if the value of this
points
to a ControllerService but that service is not of type
serviceType
or if serviceType
references a
class that is not an interfaceboolean isSet()
true
if the user has configured a value, or if the
PropertyDescriptor
for the associated property has a default
value, false
otherwisePropertyValue evaluateAttributeExpressions() throws ProcessException
Replaces values in the Property Value using the Attribute Expression Language; a PropertyValue with the new value is then returned, supporting call chaining.
ProcessException
- if the Query cannot be compiled or evaluating
the query against the given attributes causes an Exception to be thrownPropertyValue evaluateAttributeExpressions(FlowFile flowFile) throws ProcessException
Replaces values in the Property Value using the Attribute Expression Language; a PropertyValue with the new value is then returned, supporting call chaining.
flowFile
- to evaluate attributes ofProcessException
- if the Query cannot be compiled or evaluating
the query against the given attributes causes an Exception to be thrownPropertyValue evaluateAttributeExpressions(AttributeValueDecorator decorator) throws ProcessException
Replaces values in the Property Value using the Attribute Expression Language. The supplied decorator is then given a chance to decorate the value, and a PropertyValue with the new value is then returned, supporting call chaining.
decorator
- The supplied decorator is then given a chance to
decorate the valueProcessException
- if the Query cannot be compiled or evaluating
the query against the given attributes causes an Exception to be thrownPropertyValue evaluateAttributeExpressions(FlowFile flowFile, AttributeValueDecorator decorator) throws ProcessException
Replaces values in the Property Value using the Attribute Expression Language. The supplied decorator is then given a chance to decorate the value, and a PropertyValue with the new value is then returned, supporting call chaining.
flowFile
- to evaluate expressions againstdecorator
- The supplied decorator is then given a chance to
decorate the valueProcessException
- if the Query cannot be compiled or evaluating
the query against the given attributes causes an Exception to be thrownCopyright © 2015 Apache NiFi(incubating) Project. All rights reserved.