[Yanel-dev] Patch re getResourceConfigProperty

Michael Wechner michael.wechner at wyona.com
Mon May 14 23:07:43 CEST 2007


Hi

Just to better understand I wanted to ask if the following patch is to 
simplify accessing ResourceConfiguration properties (please see below), 
right?

Thanks

Michi

--- src/core/java/org/wyona/yanel/core/Resource.java    (revision 24452)
+++ src/core/java/org/wyona/yanel/core/Resource.java    (working copy)
@@ -260,4 +260,23 @@
         return language;
     }

+    /**
+     * Get property value from resource configuration
+     */
+    public String getResourceConfigProperty(String name) throws Exception {
+        ResourceConfiguration rc = getConfiguration();
+        if (rc != null) return rc.getProperty(name);
+        return getRTI().getProperty(name);
+    }
+
+    /**
+     * Get property value from resource configuration
+     */
+    public String[] getResourceConfigProperties(String name) throws 
Exception {
+        ResourceConfiguration rc = getConfiguration();
+        if (rc != null) return rc.getProperties(name);
+        return getRTI().getProperties(name);
+    }
+
+
 }

-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner at wyona.com                        michi at apache.org
+41 44 272 91 61




More information about the Yanel-development mailing list