On Mar 23, 2009, at 3:01 PM, asiri (SVN) wrote:
> Author: asiri
> Date: 2009-03-23 15:01:31 +0100 (Mon, 23 Mar 2009)
> New Revision: 17925
>
> Modified:
> platform/core/trunk/xwiki-bridge/src/main/java/org/xwiki/bridge/
> DocumentModelBridge.java
> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/doc/
> XWikiDocument.java
> Log:
> XWIKI-3427: Introduce DocumentModelBridge.setParent() method
>
> * Implemented.
>
> Modified: platform/core/trunk/xwiki-bridge/src/main/java/org/xwiki/
> bridge/DocumentModelBridge.java
> ===================================================================
> --- platform/core/trunk/xwiki-bridge/src/main/java/org/xwiki/bridge/
> DocumentModelBridge.java 2009-03-23 13:20:50 UTC (rev 17924)
> +++ platform/core/trunk/xwiki-bridge/src/main/java/org/xwiki/bridge/
> DocumentModelBridge.java 2009-03-23 14:01:31 UTC (rev 17925)
> @@ -30,6 +30,13 @@
> public interface DocumentModelBridge
> {
> /**
> + * Sets the parent document attribute of this document to the
> given value.
> + *
> + * @param parent the {...@link DocumentModelBridge} representing
> the parent document.
> + */
> + void setParent(DocumentModelBridge parent);
> +
> + /**
> * Retrieve the full name of the document, in the
> <code>Space.Name</code> format, for example <tt>Main.WebHome</tt>.
> *
> * @return A <code>String</code> representation of the
> document's full name.
>
> 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-03-23 13:20:50 UTC (rev 17924)
> +++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/doc/
> XWikiDocument.java 2009-03-23 14:01:31 UTC (rev 17925)
> @@ -567,6 +567,14 @@
> this.name = name;
> }
>
> + /**
> + * {...@inheritdoc}
> + */
> + public void setParent(DocumentModelBridge parent)
> + {
> + this.parent = parent.getFullName();
> + }
> +
This looks strange and not corredct. I don't understand this since
there's already a setParent() and it looks confusing to me. Why do you
need to pass a DocumentModelBridge instead of a string (which already
exists)?
Thanks
-Vincent
>
> public String getFullName()
> {
> StringBuffer buf = new StringBuffer();
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs