public static final class PropertyDescriptor.Builder extends Object
Modifier and Type | Field and Description |
---|---|
private List<AllowableValue> |
allowableValues |
private Class<? extends ControllerService> |
controllerServiceDefinition |
private String |
defaultValue |
private String |
description |
private String |
displayName |
private boolean |
dynamic |
private boolean |
dynamicallyModifiesClasspath |
private ExpressionLanguageScope |
expressionLanguageScope |
private boolean |
expressionLanguageSupported
Deprecated.
|
private String |
name |
private boolean |
required |
private boolean |
sensitive |
private List<Validator> |
validators |
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
PropertyDescriptor.Builder |
addValidator(Validator validator) |
PropertyDescriptor.Builder |
allowableValues(AllowableValue... values)
Sets the Allowable Values for this Property
|
<E extends Enum<E>> |
allowableValues(E[] values) |
PropertyDescriptor.Builder |
allowableValues(Set<String> values) |
PropertyDescriptor.Builder |
allowableValues(String... values) |
PropertyDescriptor |
build() |
PropertyDescriptor.Builder |
defaultValue(String value)
Specifies the initial value and the default value that will be used
if the user does not specify a value.
|
PropertyDescriptor.Builder |
description(String description) |
PropertyDescriptor.Builder |
displayName(String displayName)
Sets a unique id for the property.
|
PropertyDescriptor.Builder |
dynamic(boolean dynamic) |
PropertyDescriptor.Builder |
dynamicallyModifiesClasspath(boolean dynamicallyModifiesClasspath)
Specifies that the value of this property represents one or more resources that the
framework should add to the classpath of as well as consider when looking for native
libraries for the given component.
|
PropertyDescriptor.Builder |
expressionLanguageSupported(boolean supported)
Deprecated.
|
PropertyDescriptor.Builder |
expressionLanguageSupported(ExpressionLanguageScope expressionLanguageScope)
Sets the scope of the expression language evaluation
|
PropertyDescriptor.Builder |
fromPropertyDescriptor(PropertyDescriptor specDescriptor) |
PropertyDescriptor.Builder |
identifiesControllerService(Class<? extends ControllerService> controllerServiceDefinition)
Specifies that this property provides the identifier of a Controller
Service that implements the given interface
|
private boolean |
isValueAllowed(String value) |
PropertyDescriptor.Builder |
name(String name)
Sets the property name.
|
PropertyDescriptor.Builder |
required(boolean required) |
PropertyDescriptor.Builder |
sensitive(boolean sensitive) |
private String displayName
private String name
private String description
private String defaultValue
private List<AllowableValue> allowableValues
private boolean required
private boolean sensitive
@Deprecated private boolean expressionLanguageSupported
private ExpressionLanguageScope expressionLanguageScope
private boolean dynamic
private boolean dynamicallyModifiesClasspath
private Class<? extends ControllerService> controllerServiceDefinition
public PropertyDescriptor.Builder fromPropertyDescriptor(PropertyDescriptor specDescriptor)
public PropertyDescriptor.Builder displayName(String displayName)
displayName
- of the propertypublic PropertyDescriptor.Builder name(String name)
name
- of the property@Deprecated public PropertyDescriptor.Builder expressionLanguageSupported(boolean supported)
supported
- true if yes; false otherwisepublic PropertyDescriptor.Builder expressionLanguageSupported(ExpressionLanguageScope expressionLanguageScope)
expressionLanguageScope
- scope of the expression language evaluationpublic PropertyDescriptor.Builder description(String description)
description
- of the propertypublic PropertyDescriptor.Builder defaultValue(String value)
build()
is
called, if Allowable Values have been set (see
allowableValues(AllowableValue...)
) and this value is not
one of those Allowable Values and Exception will be thrown. If the
Allowable Values have been set using the
allowableValues(AllowableValue...)
method, the default value
should be set to the "Value" of the AllowableValue
object
(see AllowableValue.getValue()
).value
- default valuepublic PropertyDescriptor.Builder dynamic(boolean dynamic)
public PropertyDescriptor.Builder dynamicallyModifiesClasspath(boolean dynamicallyModifiesClasspath)
Class.forName(String, boolean, ClassLoader)
for example).dynamicallyModifiesClasspath
- whether or not this property should be used by the framework to modify the classpathpublic PropertyDescriptor.Builder allowableValues(Set<String> values)
values
- contrained set of valuespublic <E extends Enum<E>> PropertyDescriptor.Builder allowableValues(E[] values)
public PropertyDescriptor.Builder allowableValues(String... values)
values
- constrained set of valuespublic PropertyDescriptor.Builder allowableValues(AllowableValue... values)
values
- contrained set of valuespublic PropertyDescriptor.Builder required(boolean required)
required
- true if yes; false otherwisepublic PropertyDescriptor.Builder sensitive(boolean sensitive)
sensitive
- true if sensitive; false otherwisepublic PropertyDescriptor.Builder addValidator(Validator validator)
validator
- for the propertypublic PropertyDescriptor.Builder identifiesControllerService(Class<? extends ControllerService> controllerServiceDefinition)
controllerServiceDefinition
- the interface that is implemented
by the Controller Serviceprivate boolean isValueAllowed(String value)
public PropertyDescriptor build()
IllegalStateException
- if allowable values are configured but
no default value is set, or the default value is not contained within
the allowable values.Copyright © 2020 Apache NiFi Project. All rights reserved.