Hi,
coming back on the "non advertised" layers work, which I should start shortly,
I was thinking about how to implement it.
The last discussion on the topic concluded that it would be nice to have
a generic catalog wrapper that can filter out stuff based on certain context
conditions, the advertising filter being driver by the current request
(getcapabilities)
and a layer flag (advertised or not).
Now, we already have two levels of catalog filtering:
- the secured catalog, which in turns talks to a ResourceAccessManager
- the per workspace filter, which is a ResourceAccessManager wrapper
So I was wondering, why not continue on this road?
Writing a catalog wrapper is long and tedius and will result in
significant maintenance
work if we have to add new entities to the catalog.
There are a few options I have in mind:
1) the "composite" plan: have people register multiple ResourceAccessManager
objects in the app context and combine them into a composite.
The tricky part here is to combine the access limits.
Filters can be and-ed, the attribute lists can be intersected, so
can cookie cutter
geometries, but the catalog access mode... uh, not sure what to do about it.
HIDE is stricter than MIXED which is stricter than CHALLENGE?
2) the "filter" plan: we keep just one resource access manager
wrapper, implemented
pretty much like LocalWorkspaceResourceAccessManager, which delegates to
a number of CatalogFilter objects looked up in the spring context.
CatalogFilter {
boolean hideLayer(LayerInfo);
boolean hideWorkspace(WorkspaceInfo);
boolean hdeResource(ResourceInfo);
}
The first that down-votes a resource makes it hidden
I'm leaning towards the second approach, since the first would break the "give
me a ResourceAccessManager from the spring context or I'll instantiate the
default one" approach that we have today, and also because the second is
simpler.
Opinions?
Cheers
Andrea
--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-------------------------------------------------------