|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.common.pim.model.common.BaseFormatter
public abstract class BaseFormatter
Represent a converter base class. Provides some common methods.
Field Summary | |
---|---|
protected java.lang.String |
charset
|
static java.lang.String |
CHARSET_UTF7
|
static java.lang.String |
CHARSET_UTF8
|
static java.lang.String |
ENCODING_B64
|
static java.lang.String |
ENCODING_QP
|
protected boolean |
forceClientLocalTime
|
static java.lang.String |
PLAIN_CHARSET
|
protected java.util.Vector<java.lang.String> |
supportedFields
Specifies the list of supported fields |
protected java.util.TimeZone |
timezone
|
Constructor Summary | |
---|---|
BaseFormatter(java.util.TimeZone timezone,
java.lang.String charset)
Deprecated. |
|
BaseFormatter(java.util.TimeZone timezone,
java.lang.String charset,
boolean forceDeviceLocalTime)
|
Method Summary | |
---|---|
java.lang.StringBuffer |
composeICalTextComponent(Property property,
java.lang.String field)
Deprecated. Unused since version 6.5, replaced by methods in #com.funambol.common.pim.converter.CalendarContentConverter |
protected java.lang.StringBuffer |
composeRemainingFields()
Compose the remaining fields from the supportedFields Vector. |
java.lang.StringBuffer |
composeVCardComponent(java.lang.String propertyValue,
java.util.ArrayList properties,
java.lang.String field)
This method compose the single component of vCard and in particular: 1) encode value with the proper encoding 2) handle the params 3) create a representation of the specificated vCard field |
java.lang.StringBuffer |
composeVCardComponent(java.lang.String propertyValue,
java.util.ArrayList properties,
java.lang.String field,
boolean excludeCharset)
This method compose the single component of vCard and in particular: 1) encode value with the proper encoding 2) handle the params 3) create a representation of the specificated vCard field |
java.lang.String |
encode(java.lang.String value,
java.lang.String encoding,
java.lang.String charset)
Replace values with proper encoding |
java.lang.String |
escapeSeparator(java.lang.String value)
A SEMI-COLON in a property value MUST be escaped with a '\' character. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ENCODING_QP
public static final java.lang.String CHARSET_UTF8
public static final java.lang.String CHARSET_UTF7
public static final java.lang.String ENCODING_B64
public static final java.lang.String PLAIN_CHARSET
protected java.util.TimeZone timezone
protected java.lang.String charset
protected boolean forceClientLocalTime
protected java.util.Vector<java.lang.String> supportedFields
Constructor Detail |
---|
@Deprecated public BaseFormatter(java.util.TimeZone timezone, java.lang.String charset)
timezone
- the timezone to use in the conversioncharset
- the charset to use in the conversionpublic BaseFormatter(java.util.TimeZone timezone, java.lang.String charset, boolean forceDeviceLocalTime)
timezone
- the timezone to use in the conversioncharset
- the charset to use in the conversionforceDeviceLocalTime
- true if the date must be converted in the
device's local time, false otherwise.Method Detail |
---|
public java.lang.String encode(java.lang.String value, java.lang.String encoding, java.lang.String charset) throws FormatterException
value
- the value to apply the replacementencoding
- the encoding to use (default is QUOTED-PRINTABLE)charset
- the charset to use (default is UTF-8)
FormatterException
public java.lang.StringBuffer composeVCardComponent(java.lang.String propertyValue, java.util.ArrayList properties, java.lang.String field) throws FormatterException
propertyValue
- the value of vCard fieldproperties
- a vector of paramsfield
- the filed name
com.funambol.common.pim.converter.FormatterException
- if an error occurs
FormatterException
public java.lang.StringBuffer composeVCardComponent(java.lang.String propertyValue, java.util.ArrayList properties, java.lang.String field, boolean excludeCharset) throws FormatterException
propertyValue
- the value of vCard fieldproperties
- a vector of paramsfield
- the filed nameexcludeCharset
- must the charset be not set ?
com.funambol.common.pim.converter.FormatterException
- if an error occurs
FormatterException
public java.lang.StringBuffer composeICalTextComponent(Property property, java.lang.String field) throws FormatterException
#com.funambol.common.pim.converter.CalendarContentConverter
value
- the value of iCalendar fieldproperties
- a vector of paramsfield
- the field name
FormatterException
protected java.lang.StringBuffer composeRemainingFields()
public java.lang.String escapeSeparator(java.lang.String value)
value
- the value in which replaced the ; and the \
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |