Hi devs,

I’m modifying code for handling NestedSpaces in URLs and a lot of code is doing 
reference serialization "by hand”. I’d like to rationalize this.

Proposal:

* Deprecate the “path” resolver/serializer which is currently located in 
platform-store-filesystem-attachment since “path” is misleading. It’s actually 
a FS Path (since it uses File.separator).
* Introduce a new “fspath” resolver/serializer (copy the “path” one) but put it 
in the platform-model module since it should be able to be used by any module 
using the FS.
* Introduce a new “file” serializer which will generate a file name out of a 
reference. UC: when needing to store temporary files (for exports for example)
** use “.” as separator
** escape the “.” using “%2E” as it’s done in the “path” serializer ( 
URLEncoder.encode(currentReference.getName(), "UTF-8").replace(".", "%2E")); ) 
hoping that whoever wrote it checked that “%” was a valid char in all File 
systems… ;)

WDYT?

Thanks
-Vincent



_______________________________________________
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to