You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/04/25 11:53:40 UTC

[GitHub] [nifi] Lehel44 commented on pull request #5977: NIFI-9936: Added enum support in PropertyDescriptor Builder for Allow…

Lehel44 commented on PR #5977:
URL: https://github.com/apache/nifi/pull/5977#issuecomment-1108474060

   @nandorsoma @exceptionfactory @tpalfy 
   Thanks for the comments. I went over reommended interface names. The PropertyValue already exists so I went with the DescribedValue. I added the getValue() method to the interface, it can be overriden for the enum whole class.
   
   `public enum EnumAllowableValue implements DescribedValue {
   
       GREEN {
           @Override
           public String getDisplayName() {
               return "GreenDisplayName";
           }
   
           @Override
           public String getDescription() {
               return "GreenDescription";
           }
       },
   
       RED {
           @Override
           public String getDisplayName() {
               return "RedDisplayName";
           }
   
           @Override
           public String getDescription() {
               return "RedDescription";
           }
       };
   
       @Override
       public String getValue() {
           return name();
       }
   }` 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org