com.funambol.common.pim.model.vcard
Class VCardFormatter

java.lang.Object
  extended by com.funambol.common.pim.model.common.BaseFormatter
      extended by com.funambol.common.pim.model.vcard.VCardFormatter

public class VCardFormatter
extends BaseFormatter

This object is a converter from a Contact object model to a vCard string


Field Summary
 
Fields inherited from class com.funambol.common.pim.model.common.BaseFormatter
charset, CHARSET_UTF7, CHARSET_UTF8, ENCODING_B64, ENCODING_QP, forceClientLocalTime, PLAIN_CHARSET, supportedFields, timezone
 
Constructor Summary
VCardFormatter(java.util.TimeZone timezone, java.lang.String charset)
           
 
Method Summary
 java.lang.String format(Contact contact)
          Performs the conversion.
 java.lang.String format(Contact contact, java.util.Vector<java.lang.String> supportedFields)
          Performs the conversion.
 java.lang.String getNewLine()
          Returns the string used as the new-line marker.
 void setNewLine(java.lang.String newLine)
          Sets a new string as the new-line marker.
 
Methods inherited from class com.funambol.common.pim.model.common.BaseFormatter
composeICalTextComponent, composeRemainingFields, composeVCardComponent, composeVCardComponent, encode, escapeSeparator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VCardFormatter

public VCardFormatter(java.util.TimeZone timezone,
                      java.lang.String charset)
Method Detail

format

public java.lang.String format(Contact contact)
                        throws FormatterException
Performs the conversion.

Parameters:
obj - the Contact to be converted in vCard format
Returns:
a string containing the vCard representation of this Contact
Throws:
FormatterException

format

public java.lang.String format(Contact contact,
                               java.util.Vector<java.lang.String> supportedFields)
                        throws FormatterException
Performs the conversion.

Parameters:
obj - the Contact to be converted in vCard format
supportedFields - the list of supported fields
Returns:
a string containing the vCard representation of this Contact
Throws:
FormatterException

setNewLine

public void setNewLine(java.lang.String newLine)
Sets a new string as the new-line marker.

Parameters:
newLine - the string to use as a new-line marker

getNewLine

public java.lang.String getNewLine()
Returns the string used as the new-line marker.

Returns:
the string to use as a new-line marker


Copyright © 2001-2009 Funambol.