[Yanel-commits] rev 21038 - in public/yanel/trunk/src: contributions/resources/atom-entry/src/java/org/wyona/yanel/impl/resources contributions/resources/davcollection/src/java/org/wyona/yanel/impl/resources resources/file/src/java/org/wyona/yanel/impl/resources resources/xml/src/java/org/wyona/yanel/impl/resources

josias at wyona.com josias at wyona.com
Wed Dec 20 15:19:40 CET 2006


Author: josias
Date: 2006-12-20 15:19:39 +0100 (Wed, 20 Dec 2006)
New Revision: 21038

Modified:
   public/yanel/trunk/src/contributions/resources/atom-entry/src/java/org/wyona/yanel/impl/resources/AtomEntryResource.java
   public/yanel/trunk/src/contributions/resources/davcollection/src/java/org/wyona/yanel/impl/resources/DavCollection.java
   public/yanel/trunk/src/resources/file/src/java/org/wyona/yanel/impl/resources/FileResource.java
   public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
Log:
applied patch for bug #5071: implementation of getSize() method, as it is now supported by yarep. thanks to Paloma.

Modified: public/yanel/trunk/src/contributions/resources/atom-entry/src/java/org/wyona/yanel/impl/resources/AtomEntryResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/atom-entry/src/java/org/wyona/yanel/impl/resources/AtomEntryResource.java	2006-12-20 14:16:46 UTC (rev 21037)
+++ public/yanel/trunk/src/contributions/resources/atom-entry/src/java/org/wyona/yanel/impl/resources/AtomEntryResource.java	2006-12-20 14:19:39 UTC (rev 21038)
@@ -287,11 +287,11 @@
         return true;
     }
 
-    public long getSize() throws Exception {
-        // TODO not implemented yet
-        log.error("Method is not implemented yet");
-        return -1;
-    }
-
-
+    /**
+     * 
+     */
+     public long getSize() throws Exception {
+         return getRealm().getRepository().getSize(path);
+     }
+       
 }

Modified: public/yanel/trunk/src/contributions/resources/davcollection/src/java/org/wyona/yanel/impl/resources/DavCollection.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/davcollection/src/java/org/wyona/yanel/impl/resources/DavCollection.java	2006-12-20 14:16:46 UTC (rev 21037)
+++ public/yanel/trunk/src/contributions/resources/davcollection/src/java/org/wyona/yanel/impl/resources/DavCollection.java	2006-12-20 14:19:39 UTC (rev 21038)
@@ -179,10 +179,10 @@
         return false;
     }
 
-    public long getSize() throws Exception {
-        // TODO not implemented yet
-        log.error("Method is not implemented yet");
-        return -1;
-    }
-
+    /**
+     * 
+     */
+     public long getSize() throws Exception {
+         return getRealm().getRepository().getSize(path);
+     }
 }

Modified: public/yanel/trunk/src/resources/file/src/java/org/wyona/yanel/impl/resources/FileResource.java
===================================================================
--- public/yanel/trunk/src/resources/file/src/java/org/wyona/yanel/impl/resources/FileResource.java	2006-12-20 14:16:46 UTC (rev 21037)
+++ public/yanel/trunk/src/resources/file/src/java/org/wyona/yanel/impl/resources/FileResource.java	2006-12-20 14:19:39 UTC (rev 21038)
@@ -188,11 +188,10 @@
         return true; 
     }
 
-    public long getSize() throws Exception {
-        // TODO not implemented yet
-        log.error("Method is not implemented yet");
-        return -1;
-    }
-
-    
+    /**
+     * 
+     */
+     public long getSize() throws Exception {
+         return getRealm().getRepository().getSize(path);
+     }    
 }

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	2006-12-20 14:16:46 UTC (rev 21037)
+++ public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java	2006-12-20 14:19:39 UTC (rev 21038)
@@ -293,8 +293,6 @@
      * Get size of generated page
      */
     public long getSize() throws Exception {
-        // TODO: not implemented yet
-        log.warn("TODO: Method is not implemented yet");
-        return -1;
+        return getRealm().getRepository().getSize(path);
     }
 }




More information about the Yanel-commits mailing list