Allow using REST API to create spatial directory store

Description

When i create a Directory of spatial files (shapefiles) store, using the website it works fine (although browsing still has bugs trough symlinks), but i manage.

When i then get the store using the rest api i can fetch the .xml file containing it's definition

i get something like this:

<dataStore>
<name>myShapefiles</name>
<type>Directory of spatial files (shapefiles)</type>
<connectionParameters>
<entry key="memory mapped buffer">false</entry>
<entry key="timezone">Europe/Amsterdam</entry>
<entry key="create spatial index">true</entry>
<entry key="charset">ISO-8859-1</entry>
<entry key="filetype">shapefile</entry>
<entry key="cache and reuse memory maps">true</entry>
<entry key="url">file:/path/to/shapefiles/myShapefiles/</entry>
</connectionParameters>
</dataStore>

When i save that xml, remove the datastore using the website and then add it again using the rest api, it doesn't create a 'Directory of spatial files (shapefiles)' but a 'shapefile'
It all functions (i can create layers etc.), but it displays the wrong properties in the website and i can't edit it anymore (i get wrong dialogs)

Environment

None

Assignee

Unassigned

Reporter

bas

Triage

None

Fix versions

None

Affects versions

Components

Priority

Medium
Configure