Hi,
I'm writing to propose a mechanism to blacklist extensions
in the GeoServer Spring context.
Current we have, in various parts of the codebase, code
that looks up for specific extension point implementors
by using GeoServerExtensions.xxx
The mechanism makes it easy to add another extension
implementor, just declare it in the Spring context,
drop in a new jar, voilà.
But what if someone wants to disable an extension point
instead, say, disable a core output format or a core
store?
At the moment there is no way. We need an extension
point to break other extension points! Ha!
What about:
ExtensionFilter {
boolean accept(String beanId, Object extension);
}
This should allow to plug into the Spring context
filters either filters that know about the bean id
the need to mask, something like:
<bean id="hideCSV" class="org.geoserver.platform.ExtensionHider">
<property name="beanId" value="CSVOutputFormat">
</bean>
that could be also provided as (both are useful):
<bean id="hideCSV" class="org.geoserver.platform.ExtensionHider">
<property name="beanClass"
value="org.geoserver.wfs.response.CSVOutputFormat">
</bean>
But then again someone could also implement a filter that is
configuration aware and that can be used to hide extension
points that the administrator explicitly disabled from the
GUI (think of a panel allows to configure what output formats you want).
Opinions?
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
I like the idea. In terms of the api I would make it more explicit that someone this being exluded. Perhaps change "accept" to "exclude" or something.
Andrea Aime wrote:
Hi,
I'm writing to propose a mechanism to blacklist extensions
in the GeoServer Spring context.
Current we have, in various parts of the codebase, code
that looks up for specific extension point implementors
by using GeoServerExtensions.xxx
The mechanism makes it easy to add another extension
implementor, just declare it in the Spring context,
drop in a new jar, voilà.
But what if someone wants to disable an extension point
instead, say, disable a core output format or a core
store?
At the moment there is no way. We need an extension
point to break other extension points! Ha!
What about:
ExtensionFilter {
boolean accept(String beanId, Object extension);
}
This should allow to plug into the Spring context
filters either filters that know about the bean id
the need to mask, something like:
<bean id="hideCSV" class="org.geoserver.platform.ExtensionHider">
<property name="beanId" value="CSVOutputFormat">
</bean>
that could be also provided as (both are useful):
<bean id="hideCSV" class="org.geoserver.platform.ExtensionHider">
<property name="beanClass"
value="org.geoserver.wfs.response.CSVOutputFormat">
</bean>
But then again someone could also implement a filter that is
configuration aware and that can be used to hide extension
points that the administrator explicitly disabled from the
GUI (think of a panel allows to configure what output formats you want).
Opinions?
Cheers
Andrea
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
Justin Deoliveira ha scritto:
I like the idea. In terms of the api I would make it more explicit that someone this being exluded. Perhaps change "accept" to "exclude" or something.
Cool. I'll cook up a patch, attach to a jira, and then you can
have a look at it?
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
Andrea Aime ha scritto:
Justin Deoliveira ha scritto:
I like the idea. In terms of the api I would make it more explicit that someone this being exluded. Perhaps change "accept" to "exclude" or something.
Cool. I'll cook up a patch, attach to a jira, and then you can
have a look at it?
Here we go:
http://jira.codehaus.org/browse/GEOS-3691
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.