1 18 19 package sync4j.server.engine; 20 21 import sync4j.framework.engine.*; 22 23 import sync4j.server.pdi.*; 24 25 31 public class ContactSyncItem extends SyncItemImpl implements SyncItem { 32 34 public final static String PROPERTY_VCARD_CONTENT = "VCARD_CONTENT"; 35 36 38 40 50 public ContactSyncItem(SyncItem fromSyncItem) 51 throws PDIException { 52 byte[] content = (byte[])fromSyncItem.getPropertyValue(PROPERTY_BINARY_CONTENT); 53 54 if (content == null) { 55 throw new PDIException("No " + PROPERTY_BINARY_CONTENT + " property found!"); 56 } 57 58 Contact vCard = new Contact(new String (content)); 59 60 setSyncSource(fromSyncItem.getSyncSource()); 64 setState(fromSyncItem.getState()); 65 setProperties(fromSyncItem.getProperties()); 66 67 setPropertiesFromVCard(vCard); 71 } 72 73 75 229 private void setPropertiesFromVCard(Contact vCard) { 230 } 231 } | Popular Tags |