Hi,
the current support for editing ftl templates in GeoServer is kinda lacking, currently
the only way to add/manipulate them is to go on the file system, which is blatantly
against our policy of not manually editing the contents of the data directory.
While I have no funding to support GUI editing at the moment, I have a mandate to
add template support in REST config.
Since the REST config tree structure follows closely the on disk structure I was thinking
to add template support as an extra resource under each of the main ones, for example:
/workspaces/templates/.ftl
/workspaces//templates/.ftl
/workspaces//datastores//templates/.ftl
/workspaces//datastores//featuretypes//templates/.ftl
/workspaces//coveragestores//coverages/templates/.ftl
/workspaces//coveragestores//coverages//templates/.ftl
Given that the template names are well known the only writing operations I foresee
are PUT and DELETE against the template resources (e.g., no POST against templates).
As for what to return on the various resources, we have two choices:
a) not returning defaults or inherited values, but just mimick the on disk structure
b) apply full defaults and inherited values, so if you ask for a certain template and
it is not there we’ll go look in the parent dirs and eventually return the default values
a) seems clearer to me from an editor point of view, since you always know what’s
really there, and besides that, once you DELETE a resource it really disappears
instead of reverting to a default.
Also wondering if this change warrants a small proposal.
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