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

michi at wyona.com michi at wyona.com
Tue Jan 23 14:14:06 CET 2007


Author: michi
Date: 2007-01-23 14:14:04 +0100 (Tue, 23 Jan 2007)
New Revision: 22053

Modified:
   public/yanel/trunk/src/resources/file/src/java/org/wyona/yanel/impl/resources/NodeResource.java
Log:
try to get property from resource config

Modified: public/yanel/trunk/src/resources/file/src/java/org/wyona/yanel/impl/resources/NodeResource.java
===================================================================
--- public/yanel/trunk/src/resources/file/src/java/org/wyona/yanel/impl/resources/NodeResource.java	2007-01-23 13:13:34 UTC (rev 22052)
+++ public/yanel/trunk/src/resources/file/src/java/org/wyona/yanel/impl/resources/NodeResource.java	2007-01-23 13:14:04 UTC (rev 22053)
@@ -18,6 +18,7 @@
 
 import org.wyona.yanel.core.Path;
 import org.wyona.yanel.core.Resource;
+import org.wyona.yanel.core.ResourceConfiguration;
 import org.wyona.yanel.core.Topic;
 import org.wyona.yanel.core.api.attributes.CreatableV2;
 import org.wyona.yanel.core.api.attributes.ModifiableV2;
@@ -77,7 +78,14 @@
      */
     private String getMimeType(String viewId) throws Exception {
         
-        String mimeType = getRTI().getProperty("mime-type");
+        String mimeType = null;
+        ResourceConfiguration resConfig = getConfiguration();
+        if (resConfig != null) {
+            mimeType = resConfig.getProperty("mime-type");
+        } else {
+            log.warn("Depracted: " + getPath());
+            mimeType = getRTI().getProperty("mime-type");
+        }
         
         if (mimeType != null) return mimeType;
 




More information about the Yanel-commits mailing list