org.opencrx.kernel.backend
Class VCard

java.lang.Object
  extended by org.opencrx.kernel.backend.VCard

public class VCard
extends Object


Field Summary
protected  Backend backend
           
static short DEFAULT_LOCALE
           
static String MIME_TYPE
           
static int MIME_TYPE_CODE
           
static String PROD_ID
           
static String VCARD_SCHEMA
           
 
Constructor Summary
VCard(Backend backend)
           
 
Method Summary
 BasicObject importItem(byte[] item, Path accountIdentity, short locale, List<String> errors, List<String> report)
           
 String mergeVcard(DataproviderObject_1_0 account, String sourceVcard, List<String> statusMessage)
          Update sourceVcard with account values and return merged vcard.
 BasicObject updateAccount(Map<String,String> vcard, Path accountSegmentIdentity, short locale, List<String> report)
          Updates account according to values of vcard.
 boolean updateEMailAddress(DataproviderObject address, String newValue)
           
 boolean updatePhoneNumber(DataproviderObject address, String newValue)
           
 boolean updatePostalAddress(DataproviderObject address, String newValue, short locale)
           
 boolean updateWebAddress(DataproviderObject address, String newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIME_TYPE

public static final String MIME_TYPE
See Also:
Constant Field Values

PROD_ID

public static final String PROD_ID
See Also:
Constant Field Values

MIME_TYPE_CODE

public static final int MIME_TYPE_CODE
See Also:
Constant Field Values

DEFAULT_LOCALE

public static final short DEFAULT_LOCALE
See Also:
Constant Field Values

VCARD_SCHEMA

public static final String VCARD_SCHEMA
See Also:
Constant Field Values

backend

protected final Backend backend
Constructor Detail

VCard

public VCard(Backend backend)
Method Detail

mergeVcard

public String mergeVcard(DataproviderObject_1_0 account,
                         String sourceVcard,
                         List<String> statusMessage)
                  throws ServiceException
Update sourceVcard with account values and return merged vcard.

Throws:
ServiceException

updatePostalAddress

public boolean updatePostalAddress(DataproviderObject address,
                                   String newValue,
                                   short locale)
                            throws ServiceException
Throws:
ServiceException

updatePhoneNumber

public boolean updatePhoneNumber(DataproviderObject address,
                                 String newValue)
                          throws ServiceException
Throws:
ServiceException

updateWebAddress

public boolean updateWebAddress(DataproviderObject address,
                                String newValue)

updateEMailAddress

public boolean updateEMailAddress(DataproviderObject address,
                                  String newValue)

importItem

public BasicObject importItem(byte[] item,
                              Path accountIdentity,
                              short locale,
                              List<String> errors,
                              List<String> report)
                       throws ServiceException
Throws:
ServiceException

updateAccount

public BasicObject updateAccount(Map<String,String> vcard,
                                 Path accountSegmentIdentity,
                                 short locale,
                                 List<String> report)
                          throws ServiceException
Updates account according to values of vcard. If a account with email address EMAIL;PREF;INTERNET is found then the account and its addresses are updated. If no contact is found then null is returned.

Throws:
ServiceException


This software is published under the BSD license. Copyright © 2003-2008, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.