[Yanel-commits] rev 25860 - public/yanel/trunk/src/realms/jsp-wiki/resources/jsp-wiki-resource/src/java/org/wyona/yanel/impl/resources

michi at wyona.com michi at wyona.com
Tue Jul 10 11:30:11 CEST 2007


Author: michi
Date: 2007-07-10 11:30:11 +0200 (Tue, 10 Jul 2007)
New Revision: 25860

Modified:
   public/yanel/trunk/src/realms/jsp-wiki/resources/jsp-wiki-resource/src/java/org/wyona/yanel/impl/resources/JSPWikiResource.java
Log:
get data path fixed

Modified: public/yanel/trunk/src/realms/jsp-wiki/resources/jsp-wiki-resource/src/java/org/wyona/yanel/impl/resources/JSPWikiResource.java
===================================================================
--- public/yanel/trunk/src/realms/jsp-wiki/resources/jsp-wiki-resource/src/java/org/wyona/yanel/impl/resources/JSPWikiResource.java	2007-07-10 09:17:44 UTC (rev 25859)
+++ public/yanel/trunk/src/realms/jsp-wiki/resources/jsp-wiki-resource/src/java/org/wyona/yanel/impl/resources/JSPWikiResource.java	2007-07-10 09:30:11 UTC (rev 25860)
@@ -118,7 +118,8 @@
             path2Resource = path2Resource.substring(0, path2Resource.lastIndexOf("/") + 1);
             
             String wikiParserBeanId = getWikiSyntax(path);
-            InputStream inputStream = dataRepo.getInputStream(new org.wyona.yarep.core.Path(getPath()));
+            InputStream inputStream = dataRepo.getInputStream(getJSPWikiPath());
+            //InputStream inputStream = dataRepo.getInputStream(new org.wyona.yarep.core.Path(getPath()));
             IWikiParser wikiParser = (IWikiParser) yanel.getBeanFactory().getBean(wikiParserBeanId);
             wikiParser.parse(inputStream);
             
@@ -421,10 +422,11 @@
     }
 
     /**
-     *
+     * Get output stream in order to write new content (jsp wiki syntax)
      */
     public OutputStream getOutputStream() throws Exception {
-        return getRealm().getRepository().getOutputStream(new Path(getPath()));
+        return getRealm().getRepository().getOutputStream(getJSPWikiPath());
+        //return getRealm().getRepository().getOutputStream(new Path(getPath()));
     }
 
     /**
@@ -449,4 +451,14 @@
     public void write(InputStream in) {
         log.warn("No implemented yet!");
     }
+
+    /**
+     *
+     */
+    private org.wyona.yarep.core.Path getJSPWikiPath() {
+        String path = getPath();
+        path = path.substring(0, path.lastIndexOf(".")) + ".txt";
+        log.error("DEBUG: JSP Wiki Path: " + path);
+        return new org.wyona.yarep.core.Path(path);
+    }
 }




More information about the Yanel-commits mailing list