1 18 package sync4j.framework.engine.source; 19 20 import sync4j.framework.engine.SyncItem; 21 import sync4j.framework.engine.SyncItemKey; 22 23 import java.security.Principal ; 24 import java.sql.Timestamp ; 25 26 38 public interface SyncSource { 39 40 42 47 public String getName(); 48 49 54 public String getSourceQuery(); 55 56 61 public String getSourceURI(); 62 63 68 public String getType(); 69 70 75 public SyncSourceInfo getInfo(); 76 77 87 void beginSync(Principal principal, int syncMode) throws SyncSourceException; 88 89 99 void endSync(Principal principal) throws SyncSourceException; 100 101 111 public SyncItemKey[] getUpdatedSyncItemKeys(Principal principal, 112 Timestamp since ) 113 throws SyncSourceException ; 114 115 125 public SyncItem[] getUpdatedSyncItems(Principal principal, 126 Timestamp since ) 127 throws SyncSourceException ; 128 129 143 public SyncItem setSyncItem(Principal principal, SyncItem syncInstance) 144 throws SyncSourceException ; 145 146 158 public SyncItem[] setSyncItems(Principal principal, SyncItem[] syncItems) 159 throws SyncSourceException ; 160 161 170 public void removeSyncItem(Principal principal, SyncItem syncItem) 171 throws SyncSourceException ; 172 173 182 public void removeSyncItems(Principal principal, SyncItem[] syncItems) 183 throws SyncSourceException; 184 185 198 public SyncItemKey[] getNewSyncItemKeys(Principal principal, 199 Timestamp since ) 200 throws SyncSourceException ; 201 202 215 public SyncItem[] getNewSyncItems(Principal principal, 216 Timestamp since ) 217 throws SyncSourceException ; 218 219 232 public SyncItemKey[] getDeletedSyncItemKeys(Principal principal, 233 Timestamp since ) 234 throws SyncSourceException ; 235 236 249 public SyncItem[] getDeletedSyncItems(Principal principal, 250 Timestamp since ) 251 throws SyncSourceException ; 252 253 263 public SyncItem[] getAllSyncItems(Principal principal) 264 throws SyncSourceException; 265 266 277 public SyncItem[] getSyncItemsFromIds(Principal principal, SyncItemKey[] syncItemKeys) throws SyncSourceException; 278 279 290 public SyncItem getSyncItemFromId(Principal principal, SyncItemKey syncItemKey) throws SyncSourceException; 291 292 303 public SyncItem getSyncItemFromTwin(Principal principal, SyncItem syncItem) throws SyncSourceException; 304 305 316 public SyncItem[] getSyncItemsFromTwins(Principal principal, SyncItem[] syncItems) throws SyncSourceException; 317 } 318 | Popular Tags |