[Bedework-commit] calendarapi r264 - trunk/icalendar/src/org/bedework/icalendar

svnadmin at bedework.org svnadmin at bedework.org
Sat Apr 14 23:14:00 EDT 2007


Author: douglm
Date: 2007-04-14 23:13:58 -0400 (Sat, 14 Apr 2007)
New Revision: 264

Modified:
   trunk/icalendar/src/org/bedework/icalendar/IcalTranslator.java
Log:
Separate out freebusy publish code into new action.

Use correct output method for ical data

Modified: trunk/icalendar/src/org/bedework/icalendar/IcalTranslator.java
===================================================================
--- trunk/icalendar/src/org/bedework/icalendar/IcalTranslator.java	2007-04-12 18:34:54 UTC (rev 263)
+++ trunk/icalendar/src/org/bedework/icalendar/IcalTranslator.java	2007-04-15 03:13:58 UTC (rev 264)
@@ -211,6 +211,25 @@
     return wtr.toString();
   }
 
+  /** Convert a Calendar to it's string form
+   *
+   * @param cal Calendar to convert
+   * @return String representation
+   * @throws CalFacadeException
+   */
+  public static String toIcalString(Calendar cal) throws CalFacadeException {
+    CalendarOutputter co = new CalendarOutputter(false, 74);
+
+    Writer wtr =  new StringWriter();
+    try {
+      co.output(cal, wtr);
+    } catch (Throwable t) {
+      throw new CalFacadeException(t);
+    }
+
+    return wtr.toString();
+  }
+
   /** turn a single event with possible overrides into a calendar
    *
    * @param val



More information about the Bedework-commit mailing list