[Yanel-commits] rev 30333 - public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources

michi at wyona.com michi at wyona.com
Sun Jan 13 16:34:40 CET 2008


Author: michi
Date: 2008-01-13 16:34:39 +0100 (Sun, 13 Jan 2008)
New Revision: 30333

Modified:
   public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java
Log:
use getResourceConfigProperty instead getRTI

Modified: public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java	2008-01-13 15:17:31 UTC (rev 30332)
+++ public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java	2008-01-13 15:34:39 UTC (rev 30333)
@@ -55,7 +55,12 @@
      */
     public String getMimeType(String viewId) {
         if(viewId == null) {
-            String mimeType = getRTI().getProperty("mime-type");
+            String mimeType = null;
+            try {
+                mimeType = getResourceConfigProperty("mime-type");
+            } catch (Exception e) {
+                log.error(e, e);
+            }
             if (mimeType != null) {
                 return mimeType;
             } else {
@@ -85,9 +90,9 @@
      * @param viewId xml, ics, xhtml
      */
     public View getView(String viewId) throws Exception {
-        String categories = getRTI().getProperty("categories");
-        String classes = getRTI().getProperty("classes");
-        String userIds = getRTI().getProperty("user-ids");
+        String categories = getResourceConfigProperty("categories");
+        String classes = getResourceConfigProperty("classes");
+        String userIds = getResourceConfigProperty("user-ids");
         log.error("DEBUG: " + categories + " " + classes + " " + userIds);
 
         org.wyona.yarep.core.Repository dataRepo = getRealm().getRepository();
@@ -105,7 +110,7 @@
         }
 
 
-        String eventsPath = getRTI().getProperty("events-path");
+        String eventsPath = getResourceConfigProperty("events-path");
         if (eventsPath == null) {
             eventsPath = getPath();
         }
@@ -223,7 +228,7 @@
                 event = new CalendarEvent();
             } else if (line.startsWith("END:VEVENT")) {
                 log.error("DEBUG: Write event " + event.getUID() + ", " + event.toXML());
-                Writer out = getRealm().getRepository().getWriter(new org.wyona.yarep.core.Path(getRTI().getProperty("events-path") + "/" + event.getUID() + ".xml"));
+                Writer out = getRealm().getRepository().getWriter(new org.wyona.yarep.core.Path(getResourceConfigProperty("events-path") + "/" + event.getUID() + ".xml"));
                 out.write(event.toXML());
                 out.close();
                 event = null;



More information about the Yanel-commits mailing list