com.funambol.common.pim.icalendar
Class ICalendarFormatter

java.lang.Object
  extended by com.funambol.common.pim.vcalendar.BasicVCalendarFormatter
      extended by com.funambol.common.pim.icalendar.ICalendarFormatter

public class ICalendarFormatter
extends BasicVCalendarFormatter

This class implements an iCalendar formatter for JSR75 Event or ToDo objects. This class should be extended if you want to format extended fields, not directly included in the basic JSR75 implementation. In particular the following methods should be implemented:

  • getTZID(PIMItem pimItem);
  • getTZOffset(PIMItem pimItem);
  • getTaskAlarmInterval(PIMItem pimItem);
  • isAllDay(PIMItem pimItem);
  • formatAttendees(PIMItem pimItem, OutputStream os);

  • Field Summary
     
    Fields inherited from class com.funambol.common.pim.vcalendar.BasicVCalendarFormatter
    alarm, defaultCharset, pimUtils
     
    Constructor Summary
    ICalendarFormatter(java.lang.String defaultCharset)
               
     
    Method Summary
    protected  void formatAlarm(javax.microedition.pim.PIMItem pimItem, java.io.OutputStream os, boolean allFields)
              Format the VALARM component
    protected  void formatDateTimeField(java.io.OutputStream os, javax.microedition.pim.PIMItem pimItem, int pimField, java.lang.String iCalField, boolean checkAllDay, boolean checkTimezone, boolean allFields)
              Format a date-time field.
    protected  void formatTimezone(javax.microedition.pim.PIMItem pimItem, java.io.OutputStream os)
              Format the VTIMEZONE component
    protected  void formatTrigger(javax.microedition.pim.PIMItem pimItem, int alarmInterval, java.io.OutputStream os, boolean allFields)
               
    protected  java.lang.String getTZID(javax.microedition.pim.PIMItem pimItem)
               
    protected  long getTZOffset(javax.microedition.pim.PIMItem pimItem)
               
    protected  java.lang.String getVersion()
              Get the version property string (e.g.
     
    Methods inherited from class com.funambol.common.pim.vcalendar.BasicVCalendarFormatter
    encodeField, fixEndDate, format, formatAttendees, formatCategories, formatClass, formatCompleted, formatDTEnd, formatDTStart, formatDue, formatEvent, formatFunambolAllday, formatLocation, formatNote, formatPriority, formatRevision, formatRRule, formatSimpleField, formatStatus, formatSummary, formatToDo, formatUID, getTaskAlarmInterval, isAllDay, isSupported
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    ICalendarFormatter

    public ICalendarFormatter(java.lang.String defaultCharset)
    Method Detail

    getVersion

    protected java.lang.String getVersion()
    Description copied from class: BasicVCalendarFormatter
    Get the version property string (e.g. VERSION:1.0)

    Specified by:
    getVersion in class BasicVCalendarFormatter
    Returns:

    formatAlarm

    protected void formatAlarm(javax.microedition.pim.PIMItem pimItem,
                               java.io.OutputStream os,
                               boolean allFields)
                        throws javax.microedition.pim.PIMException
    Format the VALARM component

    Specified by:
    formatAlarm in class BasicVCalendarFormatter
    Parameters:
    pimItem - the PIMItem to format
    os - the output stream
    Throws:
    javax.microedition.pim.PIMException

    formatTrigger

    protected void formatTrigger(javax.microedition.pim.PIMItem pimItem,
                                 int alarmInterval,
                                 java.io.OutputStream os,
                                 boolean allFields)
                          throws javax.microedition.pim.PIMException
    Throws:
    javax.microedition.pim.PIMException

    formatTimezone

    protected void formatTimezone(javax.microedition.pim.PIMItem pimItem,
                                  java.io.OutputStream os)
                           throws javax.microedition.pim.PIMException
    Format the VTIMEZONE component

    Specified by:
    formatTimezone in class BasicVCalendarFormatter
    Parameters:
    pimItem - the PIMItem to format
    os - the output stream
    Throws:
    javax.microedition.pim.PIMException

    formatDateTimeField

    protected void formatDateTimeField(java.io.OutputStream os,
                                       javax.microedition.pim.PIMItem pimItem,
                                       int pimField,
                                       java.lang.String iCalField,
                                       boolean checkAllDay,
                                       boolean checkTimezone,
                                       boolean allFields)
                                throws javax.microedition.pim.PIMException
    Description copied from class: BasicVCalendarFormatter
    Format a date-time field.

    Specified by:
    formatDateTimeField in class BasicVCalendarFormatter
    Parameters:
    os - The output stream to print the field in.
    pimItem - The PIMItem
    pimField - The pim field index.
    iCalField - The vCalendar field name
    checkAllDay - Check whether the allday property shall be updated
    checkTimezone - Check whether the TZID param shall be added (only for iCalendar implementations)
    Throws:
    javax.microedition.pim.PIMException

    getTZID

    protected java.lang.String getTZID(javax.microedition.pim.PIMItem pimItem)

    getTZOffset

    protected long getTZOffset(javax.microedition.pim.PIMItem pimItem)


    Copyright © 2001-2009 Funambol.