Andrea Aime wrote: > Gabriel Roldan ha scritto: >> Hi Andrea, >> >> Andrea Aime wrote: >>> Hi, >>> I'm trying to setup a new preview page and I'm getting >>> some nastiness trying to stick the two things, layers >>> and layers groups, in the same table. >>> >>> Generally speaking it would be nice if Layer and LayerInfo >>> shared some superclass. >> I would prefer to favor composition over inheritance at least it _is_ a >> layer info and not just a group of layer infos? not the best timing for >> me to look deeper into it though, sorry > > Atm we have composition only. But it does not help if you're > trying to treat the two thing things as one (a displayable layer). > >>> Failing that, it would be still nice if LayerGroupInfo >>> had at least: >>> - a workspace that contains it >> sure > > Actually I'm getting a little confused here. LayerInfo does not > have it either... I guess layers should be part of a Map instead, > but that is not there either. > Which basically means our WMS on trunk is broken, > does not support multiple containers anymore (as the one on 1.7.x), > will break if there are two layers attached to resources with > the same name in different workspaces. :-( Oh boy... Yes, this is an issue. One we are sort of working around by having the catalog recognize layer names of the form <workspaceName>:<resourceName>. But I agree, not ideal. Again this middle ground of not having the "Map" container, but trying to design with it in mind is haunting us. > >>> - a isEnabled that just states whether all the layers in >>> the group are enabled or not (e.g., will the layer >>> group display or not^?) >>> >> What about LayerGroupInfo.isEnabled() == true as long as at least one of >> its aggregated layerinfos is enabled? will this way allow for a >> layerGroupInfo to still be visualized while hiding the non enabled layers? > > Nope, it's guaranteed to blow on your face atm. > I also usually prefer fail fast approach instead of returning > something else, and letting the user figure out why some parts > of the map are missing. > At least the admin should be able to configure this behaviour > (fail fast vs best effort). > > Cheers > Andrea >
-- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial. ------------------------------------------------------------------------------ _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
