Hello, I see thank you very much.
Federico Federico Rullo _________________________________________________________________ GFT Italia S.r.l. Via A. Rimassa, 51/2 16129 Genova, Italy T +39 010 583158 F +39 010 8680479 [email protected] www.gft.com/it<http://www.gft.com/it> https://blog.gft.com https://www.linkedin.com/company/gft-group/ www.twitter.com/gft_it <http://www.twitter.com/gft_it> [cid:ActoForTheFuture_GFT@1,2x_68f73108-d76e-4497-aa5c-ff8a5693ce57.png]<https://www.gft.com/it/it/index/societa/stampa/press-releases/2021/sostenibilita-e-innovazione-sociale--gft-lancia-il-greencoding-e-in-italia-act-for-the-future/> Registered office: GFT Italia S.r.l., Via Sile 18, 20139 Milan (Italy) VAT Code and number of registration with the Companies' Register of Milan: 00819200478 Corporate capital: Euro 1,000,000 fully paid-in Company subject to the direction and coordination activity of GFT Technologies SE Ai sensi del Regolamento UE 2016/679 (GDPR) e delle Linee Guida per posta elettronica ed Internet del Garante Privacy si rende noto che le informazioni contenute nella presente comunicazione e i relativi allegati possono essere riservate e sono, comunque, destinate esclusivamente alle persone o alla Società sopraindicati. Le stesse non sono da considerarsi comunicazioni personali, quindi eventuali risposte potranno essere conosciute da persone appartenenti all'azienda. In accordance with Regulation EU 2016/679 (General Data Protection Regulation) and Guidelines Applying to the Use of E-Mails and the Internet in the Employment Context of Italian Data Protection Authority it is announced that the information in this communication (which includes any documents with it) is confidential and meant only for above-mentioned persons and/or Companies; the information is not personal therefore, It is intended for the addressee only and any replies will be known by people belonging to the company. _________________________________________________________________ From: Philipp Zehnder <[email protected]> Sent: martedì 31 agosto 2021 10:52 To: [email protected] Subject: Re: Extending Enum in Process [EXTERNAL EMAIL] This email originated from outside of the organization or was sent unauthenticated. Do not click links or open attachments unless you confirm the sender and know the content is safe. Hi Federico, It should be possible to directly extend the class with a new enum. E.g.: public enum CodeLanguage { Javascript("..."), TypeScript("..."); Is this what you are looking for? In the declareModel it is also possible to provide a custom code skeleton: .requiredCodeblock(Labels.withId(JSON_CONFIGURATION), CodeLanguage.Javascript, defaultSkeleton) I used this in the BooleanToStatController [1], where I wanted that the user provides a json object instead of a javascript function. Philipp [1] https://github.com/apache/incubator-streampipes-extensions/blob/dev/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/booloperator/state/BooleanToStateController.java<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fincubator-streampipes-extensions%2Fblob%2Fdev%2Fstreampipes-processors-transformation-jvm%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fstreampipes%2Fprocessors%2Ftransformation%2Fjvm%2Fprocessor%2Fbooloperator%2Fstate%2FBooleanToStateController.java&data=04%7C01%7CFederico.Rullo%40gft.com%7C82b8924e50c845531d6108d96c5c9ded%7C55a2bc67aec14ad29a9c5b2457b91dcd%7C0%7C0%7C637659967315747084%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NCuqMGdDTn8YUBJXxD%2FHuK8XEufCC970JzkCK0DKVdw%3D&reserved=0> On 31. Aug 2021, at 10:41, Rullo, Federico <[email protected]<mailto:[email protected]>> wrote: Hello, I am currently developing a processor and I wanted to extend the CodeLanguage class to add a new language to it, do you have any advice on how to do it, since I know that extending enums is not possible or really hard in Java. Thank you in advance, Federico. Federico Rullo _________________________________________________________________ GFT Italia S.r.l. Via A. Rimassa, 51/2 16129 Genova, Italy T +39 010 583158 F +39 010 8680479 [email protected]<mailto:[email protected]> www.gft.com/it<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.gft.com%2Fit&data=04%7C01%7CFederico.Rullo%40gft.com%7C82b8924e50c845531d6108d96c5c9ded%7C55a2bc67aec14ad29a9c5b2457b91dcd%7C0%7C0%7C637659967315747084%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=pFD2NFbHufYd%2Fj%2FHcdgvBIgXH9k8SCBcVwzAaF79wOI%3D&reserved=0> https://blog.gft.com<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fblog.gft.com%2F&data=04%7C01%7CFederico.Rullo%40gft.com%7C82b8924e50c845531d6108d96c5c9ded%7C55a2bc67aec14ad29a9c5b2457b91dcd%7C0%7C0%7C637659967315757044%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2FPHZH422bN62eSCdUXD3%2Fl8OMBUuZud7qHU0mBr%2FEf4%3D&reserved=0> https://www.linkedin.com/company/gft-group/<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fgft-group%2F&data=04%7C01%7CFederico.Rullo%40gft.com%7C82b8924e50c845531d6108d96c5c9ded%7C55a2bc67aec14ad29a9c5b2457b91dcd%7C0%7C0%7C637659967315757044%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=PYjKnjg%2Fi7PdJY9%2BQ%2F2BEFyGJ8nvSPQcy3jPxiLo5i0%3D&reserved=0> www.twitter.com/gft_it <https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.twitter.com%2Fgft_it&data=04%7C01%7CFederico.Rullo%40gft.com%7C82b8924e50c845531d6108d96c5c9ded%7C55a2bc67aec14ad29a9c5b2457b91dcd%7C0%7C0%7C637659967315757044%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=MjP1e5QoH51bD2lMP3vzYo0Ex4WKsjX4aBKxC%2BJuEx8%3D&reserved=0> <ActoForTheFuture_GFT@1,2x_68f73108-d76e-4497-aa5c-ff8a5693ce57.png><https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.gft.com%2Fit%2Fit%2Findex%2Fsocieta%2Fstampa%2Fpress-releases%2F2021%2Fsostenibilita-e-innovazione-sociale--gft-lancia-il-greencoding-e-in-italia-act-for-the-future%2F&data=04%7C01%7CFederico.Rullo%40gft.com%7C82b8924e50c845531d6108d96c5c9ded%7C55a2bc67aec14ad29a9c5b2457b91dcd%7C0%7C0%7C637659967315766999%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=91WuRcCRzlerQfXIi%2B7PN121V1kTEaRVcyotkR8nEvI%3D&reserved=0> Registered office: GFT Italia S.r.l., Via Sile 18, 20139 Milan (Italy) VAT Code and number of registration with the Companies' Register of Milan: 00819200478 Corporate capital: Euro 1,000,000 fully paid-in Company subject to the direction and coordination activity of GFT Technologies SE Ai sensi del Regolamento UE 2016/679 (GDPR) e delle Linee Guida per posta elettronica ed Internet del Garante Privacy si rende noto che le informazioni contenute nella presente comunicazione e i relativi allegati possono essere riservate e sono, comunque, destinate esclusivamente alle persone o alla Società sopraindicati. Le stesse non sono da considerarsi comunicazioni personali, quindi eventuali risposte potranno essere conosciute da persone appartenenti all'azienda. In accordance with Regulation EU 2016/679 (General Data Protection Regulation) and Guidelines Applying to the Use of E-Mails and the Internet in the Employment Context of Italian Data Protection Authority it is announced that the information in this communication (which includes any documents with it) is confidential and meant only for above-mentioned persons and/or Companies; the information is not personal therefore, It is intended for the addressee only and any replies will be known by people belonging to the company. _________________________________________________________________
