1 18 19 package sync4j.syncclient.spds; 20 21 import java.util.Hashtable ; 22 23 29 public class SyncManager { 30 31 33 private static final String KEY_LOGIN = "login" ; 34 private static final String KEY_SERVER_URL = "serverUrl" ; 35 final private static String KEY_GATEWAYAPN = "gatewayApn" ; 36 final private static String KEY_GATEWAYIP = "gatewayIp" ; 37 final private static String KEY_GATEWAYPORT = "gatewayPort" ; 38 39 41 SyncManagerImpl syncManagerImpl = null; 42 43 45 52 public SyncManager (String dataStoreName, 53 String sourceType, 54 String sourceName, 55 Hashtable properties) { 56 57 this.syncManagerImpl = new SyncManagerImpl(dataStoreName, sourceType, sourceName); 58 59 this.syncManagerImpl.setLogin ((String ) properties.get(KEY_LOGIN ) ); 60 this.syncManagerImpl.setServerUrl ((String ) properties.get(KEY_SERVER_URL ) ); 61 this.syncManagerImpl.setGatewayApn ((String ) properties.get(KEY_GATEWAYAPN ) ); 62 this.syncManagerImpl.setGatewayIp ((String ) properties.get(KEY_GATEWAYIP ) ); 63 this.syncManagerImpl.setGatewayPort ((String ) properties.get(KEY_GATEWAYPORT ) ); 64 65 } 66 67 73 public void sync() throws SyncException, AuthenticationException, UpdateException { 74 75 this.syncManagerImpl.sync(); 76 77 } 78 79 } | Popular Tags |