Hi devs,
After much brainstorming with Thomas and with the implementation of the new model I'm
doing, we've come to the conclusion that it would be better to add the notions of
Locale and Version in EntityReference.
The main reasons are:
* otherwise we need to introduce a notion of UniqueEntityReference in the model and it
makes it very awkward at an API level (user need to constuct a UniqueEntityReference from
an EntityReference depending on the APIs used)
* it makes APIs more complex than what they could be.
For example:
- getDocument(EntityReference)
- getDocument(EntityReference, Locale)
- getDocument(EntityReference, Version)
- getDocument(EntityReference, Locale, Version)
vs
- getDocument(EntityReference)
(subnote: this is why I introduced UniqueEntityReference in the model)
* It'll mean that anywhere we use an entity reference we'll be able to reference a
specific version of that entity and/or a specific language. Some example: including a
specific version of a page, referencing a specific version of an attachment in wiki
syntax, etc.
In a first version I'd like to only introduce a generic get/setAttributes (to allow
extensibility) in EntityReference + get/setLocale/Version (for easiness of access).
ATM I'm not planning to define a textual syntax for attributes (but it could something
like: wiki:space.page[name1=value1, … nameN=valueN]). I'm not asking to vote on this.
Here's my +1
Thanks
-Vincent