com.funambol.common.pim.icalendar
Class ICalendarFormatter
java.lang.Object
com.funambol.common.pim.vcalendar.BasicVCalendarFormatter
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);
Method Summary |
protected void |
formatAlarm(PIMItem pimItem,
java.io.OutputStream os,
boolean allFields)
Format the VALARM component |
protected void |
formatDateTimeField(java.io.OutputStream os,
PIMItem pimItem,
int pimField,
java.lang.String iCalField,
boolean checkAllDay,
boolean checkTimezone,
boolean allFields)
Format a date-time field. |
protected void |
formatTimezone(PIMItem pimItem,
java.io.OutputStream os)
Format the VTIMEZONE component |
protected void |
formatTrigger(PIMItem pimItem,
int alarmInterval,
java.io.OutputStream os,
boolean allFields)
|
protected java.lang.String |
getTZID(PIMItem pimItem)
|
protected long |
getTZOffset(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 |
ICalendarFormatter
public ICalendarFormatter(java.lang.String defaultCharset)
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(PIMItem pimItem,
java.io.OutputStream os,
boolean allFields)
throws PIMException
- Format the VALARM component
- Specified by:
formatAlarm
in class BasicVCalendarFormatter
- Parameters:
pimItem
- the PIMItem to formatos
- the output stream
- Throws:
javax.microedition.pim.PIMException
PIMException
formatTrigger
protected void formatTrigger(PIMItem pimItem,
int alarmInterval,
java.io.OutputStream os,
boolean allFields)
throws PIMException
- Throws:
PIMException
formatTimezone
protected void formatTimezone(PIMItem pimItem,
java.io.OutputStream os)
throws PIMException
- Format the VTIMEZONE component
- Specified by:
formatTimezone
in class BasicVCalendarFormatter
- Parameters:
pimItem
- the PIMItem to formatos
- the output stream
- Throws:
javax.microedition.pim.PIMException
PIMException
formatDateTimeField
protected void formatDateTimeField(java.io.OutputStream os,
PIMItem pimItem,
int pimField,
java.lang.String iCalField,
boolean checkAllDay,
boolean checkTimezone,
boolean allFields)
throws 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 PIMItempimField
- The pim field index.iCalField
- The vCalendar field namecheckAllDay
- Check whether the allday property shall be updatedcheckTimezone
- Check whether the TZID param shall be added (only
for iCalendar implementations)
- Throws:
PIMException
getTZID
protected java.lang.String getTZID(PIMItem pimItem)
getTZOffset
protected long getTZOffset(PIMItem pimItem)
Copyright © 2001-2009 Funambol.