The codebase of each says that:
- DocumentReference
- Represents a reference to a document (wiki, space and document names)
- PageReference
- Represents a reference to a page. Note that nested pages are supported.
- WikiReference
- Represents a reference to a wiki (wiki name). This is the topmost reference and it doesn’t have a parent reference.
The definitions of the first two are circular, and leads to the question:
- What is difference between document and page?
I vaguely understand what WikiReference
is, but then it confuses with another class called XWikiDocument
. I think XWikiDocument
is the visible page, the front end — and its backend is XWikiReference
. In that sense, they’re related. Is that understanding correct?
Please help me understand these classes.
Also, if I want to programmatically create wiki pages like:
/view/Users/Sarfaraz_Nawaz
/view/Users/Idan_Nawaz
Which set of classes do I need to look at? In the above scheme of pages, my current understanding is that Users
is a space and Sarfaraz_Nawaz
is the page? I’m not trying to create user-profiles but user-pages. By profile, I mean /view/XWiki/Sarfaraz_Nawaz
(which I’m already able to create) and for each such profile, I want to create a page /view/Users/Sarfaraz_Nawaz
(which allows nested pages) — something like Home page for the user.