[ 
https://issues.apache.org/jira/browse/NIFI-9936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17529479#comment-17529479
 ] 

ASF subversion and git services commented on NIFI-9936:
-------------------------------------------------------

Commit a97c20cdb23fb124e8559a7392279500e7515530 in nifi's branch 
refs/heads/main from Lehel
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=a97c20cdb2 ]

NIFI-9936 Added DescribedValue in PropertyDescriptor Builder for AllowableValues

This closes #5977

Signed-off-by: David Handermann <[email protected]>


> 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
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> 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)

Reply via email to