[Geoserver-users] Again about freemarker template rest editing

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&quot;
rel="alternate"
href="http://localhost:8080/geoserver/rest/workspaces/topp/templates/header.ftl&quot;
type="text/x-freemarker"/>
  </template>
  <template>
    <name>foo.ftl</name>
    <atom:link xmlns:atom="http://www.w3.org/2005/Atom&quot;
rel="alternate"
href="http://localhost:8080/geoserver/rest/workspaces/topp/templates/content.ftl&quot;
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

-------------------------------------------------------

On Thu, Nov 8, 2012 at 10:34 AM, Andrea Aime
<andrea.aime@anonymised.com> wrote:

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

Whoops, sorry, wrong mailing list, this was meant for the developers one

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

-------------------------------------------------------

Very nice Andrea. Looks great to me. +1

One thing i am curious is about the mime type “text/x-freemarker”. Is that defined anywhere? I wonder how the browser will deal with this one. It might make sense to set it up so that users can also post with the mime type “text/plain” as well since it is more well known.

On Thu, Nov 8, 2012 at 2:35 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, Nov 8, 2012 at 10:34 AM, Andrea Aime
<andrea.aime@anonymised.com> wrote:

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

Whoops, sorry, wrong mailing list, this was meant for the developers one

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



Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.