[Geoserver-devel] A class for data directory access

Hi all,

This hits on a topic I have wanted to bring up for a while now, and whle working on GEOS-3118 (porting templates to new data directory) I ran into it again.

I wonder what people think about a class which abstracts away all directly file access to the data directory structure. Similar to how the current GeoServerDataDirectory class works, but with more of an emphasis on providing methods to lookup all files/directories in the data directory structure.

My motivation for this is mostly because I have been finding that assumptions about the structure of the data directory are being made in a lot of places:

* in GeoServerLoader which loads configuration
* in GeoServerPersister which persists configuration
* in template look ups
* in test cases which set up the mock data directory

And probably more. A while back I started working on such a class, and so I decided to finish it while working on GEOT-3118. I have attached the class to the following jira issue:

http://jira.codehaus.org/browse/GEOS-3159

Feedback/comments welcome.

If people think this is a good idea I would like to start using the class in the cases listed above.

Thanks,

-Justin

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