Author: tmortagne
Date: 2007-10-04 17:48:36 +0200 (Thu, 04 Oct 2007)
New Revision: 5286

Modified:
   
xwiki-platform/xwiki-plugins/trunk/application-manager/src/main/java/com/xpn/xwiki/plugin/applicationmanager/doc/XWikiApplication.java
   
xwiki-platform/xwiki-plugins/trunk/application-manager/src/main/java/com/xpn/xwiki/plugin/applicationmanager/doc/XWikiApplicationClass.java
Log:
"Unhide" docsToLink list to be used with #includeTopic velocity macro.

Modified: 
xwiki-platform/xwiki-plugins/trunk/application-manager/src/main/java/com/xpn/xwiki/plugin/applicationmanager/doc/XWikiApplication.java
===================================================================
--- 
xwiki-platform/xwiki-plugins/trunk/application-manager/src/main/java/com/xpn/xwiki/plugin/applicationmanager/doc/XWikiApplication.java
      2007-10-04 15:47:26 UTC (rev 5285)
+++ 
xwiki-platform/xwiki-plugins/trunk/application-manager/src/main/java/com/xpn/xwiki/plugin/applicationmanager/doc/XWikiApplication.java
      2007-10-04 15:48:36 UTC (rev 5286)
@@ -221,7 +221,7 @@
      * wiki template.
      * 
      * @param docstoinclude the new list of document application contains that 
will be included in
-     *            place of copy from wiki template.
+     *            place of copy from a wiki template.
      * @see #getDocsToInclude()
      */
     public void setDocsToInclude(List docstoinclude)
@@ -229,17 +229,28 @@
         setListValue(XWikiApplicationClass.FIELD_docstoinclude, docstoinclude);
     }
 
-    /* TODO : add support for real linked documents in xwiki-core to be able 
to use it 
+    /**
+     * @return the list of document application contains that will be linked 
in place of copy from a
+     *         wiki template.
+     * @see #setDocsToLink(List)
+     */
     public List getDocsToLink()
     {
         return getListValue(XWikiApplicationClass.FIELD_docstolink);
     }
 
+    /**
+     * Modify the list of document application contains that will be included 
in place of copy from
+     * wiki template.
+     * 
+     * @param docstolink the new list of document application contains that 
will be linked in place
+     *            of copy from a wiki template.
+     * @see #getDocsToLink()
+     */
     public void setDocsToLink(List docstolink)
     {
         setListValue(XWikiApplicationClass.FIELD_docstolink, docstolink);
     }
-    */
 
     /**
      * @return the list of documents containing translations strings.
@@ -493,7 +504,7 @@
      * @param applications the applications containing documents names to 
resolve and add to
      *            <code>docsNames</code>.
      * @param recurse if true it follow recursively all applications 
dependencies, if false parse
-     *            only direct dependencies.
+     *            only provided applications.
      * @param context the XWiki context.
      * @return all documents names to include <code>applications</code> 
contains.
      * @throws XWikiException
@@ -511,9 +522,7 @@
         return docsToInclude;
     }
 
-    /*
-     * TODO : add support for real linked documents in xwiki-core to be able 
to use it 
-     * 
+    /**
      * Get and resolve all documents names to link application contains.
      * <p>
      * For each of these documents names, if are between "[" and "]", are 
considered as SQL matching
@@ -527,9 +536,36 @@
      * @see #getDocsToLink()
      * @see XWikiApplicationClass#FIELD_docstolink
      */
-    /* TODO : add support for real linked documents in xwiki-core to be able 
to use it 
     public Set getDocsNameToLink(boolean recurse, XWikiContext context) throws 
XWikiException
     {
         return getDocsNameSet(XWikiApplicationClass.FIELD_docstolink, recurse, 
false, context);
-    }*/
+    }
+
+    /**
+     * Get and resolve all documents names to link <code>applications</code> 
XWikiApplication list
+     * contains.
+     * <p>
+     * For each of these documents names, if are between "[" and "]", are 
considered as SQL matching
+     * string to use with "like".
+     * 
+     * @param applications the applications containing documents names to 
resolve and add to
+     *            <code>docsNames</code>.
+     * @param recurse if true it follow recursively all applications 
dependencies, if false parse
+     *            only provided applications.
+     * @param context the XWiki context.
+     * @return all documents names to link <code>applications</code> contains.
+     * @throws XWikiException
+     * @see #getDocsToLink()
+     * @see XWikiApplicationClass#FIELD_docstolink
+     */
+    public static Set getDocsNameToLink(Collection applications, boolean 
recurse,
+        XWikiContext context) throws XWikiException
+    {
+        Set docsToLink = new HashSet();
+
+        resolveApplicationsDocsNames(docsToLink, applications,
+            XWikiApplicationClass.FIELD_docstolink, false, context);
+
+        return docsToLink;
+    }
 }

Modified: 
xwiki-platform/xwiki-plugins/trunk/application-manager/src/main/java/com/xpn/xwiki/plugin/applicationmanager/doc/XWikiApplicationClass.java
===================================================================
--- 
xwiki-platform/xwiki-plugins/trunk/application-manager/src/main/java/com/xpn/xwiki/plugin/applicationmanager/doc/XWikiApplicationClass.java
 2007-10-04 15:47:26 UTC (rev 5285)
+++ 
xwiki-platform/xwiki-plugins/trunk/application-manager/src/main/java/com/xpn/xwiki/plugin/applicationmanager/doc/XWikiApplicationClass.java
 2007-10-04 15:48:36 UTC (rev 5286)
@@ -261,8 +261,7 @@
 
             needsUpdate = true;
         }
-
-        /* TODO : add support for real linked documents in xwiki-core to be 
able to use it 
+ 
         if (baseClass.addStaticListField(FIELD_docstolink, FIELDPN_docstolink, 
80, true, "",
             "input")) {
 
@@ -275,7 +274,6 @@
 
             needsUpdate = true;
         }
-        */
 
         if (baseClass.addStaticListField(FIELD_translationdocs, 
FIELDPN_translationdocs, 80,
             true, "", "input")) {

_______________________________________________
notifications mailing list
notifications@xwiki.org
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to