public class VCard extends AbstractImpl
Modifier and Type | Class and Description |
---|---|
static class |
VCard.PutVCardResult |
static class |
VCard.VCardField |
Modifier and Type | Field and Description |
---|---|
static String |
DATETIME_FORMAT |
static short |
DEFAULT_LOCALE |
static String |
FILE_EXTENSION |
static String |
MIME_TYPE |
static int |
MIME_TYPE_CODE |
static String |
PROD_ID |
static Map<Integer,String> |
salutations |
static String |
VCARD_SCHEMA |
Modifier | Constructor and Description |
---|---|
protected |
VCard() |
Modifier and Type | Method and Description |
---|---|
protected String |
encodeString(String s) |
protected String |
escapeNewlines(String from)
Escape new lines
|
protected Account |
findAccount(javax.jdo.PersistenceManager pm,
Segment accountSegment,
String uid) |
static VCard |
getInstance() |
protected Date |
getUtcDate(String dateTime,
SimpleDateFormat dateTimeFormatter)
Get UTC formatted date.
|
protected String |
getUtcDateTime(String dateTime,
SimpleDateFormat dateTimeFormatter)
Get UTC formatted dateTime.
|
String |
getVCardUid(String vcard) |
org.openmdx.base.jmi1.BasicObject |
importItem(byte[] item,
Account account,
short locale,
List<String> errors,
List<String> report) |
protected Account |
importItem(String vcardAsString,
Map<String,VCard.VCardField> vcard,
Account account,
short locale,
List<String> report) |
String |
mergeVcard(Account account,
String sourceVcard,
List<String> statusMessage)
Update sourceVcard with account values and return merged vcard.
|
Map<String,VCard.VCardField> |
parseVCard(BufferedReader reader,
StringBuilder vcardAsString) |
VCard.PutVCardResult |
putVCard(BufferedReader reader,
Segment accountSegment)
Updates existing or creates new account according to given VCARD.
|
static void |
register() |
Account |
updateAccount(String vcardAsString,
Map<String,VCard.VCardField> vcard,
Segment accountSegment,
short locale,
List<String> report) |
boolean |
updateEMailAddress(EMailAddress address,
String newValue) |
boolean |
updatePhoneNumber(PhoneNumber address,
String newValue) |
boolean |
updatePostalAddress(PostalAddress address,
String newValue,
short locale,
Segment codeSegment) |
boolean |
updateWebAddress(WebAddress address,
String newValue) |
void |
writePhotoTag(PrintWriter p,
Contact contact) |
getInstance, getUidAsString, preDelete, preStore, registerImpl
public static final String DATETIME_FORMAT
public static final String MIME_TYPE
public static final String FILE_EXTENSION
public static final String PROD_ID
public static final int MIME_TYPE_CODE
public static final short DEFAULT_LOCALE
public static final String VCARD_SCHEMA
public static void register()
public static VCard getInstance() throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
protected String escapeNewlines(String from)
from
- protected String getUtcDateTime(String dateTime, SimpleDateFormat dateTimeFormatter) throws ParseException
dateTime
- dateTimeFormatter
- ParseException
protected Date getUtcDate(String dateTime, SimpleDateFormat dateTimeFormatter) throws ParseException
dateTime
- dateTimeFormatter
- ParseException
public String mergeVcard(Account account, String sourceVcard, List<String> statusMessage) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
public boolean updatePostalAddress(PostalAddress address, String newValue, short locale, Segment codeSegment) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
public boolean updatePhoneNumber(PhoneNumber address, String newValue) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
public boolean updateWebAddress(WebAddress address, String newValue)
public boolean updateEMailAddress(EMailAddress address, String newValue)
public void writePhotoTag(PrintWriter p, Contact contact) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
public Map<String,VCard.VCardField> parseVCard(BufferedReader reader, StringBuilder vcardAsString) throws IOException
IOException
public org.openmdx.base.jmi1.BasicObject importItem(byte[] item, Account account, short locale, List<String> errors, List<String> report) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
protected Account importItem(String vcardAsString, Map<String,VCard.VCardField> vcard, Account account, short locale, List<String> report) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
public Account updateAccount(String vcardAsString, Map<String,VCard.VCardField> vcard, Segment accountSegment, short locale, List<String> report) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
protected Account findAccount(javax.jdo.PersistenceManager pm, Segment accountSegment, String uid)
public VCard.PutVCardResult putVCard(BufferedReader reader, Segment accountSegment) throws org.openmdx.base.exception.ServiceException
reader
- accountSegment
- org.openmdx.base.exception.ServiceException
This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.