I would like to proceed with the change proposed by Niels, to store paths rather than Resources. I would like to catch this now before the release goes out as the demo page is one of the last blockers we have on the books.
Rolling back the change of Resource to implement Serializable, and storing paths instead follows the original design so I do not feel a proposal is required here.
One thing that gives me concern is the reference to relative paths, it may be that we have a confusion on when resources should be used (during configuration) and when files should be used (when resolving data source connection parameters, tile cache location, etc…). The Resource API is that it is clear when we are refering to configuraiton resources (it uses the Resource class) vs when we are referencing a file location on disk (it uses the File class).
One thing that gives me concern is the reference to relative paths, it may be that we have a confusion on when resources should be used (during configuration) and when files should be used (when resolving data source connection parameters, tile cache location, etc...). The Resource API is that it is clear when we are refering to configuraiton resources (it uses the Resource class) vs when we are referencing a file location on disk (it uses the File class).
Not to worry! It is safe to use resources for non-configuration files in the data directory. The JDBCResourceStore has excluded directories configured such as "data". When you read and write to this directory using the resource store, this is automatically forwarded to the FileSystemResourceStore.
Unfortunately “data”, “vector”, “raster” folders are only a convention, many people organize their data files in the workspace folder where the data is published (sigh). The proposal for configuration portability cannot come soon enough!
When the 2.9.0 release is out I would like to review the use of file vs resource more carefully and ensure we do not get tripped up. I understand we have some border line cases such app-schema and pregeneralized datastore where data “file” is actually a “config” file used by the GeoTools DataStore.
One thing that gives me concern is the reference to relative paths, it
may be that we have a confusion on when resources should be used
(during configuration) and when files should be used (when resolving
data source connection parameters, tile cache location, etc…). The
Resource API is that it is clear when we are refering to configuraiton
resources (it uses the Resource class) vs when we are referencing a
file location on disk (it uses the File class).
Not to worry! It is safe to use resources for non-configuration files in
the data directory. The JDBCResourceStore has excluded directories
configured such as “data”. When you read and write to this directory
using the resource store, this is automatically forwarded to the
FileSystemResourceStore.
Kind Regards
Niels
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
Unfortunately “data”, “vector”, “raster” folders are only a convention, many people organize their data files in the workspace folder where the data is published (sigh). The proposal for configuration portability cannot come soon enough!
When the 2.9.0 release is out I would like to review the use of file vs resource more carefully and ensure we do not get tripped up. I understand we have some border line cases such app-schema and pregeneralized datastore where data “file” is actually a “config” file used by the GeoTools DataStore.
One thing that gives me concern is the reference to relative paths, it
may be that we have a confusion on when resources should be used
(during configuration) and when files should be used (when resolving
data source connection parameters, tile cache location, etc…). The
Resource API is that it is clear when we are refering to configuraiton
resources (it uses the Resource class) vs when we are referencing a
file location on disk (it uses the File class).
Not to worry! It is safe to use resources for non-configuration files in
the data directory. The JDBCResourceStore has excluded directories
configured such as “data”. When you read and write to this directory
using the resource store, this is automatically forwarded to the
FileSystemResourceStore.
Kind Regards
Niels
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j