Hi Jody,
The links you provided gave me matters for thinking.
But looking at the existing code, I have the feeling that it is still a
work in progress, am I right ?
Furthermore, I never used the JDBCconfig extension, but I definitely
have the feeling that whatever the resource management system is, the
templates are always file-based.
If this is the case, I guess I don't really have to care, for now, about
Resource management, since I will only deal with template files.
Unless I contribute to adapting the templates to this resource-based
management, but for now, I don't feel like so (maybe later, who knows ?
It doesn't look much complicated).
Am I right ?
Have I missed something ?
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
Le 18/03/2016 23:08, Jody Garnett a écrit :
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
<mailto: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 <tel:%28%2B33%29%206%2009%2023%2021%2036>
E-mail : j...@pi-geosolutions.fr <mailto:j...@pi-geosolutions.fr>
Web : www.pi-geosolutions.fr <http://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
<mailto: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=278785351&iu=/4140
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel