Lehel Boér created NIFI-9936:
--------------------------------

             Summary: Add more support to use enums as AllowableValues in 
PropertyDescriptors
                 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


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