Hi,

I'm working on adding Freemarker templates editing using REST...
I've added these mappings as suggested by Andrea:

/workspaces/templates/{template}.ftl
/workspaces/{workspace}/templates/{template}.ftl
/workspaces/{workspace}/datastores/{datastore}/templates/{template}.ftl
/workspaces/{workspace}/datastores/{datastore}/featuretypes/{featuretype}/templates/{template}.ftl
/workspaces/{workspace}/coveragestores/{coveragestore}/coverages/templates/{template}.ftl
/workspaces/{workspace}/coveragestores/{coveragestore}/coverages/{coverage}/templates/{template}.ftl

Now I need some suggestions for urls used to list available templates.
If I follow the same pattern used for other resources I should add
mappings like:
/workspaces/templates.{format}
/workspaces/{workspace}/datastores/templates.{format}

But these urls will be intercepted by other Finders, because we have
these mappings:
/workspaces/{workspace}.{type}
/workspaces/{workspace}/datastores/{datastore}.{format}

On the other hand, if I put my new mappings on top, and someone create
a workspace or a datastore called 'templates', the
freemarkerTemplateFinder will intercept calls which isn't supposed to
handle. :)

A solution could be to use these mappings:
/workspaces/templates/index.{format}
/workspaces/{workspace}/templates/index.{format}
...

Another solution:
put everything, editing and list urls under /templates/:
/templates/workspaces/{template}.ftl
/templates/workspaces/index.{format}
...

Opinions?

Regards,
-
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.
==

Davide Savazzi
@svzdvd
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:      +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to