Felix Meschberger wrote > Hi all, > > FELIX-2649 introduced the facility to register a service as a > ConfigurationPrinter for the web console without actually implementing > the interface but merely being registered with a number of required > registration properties and implementing one of the ConfigurationPrinter > or ModeAwareConfigurationPrinter methods. > > The problem now is, that FELIX-2649 introduced a new property allowing > the definition of the configuration printer modes located in the > WebConsoleConstants class. So we now have two situations: A > ConfigurationPrinter service (implementing the interface) has to > register the supported modes in a different registration property than a > ConfigurationPrinter not implementing the ConfigurationPrinter interface. > > I think this inconsistency is bad and error-prone. > > IMHO we should drop the newly introduced property > (WebConsoleConstants.CONFIG_PRINTER_MODES) and only use the old property > ConfigurationPrinter.PROPERTY_MODES. Alternatively we might define the > WebConsoleConstants.CONFIG_PRINTER_MODES to the same value as the > ConfigurationPrinter.PROPERTY_MODES constant. > > Or we really mark the old ConfigurationPrinter.PROPERTY_MODES constant > deprecated and primarily use the new > WebConsoleConstants.CONFIG_PRINTER_MODES in all cases and only falling > back to the old property if a ConfigurationPrinter implementation does > not have the new property (to support existing implementations). > Thanks for bringing this up Felix - it was actually on my todo list, but I forgot about it.
The new property is used to detect configuration printers not implementing the interfaces - the name is more unique than the old value (which is just "modes"). I think the mistake is that we used this short name for the property in the first place. Therefore I think we should deprecate the old value and use the new one (falling back to the old prop if new is missing). Carsten -- Carsten Ziegeler [email protected]
