[Geoserver-devel] Relax a bit datastore panel selection logic

Hi,
as you are probably aware the GeoServer GUI allows people to write custom store configuration panels and plug them in by declaring a DataStorePanelInfo bean in the spring context.

The current lookup logic searches for a match of the store factory/store format, which is fine in general, but a bit annoying for a case that I’m handling.
I’m trying to add the file browser for the GDAL based coverage stores, which are plenty and whose list is growing with time.
Given they all share the same base Format class, I would like to change the matching logic so that a single DataStorePanelInfo referring to that base class

works for all the GDAL formats.

The logic in StoreExtensionPoints would be changed so that exact matches are returned right away, and matches by superclass (using Class.isAssignableFrom) are allowed as fallbacks, eventually sorting them to pick the closest match (same code as the one available in Dispatcher.response, just working on different object types).

What do you think?

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Works for me, no objection.

···

On Thu, Jun 13, 2013 at 3:33 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi,
as you are probably aware the GeoServer GUI allows people to write custom store configuration panels and plug them in by declaring a DataStorePanelInfo bean in the spring context.

The current lookup logic searches for a match of the store factory/store format, which is fine in general, but a bit annoying for a case that I’m handling.
I’m trying to add the file browser for the GDAL based coverage stores, which are plenty and whose list is growing with time.
Given they all share the same base Format class, I would like to change the matching logic so that a single DataStorePanelInfo referring to that base class

works for all the GDAL formats.

The logic in StoreExtensionPoints would be changed so that exact matches are returned right away, and matches by superclass (using Class.isAssignableFrom) are allowed as fallbacks, eventually sorting them to pick the closest match (same code as the one available in Dispatcher.response, just working on different object types).

What do you think?

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it



This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.