Hi,
we have been going back and forth about the location of the resources
a few times,
but I believe this time I have a good proposal :-p
How about this structure:
templates
templates/<template>
workspaces/<workspace>/templates
workspaces/<workspace>/templates/<template>
workspaces/<workspace>/datastores/<store>/templates
workspaces/<workspace>/datastores/<store>/templates/<template>
workspaces/<workspace>/datastores/<store>/featuretypes/<ft>templates
workspaces/<workspace>/datastores/<store>/teaturetypes/<ft>templates/<template>
The one significant thing about this approach is that templates is always put in
parallel with other containers, meaning it won't cause conflicts.
A "templates" resource will list the templates available at that level (global,
workspace, store or layer) as a xml/json document, something like:
<templates>
<template>
<name>bar.ftl</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom"
rel="alternate"
href="http://localhost:8080/geoserver/rest/workspaces/topp/templates/header.ftl"
type="text/x-freemarker"/>
</template>
<template>
<name>foo.ftl</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom"
rel="alternate"
href="http://localhost:8080/geoserver/rest/workspaces/topp/templates/content.ftl"
type="text/x-freemarker"/>
</template>
</templates>
While the single template will always return the ftl content, it's one
and only representation (so, you'll get it regardless of whether you
add the .ftl suffix, or not).
I believe this addresses Justin concerns about the ability of setting
up a per workspace security that includes templates, and it avoids
conflicts.
Opinions?
Cheers
Andrea
--
Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
--
Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------