Hello Jean,

The resource api has some examples here (used when we were porting from
file to resource).

- https://github.com/geoserver/geoserver/wiki/GSIP-106
- https://github.com/geoserver/geoserver/wiki/ResourceStore-API-Examples

I have also tried to provide javadoc examples in the codebase (so it shows
up in your IDE).

-
https://github.com/geoserver/geoserver/blob/master/src/platform/src/main/java/org/geoserver/platform/resource/ResourceStore.java#L9

Let me know how you go?

There is a seperate class for getting the configuration objects associated
with a layer (or any catalog objet):
-
https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/geoserver/config/GeoServerDataDirectory.java

These mostly are used to find the right path.

Depending on the catalog implementation used there may not be an xml file
on disk to modify. To interact with the catalog objects use the catalog api
- since changing these triggers event notification to update the internal
state (or sync a cluster).
-
https://github.com/geoserver/geoserver/tree/master/src/main/src/main/java/org/geoserver/catalog


--
Jody Garnett

On 18 March 2016 at 08:15, Jean Pommier <jean.pomm...@pi-geosolutions.fr>
wrote:

> Hi,
>
> I'm working on a Template management UI (FreeMarker GetFeatureInfo
> templates), as an extension for geoserver web UI.
> I'm trying to figure out how to properly write the templates files in the
> data dir. I suppose I should not build myself the file path, but use some
> internal  resource management class, so that it would adapt to whatever
> config storage system is configured (default file storage or JDBC).
> I guess the information is somewhere, but I've spent the whole afternoon
> looking for it, so I'd be glad if someone could give me some light on the
> matter.
>
> By the way, is there an easy way to get the path corresponding to, say, a
> layer (the path to where its .xml config file is stored) ?
> Thanks,
> Jean
>
>
> --
>
> *Jean Pommier -- pi-Geosolutions*
>
> Ingénieur, consultant indépendant
>
> Tél. : (+33) 6 09 23 21 36
> E-mail : j...@pi-geosolutions.fr
> Web : www.pi-geosolutions.fr
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to