You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Lehel Boér (Jira)" <ji...@apache.org> on 2022/04/19 16:34:00 UTC
[jira] [Updated] (NIFI-9936) Add support to use enums as AllowableValues in PropertyDescriptors with displayName and description
[ https://issues.apache.org/jira/browse/NIFI-9936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lehel Boér updated NIFI-9936:
-----------------------------
Summary: Add support to use enums as AllowableValues in PropertyDescriptors with displayName and description (was: Add more support to use enums as AllowableValues in PropertyDescriptors)
> Add support to use enums as AllowableValues in PropertyDescriptors with displayName and description
> ---------------------------------------------------------------------------------------------------
>
> Key: NIFI-9936
> URL: https://issues.apache.org/jira/browse/NIFI-9936
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Lehel Boér
> Assignee: Lehel Boér
> Priority: Minor
> Labels: nifi
>
> With the current _PropertyDescriptor_ _builder_ implementation we can only use _enum_ names.
>
> {code:java}
> public <E extends Enum<E>> Builder allowableValues(final E[] values) {
> if (null != values) {
> this.allowableValues = new ArrayList<>();
> for (final E value : values) {
> allowableValues.add(new AllowableValue(value.name(), value.name()));
> }
> }
> return this;
> } {code}
> We should add an option to be able to pass an enum class as _allowableValues_ to the _builder_ with _displayName_ and _description_ as well.
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)