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 |
expressionLanguageSupported |
private String |
name |
private boolean |
required |
private boolean |
sensitive |
private List<Validator> |
validators |
Constructor and Description |
---|
PropertyDescriptor.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 |
expressionLanguageSupported(boolean supported)
Sets the value indicating whether or not this Property will support
the Attribute Expression Language.
|
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
private boolean expressionLanguageSupported
private boolean dynamic
private Class<? extends ControllerService> controllerServiceDefinition
public PropertyDescriptor.Builder fromPropertyDescriptor(PropertyDescriptor specDescriptor)
public PropertyDescriptor.Builder displayName(String displayName)
displayName
- public PropertyDescriptor.Builder name(String name)
name
- public PropertyDescriptor.Builder expressionLanguageSupported(boolean supported)
supported
- public PropertyDescriptor.Builder description(String description)
description
- public 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
- public PropertyDescriptor.Builder dynamic(boolean dynamic)
public PropertyDescriptor.Builder allowableValues(Set<String> values)
values
- public <E extends Enum<E>> PropertyDescriptor.Builder allowableValues(E[] values)
public PropertyDescriptor.Builder allowableValues(String... values)
values
- public PropertyDescriptor.Builder allowableValues(AllowableValue... values)
values
- public PropertyDescriptor.Builder required(boolean required)
required
- public PropertyDescriptor.Builder sensitive(boolean sensitive)
sensitive
- public PropertyDescriptor.Builder addValidator(Validator validator)
validator
- public 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 © 2015 Apache NiFi (incubating). All rights reserved.