[Geoserver-devel] Curiosity: state of freemarker templates on trunk

Hi,
with the new config subsystem in place, and thus the different directory
layout for feature type configuration files, where are the feature type
specific .ftl files supposed to be located? What about the global ones?

And, is the tool performing the migration of the data dir taking care
of copying the ftl files in the proper location?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

So in the new system the specific .ftl files would be located under:

workpaces/<ws>/<ds>/<ft>/*.ftl

And yes, on the data directory import phase, all the templates and any other files in the original feature type directory is copied over.

As for lookups, they will still be looking at the old directory structure, so that will need to be changes. Will open a jira for this.

-Justin

Andrea Aime wrote:

Hi,
with the new config subsystem in place, and thus the different directory
layout for feature type configuration files, where are the feature type
specific .ftl files supposed to be located? What about the global ones?

And, is the tool performing the migration of the data dir taking care
of copying the ftl files in the proper location?

Cheers
Andrea

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

Justin Deoliveira ha scritto:

So in the new system the specific .ftl files would be located under:

workpaces/<ws>/<ds>/<ft>/*.ftl

Makes sense. Where are the global templates going to be located?
In the root?

And yes, on the data directory import phase, all the templates and any other files in the original feature type directory is copied over.

As for lookups, they will still be looking at the old directory structure, so that will need to be changes. Will open a jira for this.

Cool

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Well currently templates can exist in a couple of places:

1. Inside a particular featureType or coverage config directory
2. Under "templates/<namespace>" for namespace wide templates
3. An arbitrary path under feature types or coverages

I am not sure if 3 is of much use. I seem to remember being able to store templates directly under "templates", for defaults. BUt looking at the lookup scheme it does not seem so.

Regardless,I would see these being translated to:

1. Same
2. Under workspaces/<ws>
3. Not sure if we need this one

We could also add a lookup directly under templates for server wide defaults.

Thoughts?

Andrea Aime wrote:

Justin Deoliveira ha scritto:

So in the new system the specific .ftl files would be located under:

workpaces/<ws>/<ds>/<ft>/*.ftl

Makes sense. Where are the global templates going to be located?
In the root?

And yes, on the data directory import phase, all the templates and any other files in the original feature type directory is copied over.

As for lookups, they will still be looking at the old directory structure, so that will need to be changes. Will open a jira for this.

Cool

Cheers
Andrea

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

Justin Deoliveira ha scritto:

Well currently templates can exist in a couple of places:

1. Inside a particular featureType or coverage config directory
2. Under "templates/<namespace>" for namespace wide templates
3. An arbitrary path under feature types or coverages

I am not sure if 3 is of much use. I seem to remember being able to store templates directly under "templates", for defaults. BUt looking at the lookup scheme it does not seem so.

Regardless,I would see these being translated to:

1. Same
2. Under workspaces/<ws>
3. Not sure if we need this one

We could also add a lookup directly under templates for server wide defaults.

Thoughts?

http://jira.codehaus.org/browse/GEOS-3055
is proof that at least someone is using global templates. And in
fact, our template documentation says you can put them into
the featureTypes directory to affect all types:
http://geoserver.org/display/GEOSDOC/GetFeatureInfo+templates

So I would say that yes, we need that for backwards compatibility.
I personally don't find odd that people might want a different default
template, independent of the namespace/workspace.

For 3, what about putting the templates directly under
workspaces instead of making up a separate directory?
It follows the general idea of the other .ftl:
workspaces/<ws>/<store>/<typeName>/content.ftl (type specific)
workspaces/<ws>/content.ftl (workspace specific)
workspaces/content.ftl (totally generic)

(and this makes me wonder about
workspaces/<ws>/<store>/content.ftl (store specific)
too)

Another thing that makes me wonder is the resource/publishing
split. In the future I guess we'll want map and layer specific
templates, and use the resource ones only as fallbacks?

Cheers
Andrea

Cheers
Andrea

Andrea Aime wrote:

Justin Deoliveira ha scritto:

So in the new system the specific .ftl files would be located under:

workpaces/<ws>/<ds>/<ft>/*.ftl

Makes sense. Where are the global templates going to be located?
In the root?

And yes, on the data directory import phase, all the templates and any other files in the original feature type directory is copied over.

As for lookups, they will still be looking at the old directory structure, so that will need to be changes. Will open a jira for this.

Cool

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

http://jira.codehaus.org/browse/GEOS-3055
is proof that at least someone is using global templates. And in
fact, our template documentation says you can put them into
the featureTypes directory to affect all types:
http://geoserver.org/display/GEOSDOC/GetFeatureInfo+templates

So I would say that yes, we need that for backwards compatibility.
I personally don't find odd that people might want a different default
template, independent of the namespace/workspace.

Ahhh... right, thanks for jogging my memory.

For 3, what about putting the templates directly under
workspaces instead of making up a separate directory?
It follows the general idea of the other .ftl:
workspaces/<ws>/<store>/<typeName>/content.ftl (type specific)
workspaces/<ws>/content.ftl (workspace specific)
workspaces/content.ftl (totally generic)

This works for me.

(and this makes me wonder about
workspaces/<ws>/<store>/content.ftl (store specific)
too)

Why not, once we agree on a scheme it should be pretty easy to handle all the levels of a feature type hierarchy.

Another thing that makes me wonder is the resource/publishing
split. In the future I guess we'll want map and layer specific
templates, and use the resource ones only as fallbacks?

Good point. The resource-pub split would mean that each map/layer would have specific templates as well. But I don't see a reason why we can't continue to support templates in the resource hierachy for backwards compability. So the lookup order would become:

maps/<map>/<layer>/content.ftl
maps/<map>/content.ftl
map/content.ftl
workspaces/<ws>/<store>/<typeName>/content.ftl
workspaces/<ws>/content.ftl
workspaces/content.ftl

Cheers
Andrea

Cheers
Andrea

Andrea Aime wrote:

Justin Deoliveira ha scritto:

So in the new system the specific .ftl files would be located under:

workpaces/<ws>/<ds>/<ft>/*.ftl

Makes sense. Where are the global templates going to be located?
In the root?

And yes, on the data directory import phase, all the templates and any other files in the original feature type directory is copied over.

As for lookups, they will still be looking at the old directory structure, so that will need to be changes. Will open a jira for this.

Cool

Cheers
Andrea

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