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

michi at wyona.com michi at wyona.com
Sun Mar 7 16:59:27 CET 2010


Author: michi
Date: 2010-03-07 16:59:26 +0100 (Sun, 07 Mar 2010)
New Revision: 47965

Modified:
   public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/calendar/CalendarResource.java
Log:
get last modified and get size implemented for ics suffix

Modified: public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/calendar/CalendarResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/calendar/CalendarResource.java	2010-03-07 15:54:37 UTC (rev 47964)
+++ public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/calendar/CalendarResource.java	2010-03-07 15:59:26 UTC (rev 47965)
@@ -45,11 +45,16 @@
     }
 
     /**
-     *
+     * @see
      */
     public long getSize() throws Exception {
-        log.warn("Not implemented yet!");
-        return -1;
+        Repository dataRepo = getRealm().getRepository();
+        if (dataRepo.existsNode(getPath()) && dataRepo.isResource(new org.wyona.yarep.core.Path(getPath()))) {
+            return dataRepo.getNode(getPath()).getSize();
+        } else {
+            log.warn("Not implemented yet!");
+            return -1;
+        }
     }
 
     /**
@@ -194,7 +199,7 @@
     }
 
     /**
-     *
+     * @see
      */
     public ViewDescriptor[] getViewDescriptors() {
         log.warn("Not implemented yet!");
@@ -210,11 +215,16 @@
     }
 
     /**
-     *
+     * @see
      */
     public long getLastModified() throws Exception {
-        log.warn("Not implemented yet!");
-        return -1;
+        Repository dataRepo = getRealm().getRepository();
+        if (dataRepo.existsNode(getPath()) && dataRepo.isResource(new org.wyona.yarep.core.Path(getPath()))) {
+            return dataRepo.getNode(getPath()).getLastModified();
+        } else {
+            log.warn("Not implemented yet!");
+            return -1;
+        }
     }
 
     /**



More information about the Yanel-commits mailing list