Hi,
in GeoServer nowadays we have a number of extension points: output formats, part of the security subsystem, GUI pages and so on.
The system is purely additive, with priorities: one can add new
items, and in cases in which only the first extension out of a list
is picked, use the ExtensionPriority to make sure an extension gets
the upper hand over another one.
However, there is no way to remove an extension without removing
the jar in which it's stored. This is quite a bit limiting, consider
for example the output formats, it would be nice to have in the
GUI a configuration panel listing the available ones and allowing
the admin to decide which one to keep active, and which ones to remove.
Also, in general, one might want to remove a wicket page without
removing the whole module, for example, one might want to just remove
the demo requests page without giving up the preview one.
Given all extensions are grabbed using the
GeoServerExtensions.extensions(class)
method, I would propose a pluggable filtering mechanism allowing
for extension filtering (of course the extension filters would
not be black-listable to avoid a recursive situation).
The interface could look like:
ExtensionFilter {
boolean isBlacklisted(Object extension);
}
if we just want to allow removal,
or it could look like:
ExtensionFilter {
Object filter(Object extension)
}
if we want to allow both removal and, for any reason, wrapping
(return null if you want to remove).
GeoServerExtensions would lookup in the spring context the
ExtensionFilter objects and use them to filter out what is
being returned by GeoServerExtensions.extensions(class).
Thoughts?
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.