Wiki source code of Nested Spaces

Last modified by Vincent Massol on 2024/02/26 17:57

Hide last authors
Vincent Massol 22.1 1 Concept: Nested spaces (independent of parent/child relationship)
2
Vincent Massol 21.3 3 {{toc/}}
4
Vincent Massol 50.1 5 = User Stories =
Vincent Massol 1.1 6
Vincent Massol 54.1 7 The devs listed against the user stories below are responsible for the user story and to ensure it's delivered on time, with quality (and automated tests as much as possible) and in general to ensure that they work as expected. They must also ensure that all JIRAs for the stories have been created, assigned and they have defined "Fix Versions".
Vincent Massol 52.1 8
Vincent Massol 115.7 9 Legend:
Ramona Conoro 118.1 10
Vincent Massol 115.7 11 * (!) Partially implemented
12 * (/) Fully implemented
13 * (x) Not implemented yet
14
Vincent Massol 50.1 15 == Create ==
16
Ramona Conoro 77.1 17 |=(% width="5%" %) ID|=(% width="30%" %)User Story Description|=(% width="15%" %)Responsible Dev|=(% width="10%" %)ETA|=(% width="20%" %)JIRAs|=(% width="5%" %)Status|=(% width="5%" %)Tested/Validated|=(% width="5%" %)Automated Test exist
Manuel Leduc 164.2 18 |CR1|As a wiki user, I can create a document at path /A for my team so that I can store information about my team and our projects|Eduard|7.2M1 using URL and without the final Add Page UI and M3 with final UI|Action: [[XWIKI-12263>>http://jira.xwiki.org/browse/XWIKI-12263]] UI: [[XWIKI-12231>>http://jira.xwiki.org/browse/XWIKI-12231]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Create+a+L1+Nested+Document||rel="__blank"]])|(/) ([[test>>url:https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-test/xwiki-platform-flamingo-skin-test-tests/src/test/it/org/xwiki/flamingo/test/ui/CreatePageNestedDocumentsTest.java#L56]])
19 |CR2|As a wiki user, I can create a child document of document A at path /A/B so that I can store information about a sub-aspect of my team and our projects|Eduard|7.2M1 using URL and without the final Add Page UI and M3 with final UI|Action: [[XWIKI-12263>>http://jira.xwiki.org/browse/XWIKI-12263]] UI: [[XWIKI-12231>>http://jira.xwiki.org/browse/XWIKI-12231]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Create+a+child+document||rel="__blank"]])|(/) ([[test>>url:https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-test/xwiki-platform-flamingo-skin-test-tests/src/test/it/org/xwiki/flamingo/test/ui/CreatePageNestedDocumentsTest.java#L58]])
20 |CR3|As a wiki user, I can create a child document of document B at path /A/B/C so that I can store information about a sub-aspect of document B|Eduard|7.2M1 using URL and without the final Add Page UI and M3 with final UI|Action: [[XWIKI-12263>>http://jira.xwiki.org/browse/XWIKI-12263]] UI: [[XWIKI-12231>>http://jira.xwiki.org/browse/XWIKI-12231]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Create+a+L3+Nested+Document||rel="__blank"]])|(/) ([[test>>url:https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-test/xwiki-platform-flamingo-skin-test-tests/src/test/it/org/xwiki/flamingo/test/ui/CreatePageNestedDocumentsTest.java#L60]])
21 |CR4|As a wiki user, I can create a child document of document C at path /A/B/C/D so that I can store information about a sub-aspect of document C|Eduard|7.2M1 using URL and without the final Add Page UI and M3 with final UI|Action: [[XWIKI-12263>>http://jira.xwiki.org/browse/XWIKI-12263]] UI: [[XWIKI-12231>>http://jira.xwiki.org/browse/XWIKI-12231]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Create+a+L4+Nested+Document||rel="__blank"]])|(/) ([[test>>url:https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-test/xwiki-platform-flamingo-skin-test-tests/src/test/it/org/xwiki/flamingo/test/ui/CreatePageNestedDocumentsTest.java#L62]])
22 |CR5|As a wiki user, I can create a child document of any current document by adding a new part to the existing document path, so that I can create sub documents without restriction|Eduard|7.2M1 using URL and without the final Add Page UI and M3 with final UI|Action: [[XWIKI-12263>>http://jira.xwiki.org/browse/XWIKI-12263]] UI: [[XWIKI-12231>>http://jira.xwiki.org/browse/XWIKI-12231]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Create+a+child+document+of+any+current+document||rel="__blank"]])|(/) ([[test>>url:https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-test/xwiki-platform-flamingo-skin-test-tests/src/test/it/org/xwiki/flamingo/test/ui/CreatePageNestedDocumentsTest.java#L64]])
23 |CR6|As a wiki user, I can create a document at any arbitrary path without having to create the parent documents, so that I can organize my documents how I want|Eduard|7.2M1 using URL and without the final Add Page UI and M3 with final UI|Action: [[XWIKI-12263>>http://jira.xwiki.org/browse/XWIKI-12263]] UI: [[XWIKI-12231>>http://jira.xwiki.org/browse/XWIKI-12231]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Create+a+Nested+Document+without+creating+the+parents||rel="__blank"]])|(/) ([[test>>url:https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-test/xwiki-platform-flamingo-skin-test-tests/src/test/it/org/xwiki/flamingo/test/ui/CreatePageNestedDocumentsTest.java#L66]])
Vincent Massol 50.1 24
25 == Update ==
26
Ramona Conoro 77.1 27 |=(% width="5%" %) ID|=(% width="30%" %)User Story Description|=(% width="15%" %)Responsible Dev|=(% width="10%" %)ETA|=(% width="20%" %)JIRAs|=(% width="5%" %)Status|=(% width="5%" %)Tested/Validated|=(% width="5%" %)Automated Test exist
Silvia Macovei 150.3 28 |UP1|As a wiki user, I can rename my document and have its path change to match the updated name so that I can reveal a project that was previously under code name in the wiki|Marius|7.2M1 for API, 7.2M2 for plugging in the APIs and 7.2M3 for the UI|[[XWIKI-12253>>http://jira.xwiki.org/browse/XWIKI-12253]], [[XWIKI-12388>>http://jira.xwiki.org/browse/XWIKI-12388]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Rename+Document||rel="__blank"]]) ([[XWIKI-12482>>http://jira.xwiki.org/browse/XWIKI-12482]], [[XWIKI-12349>>url:http://jira.xwiki.org/browse/XWIKI-12349]])
Manuel Leduc 164.2 29 |
Vincent Massol 50.1 30
31 == View ==
32
Ramona Conoro 77.1 33 |=(% width="5%" %) ID|=(% width="30%" %)User Story Description|=(% width="15%" %)Responsible Dev|=(% width="10%" %)ETA|=(% width="20%" %)JIRAs|=(% width="5%" %)Status|=(% width="5%" %)Tested/Validated|=(% width="5%" %)Automated Test exist
Manuel Leduc 164.2 34 |VI1|As a wiki user, I can see a 'document does not exist' message if I visit a path that does not yet have a document so that I can clearly tell if there is a document at this path|Guillaume|7.2M1|N/A|(/)|(/) ([[link>>http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Document+does+not+exist||rel="__blank"]])|
35 |VI2|As a wiki user, I can see an obvious 'create document' button when I visit a path that does not yet have a document, so that I can quickly create a document at any path|Guillaume|7.2M1|N/A|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Create+a+Nested+Document+using+Add+button||rel="__blank"]])|
36 |VI3|As a wiki user, I can see a breadcrumb of parent documents for the current document so that I understand my place within the document hierarchy|Guillaume|7.2M2|[[XWIKI-12220>>http://jira.xwiki.org/browse/XWIKI-12220]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/The+breadcrumb+displays+the+correct+path||rel="__blank"]])|
Ramona Conoro 129.1 37 |VI4|As a wiki user, I can see in the web browser the URL pointing at the current document and I understand my place within the document hierarchy|Vincent|7.2M1|[[XWIKI-12170>>http://jira.xwiki.org/browse/XWIKI-12170]], [[XWIKI-12169>>http://jira.xwiki.org/browse/XWIKI-12169]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/URL+pointing+to+the+current+document+||rel="__blank"]])
Manuel Leduc 164.2 38 |VI5|As a wiki user, I can click on any document name in the bread crumb so that I can view the content of that document quickly|Guillaume|7.2M2|[[XWIKI-12220>>http://jira.xwiki.org/browse/XWIKI-12220]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Navigate+through+the+parents+using+the+breadcrumb||rel="__blank"]])|
39 |VI6|As a wiki user, I can send someone the link to my document and when they visit the link they can see the document so that I can easily share my document with others|Vincent|7.2M1|[[XWIKI-12170>>http://jira.xwiki.org/browse/XWIKI-12170]], [[XWIKI-12169>>http://jira.xwiki.org/browse/XWIKI-12169]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Share+the+link+containing+a+nested+space+to+another+person||rel="__blank"]])|
Vincent Massol 50.1 40
41 == Delete ==
42
Ramona Conoro 77.1 43 |=(% width="5%" %) ID|=(% width="30%" %)User Story Description|=(% width="15%" %)Responsible Dev|=(% width="10%" %)ETA|=(% width="20%" %)JIRAs|=(% width="5%" %)Status|=(% width="5%" %)Tested/Validated|=(% width="5%" %)Automated Test exist
Manuel Leduc 164.2 44 |DE1|As a wiki user, I can delete a document without automatically deleting any sub documents so that I can remove a bad document without affecting good information in the child documents|Guillaume|7.2M1 for API, 7.2M2 for plugging in the APIs and 7.2M3 for the UI|[[XWIKI-12268>>http://jira.xwiki.org/browse/XWIKI-12268]]|(/)|(/) ([[link1>>http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Delete+non+terminal+page||rel="__blank"]], [[link2>>http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Delete+non+terminal+page+and+children]])|
Vincent Massol 50.1 45
46 == Move ==
47
Ramona Conoro 77.1 48 |=(% width="5%" %) ID|=(% width="30%" %)User Story Description|=(% width="15%" %)Responsible Dev|=(% width="10%" %)ETA|=(% width="20%" %)JIRAs|=(% width="5%" %)Status|=(% width="5%" %)Tested/Validated|=(% width="5%" %)Automated Test exist
Manuel Leduc 164.2 49 |MO1|As a wiki user, I can move my document from its current path to be a child document of any other document, so that I can transfer my project to another team's path|Marius|7.2M1 for API, 7.2M2 for plugging in the APIs and 7.2M3 for the UI|[[XWIKI-12253>>http://jira.xwiki.org/browse/XWIKI-12253]], [[XWIKI-12388>>http://jira.xwiki.org/browse/XWIKI-12388]]|(/)|(/) ([[link1>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Move+L1+document||rel="__blank"]], [[link2>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Move+L2+document||rel="__blank"]])|
50 |MO2|As a wiki user, I can move my document from its current path such that it no longer has a parent document and has a top-level path, so that I can move sub aspects out from my team's document path.|Marius|7.2M1 for API, 7.2M2 for plugging in the APIs and 7.2M3 for the UI|[[XWIKI-12253>>http://jira.xwiki.org/browse/XWIKI-12253]], [[XWIKI-12388>>http://jira.xwiki.org/browse/XWIKI-12388]]|(/)|(/) ([[link1>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Move+document+to+top-level+path+existing+parents||rel="__blank"]], [[link2>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Move+document+to+top-level+path+non-existing+parents||rel="__blank"]])|
51 |MO3|As a wiki user, I can move a document and all its child documents will move so that I don't have to manually do this for each child document|Marius|7.2M1 for API, 7.2M2 for plugging in the APIs and 7.2M3 for the UI|[[XWIKI-12253>>http://jira.xwiki.org/browse/XWIKI-12253]], [[XWIKI-12388>>http://jira.xwiki.org/browse/XWIKI-12388]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Move+document+and+implied+children||rel="__blank"]])|
52 |MO4|As a wiki user, I have an option to select to not move all child documents when I move a parent document so that existing children remain protected under their existing hierarchy.|Marius|7.2M1 for API, 7.2M2 for plugging in the APIs and 7.2M3 for the UI|[[XWIKI-12253>>http://jira.xwiki.org/browse/XWIKI-12253]], [[XWIKI-12388>>http://jira.xwiki.org/browse/XWIKI-12388]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Move+only+parent||rel="__blank"]])|
53 |MO5|As a wiki user, I can manually create an automatic redirect link to the new document path when I move a document so that existing bookmarks to the original document path continue to work, by manually creating a document with the old name and inserting some macro or velocity code to perform the redirect.|Marius|7.2M1|N/A|(/)|(/) ([[link>>http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Manually+create+automatic+redirect+to+new+document]])|
Vincent Massol 50.1 54
55 == Permissions ==
56
Manuel Smeria 78.7 57 |=(% width="5%" %) ID|=(% width="30%" %)User Story Description|=(% width="15%" %)Responsible Dev|=(% width="10%" %)ETA|=(% width="20%" %)JIRAs|=(% width="5%" %)Status|=(% width="5%" %)Tested/Validated|=(% width="5%" %)Automated Test exist
Manuel Leduc 164.2 58 |PE1|As a wiki user, I can set an access permission on my document so that only a specific set of groups can see my document|Guillaume|7.2M1| |(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Grant+view+rights+on+a+document+for+a+group||rel="__blank"]])|
59 |PE2|As a wiki user, I can set a write permission on my document so that only a specific set of groups can edit my document|Guillaume|7.2M1| |(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Grant+edit+rights+on+a+document+for+a+group||rel="__blank"]])
Ramona Conoro 162.1 60 | PE3| As a wiki admin, I can control the permissions of all children documents of the current document. The current document's creator and users with edit rights on it will also be able to modify its permissions (but not that of children).| Guillaume| 7.2RC1|[[XWIKI-12219>>url:http://jira.xwiki.org/browse/XWIKI-12219]]| (/)| (/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Control+the+permissions+of+the+documents+||rel="__blank"]])
Vincent Massol 149.3 61 |PE4|As a wiki user, I expect the permissions of a document will automatically apply to any child document (unless overridden on the child) so that I don't have to manage the permissions of my document hierarchy manually by hand|Guillaume|7.2M1|[[XWIKI-12284>>http://jira.xwiki.org/browse/XWIKI-12284]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Inherit+permissions+to+any+child+document+%28with+no+overridden+permissions+on+the+child%29||rel="__blank"]])
Manuel Leduc 164.2 62 |PE5|As a wiki user, I can set the permissions defined on a document to override any inherited permissions from parent documents so that I have explicit control over who can access or modify the document|Guillaume|7.2M1| |(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Override+a+right+at+page+level||rel="__blank"]])
63 |PE6|As a wiki user, I can preserve all permissions defined in the document when I move it.|Guillaume|7.2M1 without UI (depends on MO1-5), M3 with Move UI|[[XWIKI-12253>>http://jira.xwiki.org/browse/XWIKI-12253]]|(/)|(/) ([[link>>http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Preserve+document+permissions+after+move||rel="__blank"]])
64 |PE7|As a wiki user, I expect to inherit all permissions from the new parent document (if any) when I move a document so that I can automatically take advantage of the new parent document's permission|Guillaume|7.2M1| |(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Move+document+to+new+parent+with+existing+rights||rel="__blank"]])
65 |PE8|As a wiki user, the XWiki Enterprise Solution will not allow me to move a document under a new parent document which will result in inheriting permissions that will not allow me to view the document after the move.|Marius|7.2M3| |(/)|(/) ([[link>>http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Cannot+move+document+to+new+parent+where+I+cannot+view+document+after+move||rel="__blank"]])
Vincent Massol 50.1 66
67 == Import/Export ==
68
Ramona Conoro 77.1 69 |=(% width="5%" %) ID|=(% width="30%" %)User Story Description|=(% width="15%" %)Responsible Dev|=(% width="10%" %)ETA|=(% width="20%" %)JIRAs|=(% width="5%" %)Status|=(% width="5%" %)Tested/Validated|=(% width="5%" %)Automated Test exist
Vincent Massol 149.9 70 |IE1|As a wiki user, I can keep the complete document path when exporting a document and when importing it back, import it in the exact same location|Thomas|7.2M1 without UI, M2 with UI|[[XWIKI-12225>>http://jira.xwiki.org/browse/XWIKI-12225]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Export+Import+a+document||rel="__blank"]])|unit
Manuel Leduc 164.2 71 |IE2|As a wiki user, I can export the document's defined permissions so that I can preserve the same permissions when I import the document into a new system|Thomas|7.2M1 without UI, M2 with UI| |(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Export+Import+a+document+with+defined+permissions||rel="__blank"]])
72 |IE3|As a wiki user, I can export the document's history so that I can preserve the same history when I import the document into a new system|Thomas|7.2M1 without UI, M2 with UI| |(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Export+Import+a+document+with+history||rel="__blank"]])
Vincent Massol 50.1 73
74 == Backward Compatibility ==
75
Ramona Conoro 77.1 76 |=(% width="5%" %) ID|=(% width="30%" %)User Story Description|=(% width="15%" %)Responsible Dev|=(% width="10%" %)ETA|=(% width="20%" %)JIRAs|=(% width="5%" %)Status|=(% width="5%" %)Tested/Validated|=(% width="5%" %)Automated Test exist
Vincent Massol 78.2 77 |BA1|As a wiki user, I can use all the standard extensions included in XWiki Enterprise Solution without any conflicts with Nested Documents so that I can enjoy of the extensions in functionality that they provide. The exact list can be found by installing XWiki 7.1.1 going to the Wiki Administration page, and selecting “Installed Extensions” or navigating directly to:
Manuel Leduc 164.2 78 {{{http://<server>/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=XWiki.InstalledExtensions}}}|Gabriela/Caty|7.2RC1| |(/)|(/)
Vincent Massol 50.1 79
80 == Performance ==
81
Ramona Conoro 77.1 82 |=(% width="5%" %) ID|=(% width="30%" %)User Story Description|=(% width="15%" %)Responsible Dev|=(% width="10%" %)ETA|=(% width="20%" %)JIRAs|=(% width="5%" %)Status|=(% width="5%" %)Tested/Validated|=(% width="5%" %)Automated Test exist
Manuel Leduc 164.2 83 |PF1|As a wiki owner, I want all features of XWiki to operate as well or better in term of response times (within 5%) when compared to the latest LTS (6.x branch), using exactly the same content of wiki pages|Thomas|7.2RC1| |(x)| |
Vincent Massol 50.1 84
85 == Hooks ==
86
Vincent Massol 75.2 87 Hooks mean you don't have to rebuild XWiki from sources to be able to implement the listed features below. In addition you can upgrade without breaking compatibility (If you upgrade and you wish to benefit from changes made to VM files in your overridden VMs you’ll need to perform some manual merges).
Vincent Massol 55.1 88
Ramona Conoro 77.1 89 |=(% width="5%" %) ID|=(% width="30%" %)User Story Description|=(% width="15%" %)Responsible Dev|=(% width="10%" %)ETA|=(% width="20%" %)JIRAs|=(% width="5%" %)Status|=(% width="5%" %)Tested/Validated|=(% width="5%" %)Automated Test exist
Vincent Massol 150.2 90 |HO1|As a wiki user, I can select an option to remove all child documents when I delete a document so that I can remove an entire section of the wiki without having to do the tedious work of deleting the documents individually.|Vincent|7.2M1|N/A|(/) It has been implemented in DE1 too!|(/)
Vincent Massol 115.4 91 |HO2|As a wiki user, the XWiki Enterprise Solution will keep my documents private by providing other users with a 'document does not exist' message when they try to view a document that they don't have permission to access. This will prevent other users from gaining meaningful information by guessing URLs to private documents|Vincent|7.2M1|N/A|(/)|(/)
92 |HO3|As a wiki user, I can leave a link to the new document path when I move a document so that existing bookmarks to the original document path continue to work|Marius|7.2M1|N/A|(/)|(/)
93 |HO4|As a wiki user, I can set an ownership permission on my document so that only a specific set of groups can change the document's permission|Vincent|7.2M1|N/A|(/)|(/)
94 |HO5|As a wiki user, I can see the ownership permission of documents that I also have access to so that I can contact the owner for questions or concerns|Vincent|7.2M1|N/A|(/)|(/)
95 |HO6|As a wiki user, I will receive a warning when changing the permissions of a parent documents if any of its children have overridden their permissions so that I can know if my changes will conflict with the permissions of the child documents|Vincent|7.2M1|N/A|(/)|(/)
Ramona Conoro 162.1 96 |HO7|As a wiki owner, I have the option to set CKEditor as the default WYSIWIYG editor in replacement of the Google Web Toolkit (GWT) based WYSIWYG one|Marius|7.2RC1|N/A|(/)([[link>>extensions:Extension.CKEditor Integration||anchor="HReplacetheDefaultEditor"]])|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Set+CKEditor+as+the+default+WYSIWIYG+editor+||rel="__blank"]])
Vincent Massol 50.1 97
98 == Macros ==
99
Francisco Peredo 159.1 100 This means macros will allow implementation of the following stories in any XWiki document
101
Ramona Conoro 77.1 102 |=(% width="5%" %) ID|=(% width="30%" %)User Story Description|=(% width="15%" %)Responsible Dev|=(% width="10%" %)ETA|=(% width="20%" %)JIRAs|=(% width="5%" %)Status|=(% width="5%" %)Tested/Validated|=(% width="5%" %)Automated Test exist
Ramona Conoro 141.1 103 |MA1|As a wiki user, I can see the tree structure of child documents for the top level documents of my current document's path so that I can understand the structure of the current document's document hierarchy|Marius|7.2M2|[[XWIKI-12174>>http://jira.xwiki.org/browse/XWIKI-12174]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Expand+tree+structure||rel="__blank"]])
Ramona Conoro 142.1 104 |MA2|As a wiki user, I can click on any document in the tree structure so that I can view the content of that document quickly|Marius|7.2M2|[[XWIKI-12174>>http://jira.xwiki.org/browse/XWIKI-12174]]|(/)|(/) ([[link>>url:http://test.xwiki.org/xwiki/bin/view/Nested+Spaces/Access+documents+from+Index+Tree||rel="__blank"]])
Vincent Massol 50.1 105
Vincent Massol 88.4 106 = Testing User Stories =
107
Francisco Peredo 154.3 108 Provides additional explanations on how to test some user stories:
Vincent Massol 88.4 109
Francisco Peredo 154.3 110 To edit the .vm files you can use the [[Skin Application Extension>>url:http://extensions.xwiki.org/xwiki/bin/view/Extension/Skin+Application]].
111
112 If you would like to know more about the Velocity APIs mentioned here, check the [[Scripting Documentation Application Extension>>url:http://extensions.xwiki.org/xwiki/bin/view/Extension/Scripting+Documentation+Application]] on your own XWiki installation or [[look at the one that is running at platform.xwiki.org >>url:http://platform.xwiki.org/xwiki/bin/view/ScriptingDocumentation/]].
113
Francisco Peredo 157.1 114 * **HO1**: Replace/Override ##delete.vm## and add the necessary logic to perform child deletion by looping and calling ##[[##XWiki##>>url:http://platform.xwiki.org/xwiki/bin/view/ScriptingDocumentation/?url=http:%2F%2Fnexus.xwiki.org%2Fnexus%2Fservice%2Flocal%2Frepositories%2Fpublic%2Farchive%2Forg%2Fxwiki%2Fplatform%2Fxwiki-platform-oldcore%2F7.1.1%2Fxwiki-platform-oldcore-7.1.1-javadoc.jar%2F!%2Fcom%2Fxpn%2Fxwiki%2Fapi%2FXWiki.html]].[[getDocument>>url:http://platform.xwiki.org/xwiki/bin/view/ScriptingDocumentation/?url=http:%2F%2Fnexus.xwiki.org%2Fnexus%2Fservice%2Flocal%2Frepositories%2Fpublic%2Farchive%2Forg%2Fxwiki%2Fplatform%2Fxwiki-platform-oldcore%2F7.1.1%2Fxwiki-platform-oldcore-7.1.1-javadoc.jar%2F!%2Fcom%2Fxpn%2Fxwiki%2Fapi%2FDocument.html]](...).[[deleteDocument>>url:http://platform.xwiki.org/xwiki/bin/view/ScriptingDocumentation/?url=http:%2F%2Fnexus.xwiki.org%2Fnexus%2Fservice%2Flocal%2Frepositories%2Fpublic%2Farchive%2Forg%2Fxwiki%2Fplatform%2Fxwiki-platform-oldcore%2F7.1.1%2Fxwiki-platform-oldcore-7.1.1-javadoc.jar%2F!%2Fcom%2Fxpn%2Fxwiki%2Fapi%2FDocument.html%23deleteDocument()]](...)##. To test:(((
Vincent Massol 113.2 115 {{code language="none"}}
116 #template("startpage.vm")
117 <div class="main">
118 <div id="mainContentArea">
119 <div id="xwikimessage">Whatever I want here!</div>
120 <div class="clearfloats"></div>
121 </div>## mainContentArea
122 </div>## main
123 #template("endpage.vm")
124 {{/code}}
125 )))
Vincent Massol 113.3 126 * **HO2**: Replace/Override ##accessdenied.vm## and use the message you wish to display.
Manuel Leduc 164.2 127 * **HO3**: Modify ##rename.vm## and add the necessary steps just after the call to ##$[[doc.rename>>url:http://platform.xwiki.org/xwiki/bin/view/ScriptingDocumentation/?url=http:%2F%2Fnexus.xwiki.org%2Fnexus%2Fservice%2Flocal%2Frepositories%2Fpublic%2Farchive%2Forg%2Fxwiki%2Fplatform%2Fxwiki-platform-oldcore%2F7.1.1%2Fxwiki-platform-oldcore-7.1.1-javadoc.jar%2F!%2Fcom%2Fxpn%2Fxwiki%2Fapi%2FDocument.html%23rename(org.xwiki.model.reference.DocumentReference)]]($newDocReference, $backlinks, $children)##: [[recreate the document>>xwiki:Documentation.DevGuide.Scripting.APIGuide.WebHome||anchor="HCreateanewDocument"]], set its content [[with a redirect>>extensions:Extension.Redirect]] and save it.
128 * **HO4**: Modify ##rightsUI.vm## to add a check to verify if the current user is part of a given group. The [[##$xwiki.getUser().isUserInGroup(groupname)##>>xwiki:ScriptingDocumentation.WebHome||queryString="url=http:%2F%2Fnexus.xwiki.org%2Fnexus%2Fservice%2Flocal%2Frepositories%2Fpublic%2Farchive%2Forg%2Fxwiki%2Fplatform%2Fxwiki-platform-oldcore%2F7.1.1%2Fxwiki-platform-oldcore-7.1.1-javadoc.jar%2F!%2Fcom%2Fxpn%2Fxwiki%2Fapi%2FUser.html%23isUserInGroup(java.lang.String)"]] API can be used. The groupname is the reference of the page defining the group, e.g “XWiki.XWikiAdminGroup”.
Francisco Peredo 157.1 129 * **HO5**: Modify ##informationinline.vm## to display the ownership permission of the current document. It depends what an “owner" of a document means. If it's its creator then it’s simple (you get the creator with $doc.getCreatorReference()). If you want to find all users that have access to the document then you need to get the full list of users in the wiki and then check for each one if he/she has access to that document. For the full list you can use the Query Manager (http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module) to get all XWiki.XWikiUsers pages and then call $xcontext.[[hasAccessLevel>>url:http://platform.xwiki.org/xwiki/bin/view/ScriptingDocumentation/?url=http:%2F%2Fnexus.xwiki.org%2Fnexus%2Fservice%2Flocal%2Frepositories%2Fpublic%2Farchive%2Forg%2Fxwiki%2Fplatform%2Fxwiki-platform-oldcore%2F7.1.1%2Fxwiki-platform-oldcore-7.1.1-javadoc.jar%2F!%2Fcom%2Fxpn%2Fxwiki%2Fapi%2FApi.html%23hasAccessLevel(java.lang.String,%20java.lang.String)]]() to see if the user has some access to the page (example1: http://www.xwiki.org/xwiki/bin/view/FAQ/How+to+check+if+a+user+has+programming+rights).
Francisco Peredo 158.1 130 * **HO6**: Modify ##rightsUI.vm## to perform additional checks by getting the list of children for a given parent (using the [[Query Manager>>url:http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module#HFromVelocity]]) and for each child, check if the current user still has the permission being changed using hasAccessLevel() as above
Vincent Massol 152.1 131 * **HO7**: See documentation on how to perform this at http://extensions.xwiki.org/xwiki/bin/view/Extension/CKEditor+Integration#HReplacetheDefaultEditor
Vincent Massol 90.1 132 * **PE4**: Steps:
133 ** Create the page ##A.B.C.WebHome##
134 ** Create ##A.WebHome##
135 ** Set the ##view## right to ##XWikiAdminGroup## on the space ##A## by clicking on "Administer Space"
136 ** Create a new user
137 ** With this new user, you should not be able to view ##A.WebHome## nor ##A.B.C.WebHome##
Vincent Massol 98.1 138 * **MO1-4/UP1/DE1**: see [[here>>http://jira.xwiki.org/browse/XWIKI-12253?focusedCommentId=87219&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-87219]]
Vincent Massol 113.1 139 * **MA1/MA2**: see [[here>>http://jira.xwiki.org/browse/XWIKI-12174?focusedCommentId=87319&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-87319]].
Vincent Massol 88.4 140
Vincent Massol 50.1 141 = Use Cases (replaced with User Stories) =
142
Vincent Massol 19.2 143 Assumption:
Ecaterina Moraru (Valica) 11.1 144
Eduard Moraru 29.2 145 * Option 1 (without nested documents):##{{{http://localhost:8080/xwiki/bin/view/A/B/C}}}##where A and B are spaces and C is a page.
146 * Option 2: (with nested documents):##{{{http://localhost:8080/xwiki/bin/view/A/B/C/WebHome}}}##where A, B and C are spaces.
147
Vincent Massol 26.2 148 Minimal list of Use Cases for M1/M2 for XWiki 7.2:
Vincent Massol 19.5 149
Vincent Massol 19.3 150 * UC1: Adding a page D under an existing page A/B/C, using the Add button
Vincent Massol 20.4 151 ** Option 1: Not possible. The user first needs to rename page C into C.WebHome and then create page D under space C by using a Space Displayer in the Add Page UI. Requires T1, 3, 4, 5, 6, 11 -> M2
152 ** Option 2: The Add Page UI asks the user to enter the name of the new page (D) and to choose under which document to put it (using a Document Hierarchy Displayer). Page D.WebHome is created under C. Requires T1, 3, 4, 5, 6, 11, 18 -> M2
Vincent Massol 1.1 153
Vincent Massol 20.4 154 * UC2: Ability to create a wiki link in wiki mode and once saved, navigate to it by clicking on it. For example: {{{[[label>>A.B.C]]}}}. Requires T1, 6, 11 -> M1
Vincent Massol 17.1 155
Vincent Massol 20.5 156 * UC3: Delete a page that has children pages. Requires T1, 6, 11 for option 1 (-> M1) + 18 for option 2 (-> M2)
Vincent Massol 17.1 157
Vincent Massol 19.2 158 * UC4: Ability to navigate to C.WebHome by using all the following URLs:
159 ** ##{{{http://localhost:8080/xwiki/bin/view/A/B/C/WebHome}}}##
160 ** ##{{{http://localhost:8080/xwiki/bin/view/A/B/C/}}}##
161 ** ##{{{http://localhost:8080/xwiki/bin/view/A/B/C}}}##
Vincent Massol 20.5 162 ** Requires T1, 6, 11 -> M1
Vincent Massol 17.1 163
Eduard Moraru 29.2 164 * UC5: Adding a page D under an existing page A/B/C using URL by typing##{{{http://localhost:8080/xwiki/bin/view/A/B/C/D}}}##
Vincent Massol 20.5 165 ** Option 1: Not possible. The UI will say that page D doesn't exist and creating it will create a page with spaces A.B.C. However page D will not be under the existing page C. The user first needs to rename page C into C.WebHome and then it'll work. Requires T1, 6, 11 -> M1
166 ** Option 2: The UI will say that page D doesn't exist and propose to create it. Clicking on it should create D.WebHome under space C. Requires T1, 6, 11, 18 -> M2
Vincent Massol 19.2 167
Vincent Massol 19.3 168 * UC6: Users should be able to navigate quickly to any parent space of the current page, using a breadcrumb
169 ** Note: this means either changing the top level menu to support nested spaces and hiding the current breadcrumb (based on parent/child relationships) or simplifying the top level menu (see http://markmail.org/message/rab6vbxd6743gmrc ) and offering a different implementation of the breadcrumb based on document references.
Vincent Massol 20.6 170 ** Requires T1, 6, 11, 8, 9, 19 -> M2
Vincent Massol 19.3 171
Vincent Massol 20.6 172 * UC7: Ability to create a new page under a non-existing page, using the Add button. Requires T1, 3, 4, 5, 6, 11 (+ 18) -> M2
Vincent Massol 19.4 173
Vincent Massol 20.7 174 * UC8: Ability to create a new page under a non-existing page, by directly typing the URL. Requires T1, 6, 11 -> M1
Vincent Massol 19.4 175
Vincent Massol 20.10 176 * UC9: Rename a page. Rename space of A.B.C.WebHome to be A instead of A.B.C. Requires T1, 3, 4, 5, 6, 11 (+18) -> M2
Vincent Massol 19.4 177
Vincent Massol 20.10 178 * UC10: Rename a page into a non-existing space. Rename space of A.B.C.WebHome to be A.D instead of A.B.C, where D doesn't exist. Requires T1, 3, 4, 5, 6, 11 (+18) -> M2
Vincent Massol 19.4 179
Vincent Massol 19.6 180 Other UC to implement:
181
Vincent Massol 20.12 182 See the tasks below.
Vincent Massol 19.6 183
Eduard Moraru 29.2 184 = Technical Implementation =
Vincent Massol 20.12 185
Vincent Massol 36.1 186 List of all JIRA issues related to the Nested Spaces implementation:
Eduard Moraru 29.2 187
Vincent Massol 36.1 188 {{jira url="http://jira.xwiki.org" fields="type, key, status, summary, assignee" source="jql"}}
Gabriela Smeria 46.5 189 project in (XAFORUM, FILEMAN, XTOTEM, XWIKI, XE, XRENDERING, XCOMMONS) AND labels = NestedSpaces
Vincent Massol 36.1 190 {{/jira}}
191
Vincent Massol 36.2 192 == Original list of tasks ==
Vincent Massol 36.1 193
Vincent Massol 1.1 194 Technically this means:
195
Ecaterina Moraru (Valica) 14.1 196 (% class="table" %)
Vincent Massol 26.2 197 |=Id|=Task Description|=Version|=Developer|=JIRA
Vincent Massol 26.9 198 |T1|At the database level, we would need to make a change: store the full space reference (no wiki) in the existing ##space## column + possibly add a new table for storing Spaces. Consequently modify all code calling ##XWikiDocument.get/setSpace()## so that they call ##XWikiDocument.getDocumentReference()##. Similarly modify all queries returning or filtering on the ##space## column (##web## or ##space## in HQL/XWQL). We also need an API to get the list of child spaces of a given parent space.|7.2M1|**Thomas**|[[XWIKI-12153>>http://jira.xwiki.org/browse/XWIKI-12153]]
Manuel Leduc 164.2 199 |T2|Write a migration to escape all existing "." in the ##space## column.|7.2M3|**Thomas**|
Marius Dumitru Florea 30.1 200 |T3|Create a Space Displayer (view + edit modes) to display/select a space|7.2M1|Edy? **Marius** Guillaume?|[[XWIKI-12176>>http://jira.xwiki.org/browse/XWIKI-12176]]
201 |T4|Modify the Document Tree macro to support nested spaces. Add support for clicking on spaces to go to the space's WebHome page and thus not display WebHome in the list of docs for a space.|7.2M1|**Marius**|[[XWIKI-12173>>http://jira.xwiki.org/browse/XWIKI-12173]], [[XWIKI-12174>>http://jira.xwiki.org/browse/XWIKI-12174]]
Manuel Leduc 164.2 202 |T5|Modify the Page and Space creation UI to select in which space to create the new document or space (use the Space Displayer). Same for Copy and Rename UI actions. Note: Make sure to update the functional tests. Remove the Add/Delete/Rename Space features if T18 is accepted + Modify the Create Panel to only create pages and not spaces.|7.2M2|**Edy** Marius? Guillaume?|[[XWIKI-12231>>http://jira.xwiki.org/browse/XWIKI-12231]]
Vincent Massol 35.1 203 |T6|Modify the Standard URL Scheme + all XWikiURLFactory implementations + URL module to support Nested Spaces (while still supporting current URL formats). Review and modify all URL handlers for URLs other than Entity URLs (REST, GWT, XMLRPC, WebDAV, etc)|7.2M1|**Vincent** Edy? Other?|[[XWIKI-12170>>http://jira.xwiki.org/browse/XWIKI-12170]], [[XWIKI-12169>>http://jira.xwiki.org/browse/XWIKI-12169]]
Manuel Leduc 164.2 204 |T7|Review and fix all places where spaces are stored. For example modify the Activity Stream's ##space## column (##activitystream.hbm.xml## similarly to above for ##xwiki.hbm.xml##) to use the full space reference + the Activity Stream code that uses it.|7.2M2|**Thomas**|
205 |T8|Design new top level navigation and action menus to support multiple spaces|7.2M1|**Caty**|See [[Nested: Navigation and Actions>>Proposal.NestedNavigationActions]]
206 |T9|Modify top level navigation and action menu to support multiple spaces|7.2M2|**Guillaume**|[[XWIKI-12189>>http://jira.xwiki.org/browse/XWIKI-12189]]
207 |T10|Modify Admin UI to be able to navigate to nested spaces.|7.2M3|**Edy** Guillaume? Marius?|[[XWIKI-12172>>http://jira.xwiki.org/browse/XWIKI-12172]]
Thomas Mortagne 43.1 208 |T11|Modify EntityReferenceValueProvider to return an EntityReference instead of a String to handle nested spaces. Since we won't be able to modify it without breaking backward compatibility we'll need to deprecate it and introduce a new interface|7.2M1|**Thomas**|[[XWIKI-12153>>http://jira.xwiki.org/browse/XWIKI-12153]]
Marius Dumitru Florea 30.2 209 |T12|Modify the Page Displayer (view+edit modes) to support nested spaces|7.2M3|**Marius**|[[XWIKI-12176>>http://jira.xwiki.org/browse/XWIKI-12176]]
Manuel Leduc 164.2 210 |T13|Design a new way to display Page + Spaces + Wiki in a livetable (idea: use a single column) + ability to filter on wiki, spaces, page|7.2M1|**Caty**|See [[Nested: Livetable>>Proposal.NestedLivetable]]
211 |T14|Based on the design (done in M1), modify the Livetables which display document names and spaces to better handle nested spaces (without any changes, the technical space reference will be printed). Example: Index's AllDocs pages|7.2M3|Guillaume? **Marius** Edy?|
212 |T15|Rewrite the Space List Macro to display the spaces in a tree instead of a table + modify ##XWiki.getSpaces()## API (deprecate + add a new one possibly)|7.2M1|**Marius** Edy? Other?|
Marius Dumitru Florea 30.1 213 |T16|Modify the Space Facet of SOLR's Search UI to support Nested Spaces|7.2M3|**Marius**|[[XWIKI-12175>>http://jira.xwiki.org/browse/XWIKI-12175]]
Manuel Leduc 164.2 214 |T17|Modify UIs to never display "WebHome" (except for some very technical places). This is especially important if we decide to support "Nested Documents" by automatically creating spaces whenever the user creates a new page, thus always creating WebHome pages. However it's also important even if we don't do this.|7.2M3|Edy? **Guillaume** Marius?|[[XWIKI-12190>>http://jira.xwiki.org/browse/XWIKI-12190]]
215 |T18|Create a space whenever a page is created (always create WebHome pages). This allows to have "nested documents"! Note that this probably also require disabling rights at the page level since it would no longer be necessary. First step is to send a proposal to the list to discuss it and decide if we want this. This could mean to remove the concept of Space everywhere in UIs.|7.2M2 (Decision to be done in 7.1M1)|Edy? **Guillaume** Marius?|[[XWIKI-12193>>http://jira.xwiki.org/browse/XWIKI-12193]]
216 |T19|Turn off the current breadcrumb by default + the ability to set the parent in edit mode, i.e. stop using parent/child relationship. See http://markmail.org/message/rab6vbxd6743gmrc|7.2M3|**Marius** Edy? Guillaume?|
Gabriela Smeria 79.2 217 |T20|Review the main Extensions to locate Extensions that will need to be modified because they display Spaces in their UI (or use APIs that will be removed/deprecated such as ##getSpaces()## (see above). What happens is that the ##space## column in the database will now hold the nested space reference instead of just a single space name. Thus if the extension displays the space somewhere in its UI, it'll display for example "space1.space2" instead of just "space" before. While this is valid it may not be the best from a user POV. In practice when you move from single space to nested spaces you need to review the way you were doing things. For example imagine that you had a list of spaces displayed one under another. If you don't make any change you'll get a list with elements such as "space1", "space2.space3", "space4", "space5.space6.space7", etc. In practice with nested spaces what you'd like to have is a tree. Thus in order for those extensions displaying spaces, they'll need to have some improvements to support perfectly nested spaces from a user POV.|7.2M1|**Gabriela** Caty|See [[Contrib Extensions Review>>http://design.xwiki.org/xwiki/bin/view/Proposal/Contrib+Extensions+Review]] and [[XWiki Enterprise Extensions Review>>http://design.xwiki.org/xwiki/bin/view/Proposal/XWiki+Enterprise+Extensions+Review]]
Thomas Mortagne 72.3 218 |T21|Modify the XAR format (and Import/Export) to support Nested Spaces|7.2M2|?
Vincent Massol 26.2 219 |T22|Modify the Admin Import/Export UI to support Nested Spaces|7.2M3|?
220 |T23|Add support for page renames without breaking existing bookmarks so that we can reorganize the default Flavor wiki pages we provide and use Nested spaces|7.x? 8.x?|?
221 |T24|Reorganize the default Flavor wiki pages and Core Extensions we provide to use Nested spaces|7.x? 8.x?|?
Vincent Massol 27.1 222 |T25|Add support for easy linking to WebHome page (Depends on T18)|7.2M3|?
Ecaterina Moraru (Valica) 49.1 223 |T26|Prepare an [[Upgrade Guide>>||anchor="HMigrationGuide"]]. For ex if you do HQL like "where doc.space = 'somespace'" and add a parent or child space for somespace then the query will not return anything since you can have something like "parent.somespace.child" in the DB in the space column.|?|?
Vincent Massol 16.2 224
Vincent Massol 27.1 225 == URL + WikiLinks Implementation (T6 + T25) ==
226
227 There are 2 parts for URLs:
Eduard Moraru 29.2 228
Vincent Massol 28.1 229 1. Supporting implicit WebHome: URLs of type ##A/B/C## where C is a space and ##WebHome## is implicit (not specified in the URL). This is needed if T18 is accepted.
Vincent Massol 27.1 230 1. Supporting nested elements.
231
232 === Supporting Implicit WebHome ===
233
234 The problem for part 2 is that there's no way of knowing if "C" is a space or not just by looking at the URL. Thus, till Nested Documents is implemented in the DB the only solution is to check if a document named "C.WebHome" exists in the DB and if not, consider that the user is asking for page ##C## in space ##A.B##.
235
236 Note that it's more performant than doing: check if a document named "C" exists in the DB and if not consider that the user is asking for page "C.WebHome". The reason is because if T18 is accepted most documents will be named ##WebHome## and thus checking for its existence is better since these will be in the "exist" cache.
237
238 However:
Eduard Moraru 29.2 239
Vincent Massol 27.1 240 * This is a costly operation compared to not calling the DB at all
241 * The code needs to be refactored to ensure that the DB is ready **before** URL parsing is done (which is not the case right now!)
242
243 To alleviate the problem we could decide to have a configuration flag for this (till Nested Docs is implemented in the DB), and this flag would be off by default.
244
Vincent Massol 29.1 245 An alternative would be to find a way to separate links to spaces from links to documents in the URL (it would be up to the link generation code to generate the proper URL by checking for document existence). We could imagine for example to have a parameter: by default links without this parameter would be links to spaces (since with T18 it would become the norm) and when this param is specified it would be links to documents.
Vincent Massol 27.1 246
Vincent Massol 29.1 247 For example:
Eduard Moraru 29.2 248
Vincent Massol 29.1 249 * Link to doc: ##/A/B/C?doc=true## or ##/A/B/C?url=doc##
250 * Link to WebHome: ##A/B/C##
251
Vincent Massol 27.1 252 Similarly when parsing wiki links, we could add a link parameter whenever we need to link to a page not named ##WebHome## (to avoid DB calls):
Eduard Moraru 29.2 253
Vincent Massol 27.1 254 * {{{[[label>>A.B.C]]}}}: link to ##A.B.C.WebHome##
255 * {{{[[label>>A.B.C||action="viewpage"]]}}}: link to ##A.B.C##
256
Vincent Massol 28.1 257 === Supporting Nested Elements ===
258
259 Right now the code implements:
260
261 {{code language="none"}}
262 // Rules based on counting the url segments:
263 // - 0 segments (e.g. ""): default document reference, "view" action
264 // - 1 segment (e.g. "/", "/Document"): default space, specified document (and default if empty), "view" action
265 // - 2 segments (e.g. "/Space/", "/Space/Document"): specified space, document (and default doc if empty),
266 // "view" action
267 // - 3 segments (e.g. "/action/Space/Document"): specified space, document (and default doc if empty),
268 // specified action
269 // - 4 segments (e.g. "/download/Space/Document/attachment"): specified space, document and attachment (and
270 // default doc if empty), "download" action
271 // - 4 segments or more (e.g. "/action/Space/Document/whatever/else"): specified space, document (and default
272 // doc if empty), specified "action" (if action != "download"), trailing segments ignored
273 {{/code}}
274
275 The new rules would become:
Eduard Moraru 29.2 276
Vincent Massol 28.1 277 * 0 segment (e.g. ""): default document reference, "view" action
278 * 1 segment (e.g. "/", "/Document"): default space (Main), specified document (and default if empty), "view" action
279 * 2 segments (e.g. "/Space/", "/Space/Document"): specified space, document (and default doc if empty "WebHome"), "view" action
Eduard Moraru 29.2 280 * 3 segments:
Vincent Massol 28.1 281 ** if ##xwiki.showviewaction=0## (e.g. "/Space1/Space2/Document"): "view" action. doc = Space1.Space2.Document
282 ** if ##xwiki.showviewaction=1## (e.g. "/action/Space1/Document"): specified action, doc = Space1.Document
283 * 4 segments or more:
284 ** if ##xwiki.showviewaction=0## (e.g. "/Space1/Space2/Space3/Document"): "view" action. doc = Space1.Space2.Space3.Document
Eduard Moraru 29.2 285 ** if ##xwiki.showviewaction=1## (e.g. "/action/Space1/Space2/Document", "/download/Space1/Document/attachment"):
Vincent Massol 28.1 286 *** if action == "download": doc = Space1.Document
287 *** if action != "download": doc = Space1.Space2.Document
288
Vincent Massol 16.2 289 = Questions =
290
291 * Regarding "Nested Documents":
Vincent Massol 21.1 292 ** Edy: This also implies a change on the rights system because any right change on a parent is inherited by all its children, so you can no longer add a right exception on a parent without it being inherited by all its children (i.e. this exception automatically becomes a rule for the children). One solution would be to extend the XWikiRights class and add a flag to state if the right should cascade or not.
293 *** Vincent: Thomas says this already exist and we already have XWikiRights and XWikiGlobalRights
294 ** Edy: Could the concept of Space be rather be replaced by the concept of Parent, where all (logical) pages have a direct and relative parent and not an absolute space path? (open question)
295 *** Vincent: Indeed the "space" column in the DB will become a "parent" column in the DB (with a different name since we already have a "parent" column used for parent/child relationship that will be turned off by default). Making it relative is possible but it would require adding another column with the full path since we need to be able to get the full reference of a document in a single DB query.
Vincent Massol 16.2 296
Vincent Massol 22.1 297 = Database Model =
298
Vincent Massol 33.1 299 Links to study:
Ecaterina Moraru (Valica) 49.1 300
Vincent Massol 33.1 301 * http://www.slideshare.net/billkarwin/sql-antipatterns-strike-back/48
302 * http://www.slideshare.net/billkarwin/sql-antipatterns-strike-back/68
303 * http://www.slideshare.net/billkarwin/sql-antipatterns-strike-back/77
304 * http://www.slideshare.net/billkarwin/sql-antipatterns-strike-back/76
305 * http://www.slideshare.net/billkarwin/models-for-hierarchical-data
306
Vincent Massol 26.5 307 == Nested Spaces ==
308
Vincent Massol 22.1 309 doc table:
Manuel Leduc 164.2 310 - doc name
Vincent Massol 25.2 311 - space local reference (existing column which currently is the space name but which will be modified to contain the space reference)
Vincent Massol 25.3 312 - space id (from space table) - New column
Vincent Massol 22.1 313
Vincent Massol 25.3 314 space table (new table):
Vincent Massol 22.1 315 - name
Thomas Mortagne 23.1 316 - parent (local reference)
Vincent Massol 22.1 317
318 Example:
319
320 3 documents:
Eduard Moraru 29.2 321
Vincent Massol 22.1 322 * space1.space2.space3.page1
323 * space1.space2.page2
324 * space2\..page3
325
326 {{code language="none"}}
Thomas Mortagne 25.1 327 doc id | name | space | space id
328 -------------------------------------------------------
329 1 | page1 | space1.space2.space3 | 3
330 2 | page2 | space1.space2 | 2
331 3 | page3 | space2\. | 4
Vincent Massol 22.1 332
333 space id | name | parent
334 ---------------------------------
335 1 | space1 |
336 2 | space2 | space1
337 3 | space3 | space1.space2
Vincent Massol 22.2 338 4 | space2. |
Vincent Massol 22.1 339 {{/code}}
340
341 * UC1: Single query to find all documents located in space "space2"
Manuel Leduc 164.2 342 ** {{code}}from doc, space where doc.spaceId = space.id and (space.name = "space2" or space.parent like "space2.%" or space.parent like "%.space2.%" or space.parent like "%.space2" or space.parent = "space2"){{/code}}
Vincent Massol 22.1 343 ** Note: escape "." in input before creating the query
344 ** Result: page1, page2
345
346 * UC2: Get all spaces under a given space (say "space1"), in a performant way (paged)
Manuel Leduc 164.2 347 ** {{code}}select name from space where parent like "space1.%" or parent like "%.space1.%" or parent like "%.space1" or parent = "space1"{{/code}}
Vincent Massol 22.1 348 ** Result: space2, space3
349
Vincent Massol 26.6 350 * UC3: Add a new document in an existing space: "page4" in space "space2"
351 ** In the space table find the space id for "space2" using the "name" column, i.e. "2"
Eduard Moraru 29.2 352 ** Add the new doc entry in the doc table, using "2" as the spaceid and set the existing "space" column to be the "space1.space2" full reference
Vincent Massol 26.6 353
354 * UC4: Move a existing document into a different existing space: "page1" in space "space1"
355 ** In a single DB transaction, do:
356 *** Check if there are any document left in space "space3" or below (the space of "page1" before the change) and if empty delete the space table entry for "space3"
357 *** Get the spaceid for space "space1"
358 *** Update the doc table entry for "page1"
359
360 * UC5: Add a new document into a new space: "page4" in space "space4"
Vincent Massol 26.5 361 ** TODO
Vincent Massol 22.1 362
Vincent Massol 32.2 363 === Problems ===
364
Vincent Massol 34.1 365 * <list any potential problems here>
Vincent Massol 32.2 366
Vincent Massol 26.5 367 == Nested Documents ==
Vincent Massol 22.1 368
Guillaume Delhumeau 44.1 369 See [[NestedDocuments]].
Vincent Massol 22.1 370
Vincent Massol 46.3 371 = Upgrade Guide =
Vincent Massol 22.1 372
Vincent Massol 46.3 373 This lists situations where the modifications brought by the Nested Spaces/Nested Documents implementation could cause problems when upgrading an existing XWiki and starting to use NS/ND:
Vincent Massol 32.2 374
Ramona Conoro 77.1 375 * The document ##space## field in the database (and the corresponding ##XWikiDocument#getSpace()## method) now contains the serialized space reference instead of the space name. In practice what it means is that ".", ":" and "\" characters are going to be escaped with a "\" (a migration will automatically update those entries in the database when upgrading). For example a space named ##Space:with.special\char## will be stored as##{{{Space\:with\.special\\char}}}##. If you are manipulating only the document DocumentReference then it won't make any difference but in some cases it might do some differences depending how to request or use the document space.
Thomas Mortagne 69.1 376 * Various other API follow this space name to space reference change:
377 ** ##XWiki#getSpaceDocsName## methods: the passes String is interpreted as the space reference (since it's compared to the field in the database)
Vincent Massol 46.2 378 * If you have an Extension which uses a query on the Space, for example {{code}}where doc.space = 'somespace'{{/code}} and the ##somespace## Space is moved (to ##otherspace.somespace## for example) then the Extension will not work properly anymore (this is because we store the full Space reference in there for NS). Thus you should move Extension Spaces only if the Extension supports this (for example by not hardcoding the Space). Said differently you should not consider that a moved Space has the same name than before.
Vincent Massol 38.1 379 * Extensions/code implementing ##XWikiURLFactory## (or extending classes implementing ##XWikiURLFactory## such as ##XWikiServletURLFactory##) will need to be modified to handle nested spaces passed in the ##space## parameter of the various APIs. Here's how to parse spaces passed as a String:(((
380 {{code language="java"}}
381 private EntityReferenceResolver<String> relativeEntityReferenceResolver =
382 Utils.getComponent(EntityReferenceResolver.TYPE_STRING, "relative");
383 ...
384 or
385 ...
386 @Inject
387 @Named("relative")
388 private EntityReferenceResolver<String> relativeEntityReferenceResolver;
389 ...
390 private List<String> extractSpaceNames(String spaces)
391 {
392 List<String> spaceNames = new ArrayList<>();
393 // Parse the spaces list into Space References
394 EntityReference spaceReference = this.relativeEntityReferenceResolver.resolve(spaces, EntityType.SPACE);
395 for (EntityReference reference : spaceReference.getReversedReferenceChain()) {
396 spaceNames.add(reference.getName());
397 }
398 return spaceNames;
399 }
400 {{/code}}
401 )))
Vincent Massol 37.1 402 * Extensions/code implementing ##ExportURLFactoryActionHandler## will also need to be modified to handle nested spaces passed in the ##space## parameter.
Vincent Massol 40.1 403 * Extensions/code implementing ##EntityReferenceSerializer## or ##DocumentReferenceResolver## must now handle nested spaces (in the past they were already supposed to handle Nested Spaces but since it was not used they could take shortcuts and it wasn't visible. It's now going to fail, see [[XWIKI-12191>>http://jira.xwiki.org/browse/XWIKI-12191]]).
Vincent Massol 63.1 404 * If your code or Extension uses the Parent/Child relationship (and uses ##Document#get/setParent()##) then you should know that this feature is being deprecated (and is disabled by default) since it's replaced by the Nested Spaces feature (and hierarchy is now set in the Document References). Thus you'll need to adapt your code to use the Document Reference instead (and API like ##DocumentReference.getLastSpaceReference()##).
Thomas Mortagne 69.1 405
406 Not fully decided yet:
407
408 * The ##space## parameter of the ##XWiki.getSpacePreference(String preference, String space, String defaultValue, XWikiContext context)## method is now accepting a nested space reference (e.g. ##A.B.C##). Similar to point 1 above.

Get Connected