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 |
---|
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
- of the propertypublic PropertyDescriptor.Builder name(String name)
name
- of the propertypublic PropertyDescriptor.Builder expressionLanguageSupported(boolean supported)
supported
- true if yes; false otherwisepublic 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 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 © 2015 Apache NiFi Project. All rights reserved.