[Bedework-commit] rpiutil r82 - trunk/src/edu/rpi/sss/util/servlets/io

svnadmin at bedework.org svnadmin at bedework.org
Thu May 29 10:21:48 EDT 2008


Author: douglm
Date: 2008-05-29 10:21:48 -0400 (Thu, 29 May 2008)
New Revision: 82

Modified:
   trunk/src/edu/rpi/sss/util/servlets/io/CharArrayWrappedResponse.java
Log:
Implement resources folders which can be created within a calendar collection. This follows the approach outlined in RFC 4791 and will provide a place to store shareable attachments while ensuring access restrictions are applied.

In addition, implement support for creating and retrieving 'file' resources which may be stored in any non-calendar collection. This will probably be useful when creating an image repository for example, but is also required for full implementation of shared attachments.

Currently, there is no ui support fo any of this, files may be uploaded with DAV explorer and viewed via a browser accessing the caldav server.

Modified: trunk/src/edu/rpi/sss/util/servlets/io/CharArrayWrappedResponse.java
===================================================================
--- trunk/src/edu/rpi/sss/util/servlets/io/CharArrayWrappedResponse.java	2008-04-22 13:50:03 UTC (rev 81)
+++ trunk/src/edu/rpi/sss/util/servlets/io/CharArrayWrappedResponse.java	2008-05-29 14:21:48 UTC (rev 82)
@@ -37,6 +37,7 @@
  */
 public class CharArrayWrappedResponse extends WrappedResponse {
   final CharArrayWriter caw = new CharArrayWriter();
+  private boolean usedOutputStream;
 
   /** Constructor
    *
@@ -60,6 +61,13 @@
     super(response, log, debug);
   }
 
+  /**
+   * @return true if usedOutputStream
+   */
+  public boolean getUsedOutputStream() {
+    return  usedOutputStream;
+  }
+
   /* (non-Javadoc)
    * @see javax.servlet.ServletResponse#getWriter()
    */
@@ -79,7 +87,8 @@
       getLogger().debug("getOutputStream called");
     }
 
-    throw new IOException("Unsupported operation: getOutputStream()");
+    usedOutputStream = true;
+    return getResponse().getOutputStream();
   }
 
   /* (non-Javadoc)



More information about the Bedework-commit mailing list