Hey Gabriel,

Yeah, I think it would make sense to check that the workspace is null. We
could perhaps be lax and actually look first for a global style and if not
found use one found within a workspace if there is only one. Does that make
sense.

Also layer groups will have this same lookup issue.

So yeah, go ahead and amend the lookup, we'll see what unit tests fail.

-Justin

On Fri, Apr 13, 2012 at 2:00 PM, Gabriel Roldan <[email protected]> wrote:

> Hey Justin,
>
> just a question. Working on getting all the jdbc catalog tests to pass
> after merging with the latest per workspace settings work, I'm not
> sure whether the old implementation of
> DefaultCatalogFacade.getStyleByName(String name) is still accurate.
>
> It is like this:
>  public StyleInfo getStyleByName(String name) {
>        for (Iterator s = styles.iterator(); s.hasNext();) {
>            StyleInfo style = (StyleInfo) s.next();
>            if (name.equals(style.getName())) {
>                return ModificationProxy.create(style, StyleInfo.class);
>            }
>        }
>        return null;
>    }
>
> Meaning that it'll return the first style with the given name,
> regardless of it's workspace.
> Is that the intended behaviour, or should it return only a style
> that's "global".
>
> TIA,
> Gabriel.
>
> --
> Gabriel Roldan
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
>



-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to