Hi,
To add a not advertised layer using REST I do these steps:
1 - Add a feature type with the following metadata:
<metadata>
<entry key="cachingEnabled">false</entry>
<entry key="advertised">false</entry>
</metadata>
As usual, this implicitly creates a layer. However, the layer is advertised.
2 - Consequently, I add the missing metadata using other REST invocation.
The xml provided to the REST call is like this:
<layer>
<metadata>
<entry key="advertised">false</entry>
</metadata>
<enabled>true</enabled>
</layer>
The "enabled" tag is to avoid GeoServer mark the layer as not enabled.
Using these to steps I can succesfully add a not advertised layer using
REST.
However, there is a problem. If GeoServer is in production, there's a
concurrency issue. A user querying GetCapabilities between both REST calls
is going to see the layer.
Is there any way to avoid that?
Other thing I wanted to ask is that if the way to add a new layer I
described will be supported in the next versions of GeoServer. I have read
somewhere that in the future the advertised configuration will be stored a
new "advertised" tag and not a metadata entry.
By the way, GeoServer is great! :)
Thanks.
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users