On Jun 3, 2009, at 6:45 AM, asiri (SVN) wrote:
> Author: asiri
> Date: 2009-06-03 06:45:22 +0200 (Wed, 03 Jun 2009)
> New Revision: 20727
>
> Modified:
> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/doc/
> XWikiDocument.java
> Log:
> [misc] Made setParent() method use a compact document name
> serializer instead of the toString() method in DocumentName class.
>
> Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/
> doc/XWikiDocument.java
> ===================================================================
> --- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/doc/
> XWikiDocument.java 2009-06-03 00:14:00 UTC (rev 20726)
> +++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/doc/
> XWikiDocument.java 2009-06-03 04:45:22 UTC (rev 20727)
> @@ -605,7 +605,9 @@
> */
> public void setParent(DocumentName parentName)
> {
> - this.parent = parentName.toString();
> + DocumentNameSerializer serializer =
> + (DocumentNameSerializer)
> Utils.getComponent(DocumentNameSerializer.class, "compact");
> + this.parent = serializer.serialize(parentName);
> }
>
> public String getFullName()
> @@ -3154,10 +3156,10 @@
>
> public List<String> getChildren(XWikiContext context) throws
> XWikiException
> {
> - String[] whereParams = { this.getWikiName() + ":" +
> this.getFullName(), this.getFullName(), this.getName(),
> - this.getSpace() };
> -
> - String whereStatement = "doc.parent=? or doc.parent=? or
> (doc.parent=? and doc.space=?)";
> + String[] whereParams =
> + {this.getWikiName() + ":" + this.getFullName(),
> this.getFullName(), this.getName(), this.getSpace()};
> +
> + String whereStatement = "doc.parent=? or doc.parent=? or
> (doc.parent=? and doc.space=?)";
> return
> context.getWiki().getStore().searchDocumentsNames(whereStatement,
> Arrays.asList(whereParams), context);
> }
>
> @@ -3953,10 +3955,7 @@
> * renaming algorithm takes into account the fact that there are
> several ways to write a link to a given page and
> * all those forms need to be renamed. For example the following
> links all point to the same page:
> * <ul>
> - * <li>[Page]</li>
> - * <li>[Page?param=1]</li>
> - * <li>[currentwiki:Page]</li>
> - * <li>[CurrentSpace.Page]</li>
> + * <li>[Page]</li> <li>[Page?param=1]</li>
> <li>[currentwiki:Page]</li> <li>[CurrentSpace.Page]</li>
Can you put back the nicely formatted javadoc?
Thanks
-Vincent
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs