roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r583871 - in /roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol: EntryCollection.java MediaCollection.java RollerAtomHandler.java
Date Thu, 11 Oct 2007 16:32:34 GMT
Author: snoopdave
Date: Thu Oct 11 09:32:32 2007
New Revision: 583871

URL: http://svn.apache.org/viewvc?rev=583871&view=rev
Log:
Fixes to eliminate APE errors introduced by refactoring

Modified:
    roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/EntryCollection.java
    roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java
    roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java

Modified: roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/EntryCollection.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/EntryCollection.java?rev=583871&r1=583870&r2=583871&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/EntryCollection.java
(original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/EntryCollection.java
Thu Oct 11 09:32:32 2007
@@ -118,7 +118,7 @@
                 }
             }
             log.error("ERROR: no edit link found in saved media entry");
-            log.debug("Exiting");
+            log.debug("Exiting via exception");
 
         } catch (WebloggerException re) {
             throw new AtomException("Posting entry", re);
@@ -291,9 +291,13 @@
                 roller.flush();
                 return;
             }
+            log.debug("Not authorized to delete entry"); 
+            log.debug("Exiting via exception"); 
+            
         } catch (WebloggerException ex) {
             throw new AtomException("ERROR deleting entry",ex);
         }
+        throw new AtomNotAuthorizedException("Not authorized to delete entry");
     }
 
     

Modified: roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java?rev=583871&r1=583870&r2=583871&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java
(original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java
Thu Oct 11 09:32:32 2007
@@ -350,6 +350,7 @@
                     fis.close();
                     
                     log.debug("Exiting");
+                    return;
 
                 } catch (FileIOException fie) {
                     throw new AtomException(
@@ -385,17 +386,22 @@
                     String fileName = path.substring(0, path.length() - ".media-link".length());
                     FileManager fmgr = roller.getFileManager();
                     fmgr.deleteFile(website, fileName);
-                    log.debug("Deleted resource: " + fileName);
+                    log.debug("Deleted media entry: " + fileName);
+                    return;
+                    
                 } catch (Exception e) {
-                    String msg = "ERROR in atom.deleteResource";
+                    String msg = "ERROR deleting media entry";
                     log.error(msg, e);
                     throw new AtomException(msg);
                 }
-                return;
             }
+            log.debug("Not authorized to delete media entry"); 
+            log.debug("Exiting via exception"); 
+
         } catch (WebloggerException ex) {
-            throw new AtomException("ERROR deleting entry",ex);
+            throw new AtomException("ERROR deleting media entry",ex);
         }
+        throw new AtomNotAuthorizedException("Not authorized to delete entry");
     }
     
     

Modified: roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java?rev=583871&r1=583870&r2=583871&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java
(original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java
Thu Oct 11 09:32:32 2007
@@ -60,37 +60,45 @@
  * 
  * 
  *    /roller-services/app/[weblog-handle>/entries
- *    Entry collection for a blog
+ *    Entry collection for a weblog (GET, POST)
  * 
  *    /roller-services/app/[weblog-handle]/entries/[offset]
- *    Entry collection for a blog, with offset
+ *    Entry collection for a blog, with offset (GET)
  * 
  *    /roller-services/app/[weblog-handle]/entry/[id]
- *    Individual entry (i.e. edit URI)
+ *    Individual entry (GET, PUT, DELETE)
  *
  * 
  *    /roller-services/app/[weblog-handle]/resources
- *    Resource (i.e. file-uploads) collection for a blog
+ *    Resource (i.e. file-uploads) collection for a weblog (GET, POST)
  * 
  *    /roller-services/app/[weblog-handle]/resources/[offset]
- *    Resource collection for a blog, with offset
+ *    Resource collection for a blog, with offset (GET)
  * 
  *    /roller-services/app/[weblog-handle]/resource/*.media-link[name]
- *    Individual resource metadata (i.e. edit URI)
+ *    Individual resource metadata (GET, PUT, DELETE)
  * 
  *    /roller-services/app/[weblog-handle]/resource/[name]
- *    Individual resource data (i.e. media-edit URI)
+ *    Individual resource data (GET)
+ * 
  * 
  *  Coming soon...
  *
+ *    /roller-services/app/[weblog-handle]/comments
+ *    Comments collection for weblog (GET, POST)
+ * 
+ *    /roller-services/app/[weblog-handle]/comments/[offset]
+ *    Comments collection for weblog with offset (GET)
+ * 
+ *    /roller-services/app/[weblog-handle]/comment/[id]
+ *    Individual comment within weblog (GET, PUT, DELETE)
+ * 
+ * 
  *    /roller-services/app/[weblog-handle]/entry/[id]/comments
- *    Comments collection for entry with id
+ *    Comments collection for entry with id (GET)
  * 
  *    /roller-services/app/[weblog-handle]/entry/[id]/comments/[offset]
- *    Comments collection for entry with id
- * 
- *    /roller-services/app/[weblog-handle]/entry/[id]/comments/id
- *    Individual comment
+ *    Comments collection for entry with id (GET)
  * 
  * </pre>
  * @author David M Johnson
@@ -281,12 +289,13 @@
             {                    
                 EntryCollection ecol = new EntryCollection(user, atomURL);
                 ecol.deleteEntry(areq);
+                return;
 
             } else if (pathInfo[1].equals("resource")) {
                 MediaCollection mcol = new MediaCollection(user, atomURL);
                 mcol.deleteEntry(areq);
+                return;
             }
-            throw new AtomNotAuthorizedException("ERROR not authorized to delete entry");
         }
         throw new AtomNotFoundException("cannot find specified entry/resource");
     }



Mime
View raw message