[xwiki-devs] [VOTE] Change behavior of DAB.getDocument(DocumentReference) to return translated document
Hi devs, I'd like to fix http://jira.xwiki.org/jira/browse/XWIKI-6627 (for 3.1M2 or 3.1RC1). To Fix it I'm proposing to change the behavior of DAB.getDocument(DocumentRefenrece) to always return the translated document object (vs the default document). We can add a getDefaultDocument(DocumentReference) if we want to return the default document. I'd prefer to do this over adding a getTranslatedDocument for 2 reasons: 1) not have to track down all places calling getDocument and replacing their calls with getTranslatedDocuments (since there are very few use cases where we really want the default doc vs the translated doc) 2) follow the direction done by Thomas in http://jira.xwiki.org/jira/browse/XWIKI-2934 which changed DAB.getDocumentContent behavior to return the translated content. WDYT? Thanks -Vincent
On Wed, 2011-05-18 at 18:21 +0200, Vincent Massol wrote:
Hi devs,
I'd like to fix http://jira.xwiki.org/jira/browse/XWIKI-6627 (for 3.1M2 or 3.1RC1).
I don't care that much about the chosen solution as long as it fixes the issue above before 3.1 final BUT ...
To Fix it I'm proposing to change the behavior of DAB.getDocument(DocumentRefenrece) to always return the translated document object (vs the default document).
... if this is the chosen solution, it should be committed as soon as possible as it can break stuff, and we need to discover where it breaks. We should put that in our manual testing plans before this release, testing multilinguism. So +0 from me. Thanks, Anca
We can add a getDefaultDocument(DocumentReference) if we want to return the default document.
I'd prefer to do this over adding a getTranslatedDocument for 2 reasons: 1) not have to track down all places calling getDocument and replacing their calls with getTranslatedDocuments (since there are very few use cases where we really want the default doc vs the translated doc) 2) follow the direction done by Thomas in http://jira.xwiki.org/jira/browse/XWIKI-2934 which changed DAB.getDocumentContent behavior to return the translated content.
WDYT?
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1 for the same reason I did the change in http://jira.xwiki.org/jira/browse/XWIKI-2934 On Wed, May 18, 2011 at 18:21, Vincent Massol <[email protected]> wrote:
Hi devs,
I'd like to fix http://jira.xwiki.org/jira/browse/XWIKI-6627 (for 3.1M2 or 3.1RC1).
To Fix it I'm proposing to change the behavior of DAB.getDocument(DocumentRefenrece) to always return the translated document object (vs the default document).
We can add a getDefaultDocument(DocumentReference) if we want to return the default document.
I'd prefer to do this over adding a getTranslatedDocument for 2 reasons: 1) not have to track down all places calling getDocument and replacing their calls with getTranslatedDocuments (since there are very few use cases where we really want the default doc vs the translated doc) 2) follow the direction done by Thomas in http://jira.xwiki.org/jira/browse/XWIKI-2934 which changed DAB.getDocumentContent behavior to return the translated content.
WDYT?
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On 05/18/2011 06:21 PM, Vincent Massol wrote:
Hi devs,
I'd like to fix http://jira.xwiki.org/jira/browse/XWIKI-6627 (for 3.1M2 or 3.1RC1).
To Fix it I'm proposing to change the behavior of DAB.getDocument(DocumentRefenrece) to always return the translated document object (vs the default document).
We can add a getDefaultDocument(DocumentReference) if we want to return the default document.
I'd prefer to do this over adding a getTranslatedDocument for 2 reasons: 1) not have to track down all places calling getDocument and replacing their calls with getTranslatedDocuments (since there are very few use cases where we really want the default doc vs the translated doc) 2) follow the direction done by Thomas in http://jira.xwiki.org/jira/browse/XWIKI-2934 which changed DAB.getDocumentContent behavior to return the translated content.
WDYT?
+0. Should we introduce a method that also accepts a Locale parameter? -- Sergiu Dumitriu http://purl.org/net/sergiu/
On May 18, 2011, at 7:57 PM, Sergiu Dumitriu wrote:
On 05/18/2011 06:21 PM, Vincent Massol wrote:
Hi devs,
I'd like to fix http://jira.xwiki.org/jira/browse/XWIKI-6627 (for 3.1M2 or 3.1RC1).
To Fix it I'm proposing to change the behavior of DAB.getDocument(DocumentRefenrece) to always return the translated document object (vs the default document).
We can add a getDefaultDocument(DocumentReference) if we want to return the default document.
I'd prefer to do this over adding a getTranslatedDocument for 2 reasons: 1) not have to track down all places calling getDocument and replacing their calls with getTranslatedDocuments (since there are very few use cases where we really want the default doc vs the translated doc) 2) follow the direction done by Thomas in http://jira.xwiki.org/jira/browse/XWIKI-2934 which changed DAB.getDocumentContent behavior to return the translated content.
WDYT?
+0.
Should we introduce a method that also accepts a Locale parameter?
I'd defer this till we need it. Thanks -Vincent
+0 Thanks, Marius On 05/18/2011 07:21 PM, Vincent Massol wrote:
Hi devs,
I'd like to fix http://jira.xwiki.org/jira/browse/XWIKI-6627 (for 3.1M2 or 3.1RC1).
To Fix it I'm proposing to change the behavior of DAB.getDocument(DocumentRefenrece) to always return the translated document object (vs the default document).
We can add a getDefaultDocument(DocumentReference) if we want to return the default document.
I'd prefer to do this over adding a getTranslatedDocument for 2 reasons: 1) not have to track down all places calling getDocument and replacing their calls with getTranslatedDocuments (since there are very few use cases where we really want the default doc vs the translated doc) 2) follow the direction done by Thomas in http://jira.xwiki.org/jira/browse/XWIKI-2934 which changed DAB.getDocumentContent behavior to return the translated content.
WDYT?
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (5)
-
Luca Anca -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol