r1547 - xwiki/trunk/core/src/main/java/com/xpn/xwiki/plugin/zipexplorer

Vincent Massol vmassol at users.forge.objectweb.org
Tue Nov 14 12:08:15 CET 2006


Author: vmassol
Date: 2006-11-14 12:08:14 +0100 (Tue, 14 Nov 2006)
New Revision: 1547

Modified:
   xwiki/trunk/core/src/main/java/com/xpn/xwiki/plugin/zipexplorer/ZipExplorerPlugin.java
Log:
Added javadoc for downloadAttachment()

Modified: xwiki/trunk/core/src/main/java/com/xpn/xwiki/plugin/zipexplorer/ZipExplorerPlugin.java
===================================================================
--- xwiki/trunk/core/src/main/java/com/xpn/xwiki/plugin/zipexplorer/ZipExplorerPlugin.java	2006-11-14 08:57:20 UTC (rev 1546)
+++ xwiki/trunk/core/src/main/java/com/xpn/xwiki/plugin/zipexplorer/ZipExplorerPlugin.java	2006-11-14 11:08:14 UTC (rev 1547)
@@ -89,6 +89,17 @@
         return path.substring(pos + 1);
     }
 
+    /**
+     * For ZIP URLs of the format <code>http://[...]/zipfile.zip/SomeDirectory/SomeFile.txt</code> return a new
+     * attachment containing the file pointed to inside the ZIP. If the original attachment does not point to a ZIP
+     * file or if it doesn't specify a location inside the ZIP then do nothing and return the original attachment.
+     *
+     * @param attachment the original attachment
+     * @param context the XWiki context object containing the requested URL
+     * @return a new attachment pointing to the file pointed to by the URL inside the ZIP or the original attachment
+     *         if the requested URL doesn't specify a file inside a ZIP
+     * @see com.xpn.xwiki.plugin.XWikiDefaultPlugin#downloadAttachment(com.xpn.xwiki.doc.XWikiAttachment, com.xpn.xwiki.XWikiContext) 
+     */
     public XWikiAttachment downloadAttachment(XWikiAttachment attachment, XWikiContext context) {
         String url = context.getRequest().getRequestURI();
         String filename;





More information about the Xwiki-notifications mailing list