Details
-
Task
-
Resolution: Fixed
-
Major
-
2.0 M4
-
None
-
Unit
-
Unknown
-
Description
From the mailing list, see http://markmail.org/thread/u7cdl5xlf5ll4m6d
- Introduce new CurrentDocumentNameFactory which extends DefaultDocumentNameFactory but instead of using "WebHome" if the page name is not specified, it uses the current document page name.
- Introduce AttachmentNameFactory to parse syntax of the form: wiki:space.page@filename
- Deprecate in DAB: "String getAttachmentURL(String documentName, String attachmentName);" and instead replace it with "String getAttachmentURL(AttachmentName attachmentName);"
- Add in DAB: "List<String> getAttachmentURLs(DocumentName documentName) throws Exception;" to return all attachments
- I also want to fix AttachmentName which shouldn't extend DocumentName but instead use it by composition (it's not used right now).
Note: In the future, we'll also deprecate all *URL() methods in DAB since the correct way will be to write:
- DocumentName (or AttachmentName)
- new XWikiDocumentURL(DocumentName) (or new XWikiAttachmentURL(AttachmentName))
- DocumentNameSerializer.serialize(xwikiDocumentURL) --> URL (or AttachmentNameSerializer.serialize(xwikiAttachmentURL))