I’m engaged on a undertaking primarily based on the Java EE expertise. First I would prefer to inform you what I wish to obtain, then what I already tried.
Think about two forms of configurations, which you wish to select and edit/outline within the JEE utility by way of GUI entries.
Config A is for the communication with System A
and Config B is for the communication with System B.
Config A obtained a couple of properties equal to Config B, however the properties itself differ indirectly (instance: enumerations). Moreover Config A and B every obtained extra properties which they do not have in widespread. Now, if the applying person enters one configuration(A or B) it ought to be potential to entry in a common and straightforward manner all given strategies/properties of the configurations, with out all the time asking which sort of configuration was picked. How can one entry particularly the properties/strategies that differ, in a simple and never redundant manner?
As a result of I attempt to cut back redundant code I created an summary class defining a common configuration, let’s name it “GeneralConfiguration“.
Config A and B every lengthen GeneralConfiguration. For every “shared” property GeneralConfiguration defines an interface. Every interface obtained carried out by completely different enums, which signify the potential entries for the final configuration relying on the config sort (A or B).
I believe my setup will not be optimum. So what do you suppose, how one can deal with this type of process?