On Apr 6, 2009, at 11:46 AM, Anca Paula Luca wrote: > Anca Paula Luca wrote: >> Hi developers, >> >> I would like to refactor >> >> String getURL(String documentName, String action, String >> queryString, String >> anchor) >> >> in the DocumentAccessBridge (whose documentName is actually used as >> a document >> fullName) to >> >> String getURL(DocumentName documentName, String action, String >> queryString, >> String anchor) >> >> and implement multiwiki support for it, since now it uses >> XWiki.getURL() which >> uses current context wiki to generate the URL. > > it does actually work for multiwiki, through > XWikiDocument.setFullName() which > parses the fullName as a full reference (wiki too), which we should > probably > also refactor to use the new DocumentNameFactory() for parsing.
I left it voluntarily untouched. The factory doesn't do exactly as setFullName() does since it fixes several bugs of setFullName(). I think it's dangerous to touch setFullName(). Thus if there's code expecting the call to fail under some circumstances it won't work anymore since it won't fail with the factory. Some examples that are failing in setFullName (there are more): hello.world:something hello:world hello: -Vincent >> The calls to current function would be transformed in: >> >> DocumentNameFactory docNameFactory = ... >> getURL(docNameFactory.createDocumentName(fullName), ...) >> >> which will have the same result as before. >> >> Since we will need to change all internal reference to documents in >> DocumentNames instead of fullNames as Strings, this would be a step >> in this >> direction, facilitated by the new DocumentNameSerializer and >> DocumentNameFactory. >> >> Here's my +1 >> WDYT? >> >> Thanks, >> Anca Luca >> _______________________________________________ >> devs mailing list >> [email protected] >> http://lists.xwiki.org/mailman/listinfo/devs > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

