[Yanel-commits] rev 22601 - public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources

michi at wyona.com michi at wyona.com
Tue Feb 13 09:09:27 CET 2007


Author: michi
Date: 2007-02-13 09:09:08 +0100 (Tue, 13 Feb 2007)
New Revision: 22601

Modified:
   public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
Log:
XML resource made creatable

Modified: public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
===================================================================
--- public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java	2007-02-12 22:16:57 UTC (rev 22600)
+++ public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java	2007-02-13 08:09:08 UTC (rev 22601)
@@ -21,6 +21,7 @@
 import org.wyona.yanel.core.ResourceConfiguration;
 import org.wyona.yanel.core.Topic;
 import org.wyona.yanel.core.Yanel;
+import org.wyona.yanel.core.api.attributes.CreatableV2;
 import org.wyona.yanel.core.api.attributes.ModifiableV2;
 import org.wyona.yanel.core.api.attributes.VersionableV2;
 import org.wyona.yanel.core.api.attributes.ViewableV1;
@@ -67,7 +68,7 @@
 /**
  *
  */
-public class XMLResource extends Resource implements ViewableV2, ModifiableV2, VersionableV2 {
+public class XMLResource extends Resource implements ViewableV2, ModifiableV2, VersionableV2, CreatableV2 {
 
     private static Category log = Category.getInstance(XMLResource.class);
 
@@ -96,7 +97,7 @@
         String mimeType = getMimeType(getPath(), viewId);
         defaultView.setMimeType(mimeType);
 
-        String yanelPath = getProperty("yanel-path");
+        String yanelPath = getResourceConfigProperty("yanel-path");
         //if (yanelPath == null) yanelPath = path.toString();
 
         String xsltPath = getXSLTPath(getPath());
@@ -201,7 +202,7 @@
      * Get mime type
      */
     private String getMimeType(String path, String viewId) throws Exception {
-        String mimeType = getProperty("mime-type");
+        String mimeType = getResourceConfigProperty("mime-type");
         if (mimeType != null) return mimeType;
 
         String suffix = PathUtil.getSuffix(path);
@@ -278,7 +279,7 @@
      * Get XSLT path
      */
     private String getXSLTPath(String path) throws Exception {
-        String xsltPath = getProperty("xslt");
+        String xsltPath = getResourceConfigProperty("xslt");
         if (xsltPath != null) return xsltPath;
         log.info("No XSLT Path within: " + path);
         return null;
@@ -413,9 +414,55 @@
     /**
      * Get property value from resource configuration
      */
-    private String getProperty(String name) throws Exception {
+    private String getResourceConfigProperty(String name) throws Exception {
         ResourceConfiguration rc = getConfiguration();
         if (rc != null) return rc.getProperty(name);
         return getRTI().getProperty(name);
     }
+
+    /**
+     *
+     */
+    public void create(HttpServletRequest request) {
+        log.warn("Not implemented yet!");
+    }
+
+    /**
+     *
+     */
+    public java.util.HashMap createRTIProperties(HttpServletRequest request) {
+        log.warn("Not implemented yet!");
+        return null;
+    }
+
+    /**
+     *
+     */
+    public String getPropertyType(String name) {
+        log.warn("Not implemented yet!");
+        return null;
+    }
+
+    /**
+     *
+     */
+    public Object getProperty(String name) {
+        log.warn("Not implemented yet!");
+        return null;
+    }
+
+    /**
+     *
+     */
+    public String[] getPropertyNames() {
+        log.warn("Not implemented yet!");
+        return null;
+    }
+
+    /**
+     *
+     */
+    public void setProperty(String name, Object value) {
+        log.warn("Not implemented yet!");
+    }
 }




More information about the Yanel-commits mailing list