|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.common.pim.model.converter.BaseConverter
com.funambol.common.pim.model.converter.VCalendarConverter
public class VCalendarConverter
This object is a converter from a Calendar object model to a VCalendar string
Converter
Field Summary |
---|
Fields inherited from class com.funambol.common.pim.model.converter.BaseConverter |
---|
charset, CHARSET_UTF7, CHARSET_UTF8, ENCODING_B64, ENCODING_QP, forceClientLocalTime, PLAIN_CHARSET, supportedFields, timezone |
Constructor Summary | |
---|---|
VCalendarConverter(java.util.TimeZone timezone,
java.lang.String charset)
Deprecated. |
|
VCalendarConverter(java.util.TimeZone timezone,
java.lang.String charset,
boolean forceClientLocalTime)
|
Method Summary | |
---|---|
static java.lang.String |
addCRBeforeEachLF(java.lang.String raw)
|
protected void |
addXParams(java.lang.StringBuffer paramList,
Property prop)
Added X-Param to the input list of the property parameters The buffer iterates throguh the parameters and adds the start parameter char ';' and then the parameter. |
VCalendar |
calendar2vcalendar(Calendar cal,
boolean xv)
Performs the Calendar-to-VCalendar conversion. |
protected Property |
composeDateTimeField(java.lang.String label,
PropertyWithTimeZone property,
boolean allDay,
boolean xvCalendar)
|
protected Property |
composeDateTimeField(java.lang.String label,
PropertyWithTimeZone property,
boolean allDay,
boolean xvCalendar,
boolean isRecurrence)
|
protected Property |
composeField(java.lang.String label,
Property property,
boolean xvCalendar)
|
java.lang.String |
convert(java.lang.Object obj)
|
protected PropertyWithTimeZone |
decodeDateTimeField(Property property,
java.util.TimeZone fieldTimezone)
|
protected Property |
decodeField(Property property)
|
protected java.lang.Short |
decodeShortField(Property property)
|
protected java.util.Map<java.lang.String,java.lang.String> |
getParameters(Property property)
Creates an HashMap with the X-Param set extracted from a com.funambol.common.pim.model.Property object. |
protected java.util.List<Parameter> |
getXParams(Property property)
Creates an ArrayList with the X-Param set extracted from a com.funambol.common.pim.common.Property object. |
static java.lang.String |
iCalEscape(java.lang.String raw)
|
static boolean |
isComplexProperty(java.lang.String name)
This method is used to recognize those properties that could have a complex (ie, made of different semicolon-separated and comma-separated parts) content. |
static boolean |
isQPProperty(java.lang.String name)
This method is used to recognize those properties that have been decided to be encoded with Quoted-Printable. |
Calendar |
vcalendar2calendar(VCalendar vcal)
Performs the VCalendar-to-Calendar conversion, finding out automatically which type of calendar (Event or Todo) it is. |
static java.lang.String |
vCalEscape(java.lang.String raw)
|
static java.lang.String |
vCalEscapeButKeepNewlines(java.lang.String raw)
|
static java.lang.String |
vCalUnescape(java.lang.String raw)
|
Methods inherited from class com.funambol.common.pim.model.converter.BaseConverter |
---|
composeICalTextComponent, composeRemainingFields, composeVCardComponent, composeVCardComponent, encode, escapeSeparator, handleConversionAcrossTimeZones, handleConversionToAllDayDate, handleConversionToAllDayDate, handleConversionToLocalDate, handleConversionToUTCDate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
@Deprecated public VCalendarConverter(java.util.TimeZone timezone, java.lang.String charset)
public VCalendarConverter(java.util.TimeZone timezone, java.lang.String charset, boolean forceClientLocalTime)
timezone
- the timezone to use in the conversioncharset
- the charsetforceClientLocalTime
- true if the date must be converted in the
client local time, false otherwise.Method Detail |
---|
public java.lang.String convert(java.lang.Object obj) throws ConverterException
ConverterException
public Calendar vcalendar2calendar(VCalendar vcal) throws ConverterException
vcal
- the VCalendar object to be converted
com.funambol.common.pim.converter.ConverterException
ConverterException
public VCalendar calendar2vcalendar(Calendar cal, boolean xv) throws ConverterException
cal
- the Calendar object to be convertedxv
- true if the text/x-vcalendar format must be used while
generating some properties of the VCalendar output object
com.funambol.common.pim.converter.ConverterException
ConverterException
protected java.util.Map<java.lang.String,java.lang.String> getParameters(Property property)
property
- the Property object (containing the X-Param ArrayList)
protected java.util.List<Parameter> getXParams(Property property)
property
- the Property object (containing the X-Param HashMap)
protected void addXParams(java.lang.StringBuffer paramList, Property prop)
paramList
- the list of standard paramprop
- the property objectprotected Property composeField(java.lang.String label, Property property, boolean xvCalendar)
label
- property
- xvCalendar
- true only if this property is part of a vCalendar (1.0)
item, false if it is part of an iCalendar (2.0)
protected java.lang.Short decodeShortField(Property property)
protected Property composeDateTimeField(java.lang.String label, PropertyWithTimeZone property, boolean allDay, boolean xvCalendar)
label
- property
- allDay
- xvCalendar
-
protected Property composeDateTimeField(java.lang.String label, PropertyWithTimeZone property, boolean allDay, boolean xvCalendar, boolean isRecurrence)
protected Property decodeField(Property property)
protected PropertyWithTimeZone decodeDateTimeField(Property property, java.util.TimeZone fieldTimezone)
public static boolean isComplexProperty(java.lang.String name)
name
- the name of the property, as a String
public static boolean isQPProperty(java.lang.String name)
name
- the name of the property, as a String
public static java.lang.String vCalEscapeButKeepNewlines(java.lang.String raw)
public static java.lang.String vCalEscape(java.lang.String raw)
public static java.lang.String iCalEscape(java.lang.String raw)
public static java.lang.String vCalUnescape(java.lang.String raw)
public static java.lang.String addCRBeforeEachLF(java.lang.String raw)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |