Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-9936

Add support to use enums as AllowableValues in PropertyDescriptors with displayName and description

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.17.0
    • None

    Description

      With the current PropertyDescriptor builder implementation we can only use enum names.

       

      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;
      } 

      We should add an option to be able to pass an enum class as allowableValues to the builder with displayName and description as well.

       

      Attachments

        Issue Links

          Activity

            People

              Lehel44 Lehel Boér
              Lehel44 Lehel Boér
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h