Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-4264

Improve Bridge module API

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 2.0 RC1
    • 2.0 M4
    • {Unused} Core
    • 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))

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: