felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject [WebConsoel] ConfigurationPrinter service
Date Wed, 13 Oct 2010 20:39:40 GMT
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).



View raw message