Package org.apache.nifi.util
Class MockPropertyValue
java.lang.Object
org.apache.nifi.util.MockPropertyValue
- All Implemented Interfaces:
PropertyValue
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Boolean
private final ExpressionLanguageScope
private boolean
private final PropertyDescriptor
private final String
private final MockControllerServiceLookup
private final PropertyValue
-
Constructor Summary
ModifierConstructorDescriptionMockPropertyValue
(String rawValue) MockPropertyValue
(String rawValue, Map<String, String> environmentVariables) MockPropertyValue
(String rawValue, ControllerServiceLookup serviceLookup, Map<String, String> environmentVariables) protected
MockPropertyValue
(String rawValue, ControllerServiceLookup serviceLookup, PropertyDescriptor propertyDescriptor, boolean alreadyEvaluated, Map<String, String> environmentVariables) MockPropertyValue
(String rawValue, ControllerServiceLookup serviceLookup, PropertyDescriptor propertyDescriptor, Map<String, String> environmentVariables) -
Method Summary
Modifier and TypeMethodDescription<T extends ControllerService>
TasControllerService
(Class<T> serviceType) asDataSize
(DataUnit dataUnit) asDouble()
asFloat()
asLong()
asTimePeriod
(TimeUnit timeUnit) private void
evaluateAttributeExpressions
(Map<String, String> attributes) evaluateAttributeExpressions
(Map<String, String> attributes, AttributeValueDecorator decorator) evaluateAttributeExpressions
(FlowFile flowFile) evaluateAttributeExpressions
(FlowFile flowFile, Map<String, String> additionalAttributes) evaluateAttributeExpressions
(FlowFile flowFile, Map<String, String> additionalAttributes, AttributeValueDecorator decorator) evaluateAttributeExpressions
(FlowFile flowFile, Map<String, String> additionalAttributes, AttributeValueDecorator decorator, Map<String, String> stateValues) evaluateAttributeExpressions
(FlowFile flowFile, AttributeValueDecorator decorator) getValue()
boolean
boolean
isSet()
private void
toString()
private void
validateExpressionScope
(boolean attributesAvailable)
-
Field Details
-
rawValue
-
expectExpressions
-
expressionLanguageScope
-
serviceLookup
-
propertyDescriptor
-
stdPropValue
-
environmentVariables
-
expressionsEvaluated
private boolean expressionsEvaluated
-
-
Constructor Details
-
MockPropertyValue
-
MockPropertyValue
-
MockPropertyValue
public MockPropertyValue(String rawValue, ControllerServiceLookup serviceLookup, Map<String, String> environmentVariables) -
MockPropertyValue
public MockPropertyValue(String rawValue, ControllerServiceLookup serviceLookup, PropertyDescriptor propertyDescriptor, Map<String, String> environmentVariables) -
MockPropertyValue
protected MockPropertyValue(String rawValue, ControllerServiceLookup serviceLookup, PropertyDescriptor propertyDescriptor, boolean alreadyEvaluated, Map<String, String> environmentVariables)
-
-
Method Details
-
ensureExpressionsEvaluated
private void ensureExpressionsEvaluated() -
validateExpressionScope
private void validateExpressionScope(boolean attributesAvailable) -
getValue
- Specified by:
getValue
in interfacePropertyValue
-
asInteger
- Specified by:
asInteger
in interfacePropertyValue
-
asLong
- Specified by:
asLong
in interfacePropertyValue
-
asBoolean
- Specified by:
asBoolean
in interfacePropertyValue
-
asFloat
- Specified by:
asFloat
in interfacePropertyValue
-
asDouble
- Specified by:
asDouble
in interfacePropertyValue
-
asTimePeriod
- Specified by:
asTimePeriod
in interfacePropertyValue
-
asDuration
- Specified by:
asDuration
in interfacePropertyValue
-
asDataSize
- Specified by:
asDataSize
in interfacePropertyValue
-
markEvaluated
private void markEvaluated() -
evaluateAttributeExpressions
- Specified by:
evaluateAttributeExpressions
in interfacePropertyValue
- Throws:
ProcessException
-
evaluateAttributeExpressions
public PropertyValue evaluateAttributeExpressions(AttributeValueDecorator decorator) throws ProcessException - Specified by:
evaluateAttributeExpressions
in interfacePropertyValue
- Throws:
ProcessException
-
evaluateAttributeExpressions
- Specified by:
evaluateAttributeExpressions
in interfacePropertyValue
- Throws:
ProcessException
-
evaluateAttributeExpressions
public PropertyValue evaluateAttributeExpressions(FlowFile flowFile, AttributeValueDecorator decorator) throws ProcessException - Specified by:
evaluateAttributeExpressions
in interfacePropertyValue
- Throws:
ProcessException
-
evaluateAttributeExpressions
public PropertyValue evaluateAttributeExpressions(FlowFile flowFile, Map<String, String> additionalAttributes) throws ProcessException- Specified by:
evaluateAttributeExpressions
in interfacePropertyValue
- Throws:
ProcessException
-
evaluateAttributeExpressions
public PropertyValue evaluateAttributeExpressions(Map<String, String> attributes) throws ProcessException- Specified by:
evaluateAttributeExpressions
in interfacePropertyValue
- Throws:
ProcessException
-
evaluateAttributeExpressions
public PropertyValue evaluateAttributeExpressions(Map<String, String> attributes, AttributeValueDecorator decorator) throws ProcessException- Specified by:
evaluateAttributeExpressions
in interfacePropertyValue
- Throws:
ProcessException
-
evaluateAttributeExpressions
public PropertyValue evaluateAttributeExpressions(FlowFile flowFile, Map<String, String> additionalAttributes, AttributeValueDecorator decorator) throws ProcessException- Specified by:
evaluateAttributeExpressions
in interfacePropertyValue
- Throws:
ProcessException
-
evaluateAttributeExpressions
public PropertyValue evaluateAttributeExpressions(FlowFile flowFile, Map<String, String> additionalAttributes, AttributeValueDecorator decorator, Map<String, throws ProcessExceptionString> stateValues) - Specified by:
evaluateAttributeExpressions
in interfacePropertyValue
- Throws:
ProcessException
-
asControllerService
- Specified by:
asControllerService
in interfacePropertyValue
-
asControllerService
public <T extends ControllerService> T asControllerService(Class<T> serviceType) throws IllegalArgumentException - Specified by:
asControllerService
in interfacePropertyValue
- Throws:
IllegalArgumentException
-
asResource
- Specified by:
asResource
in interfacePropertyValue
-
asResources
- Specified by:
asResources
in interfacePropertyValue
-
isSet
public boolean isSet()- Specified by:
isSet
in interfacePropertyValue
-
toString
-
isExpressionLanguagePresent
public boolean isExpressionLanguagePresent()- Specified by:
isExpressionLanguagePresent
in interfacePropertyValue
-