public class SyncStorage extends java.lang.Object implements ISyncStorage
ISyncStorage.CollectionMapping
Constructor and Description |
---|
SyncStorage() |
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
createFolder(BackendSession bs,
ItemDataType type,
java.lang.String folderName)
Create + autosubscription
|
boolean |
deleteFolder(BackendSession bs,
ItemDataType type,
java.lang.String folderUri) |
long |
findLastHeartbeat(DeviceId deviceId) |
java.util.List<java.lang.Integer> |
getCollectionIds(java.lang.String collectionPath)
Finds the collection ids for a collection path (% char is allowed for
wildcard matching)
|
BMFolder |
getFolder(int collectionId) |
BMFolder |
getFolderByUri(java.lang.String userUid,
java.lang.String folderUri) |
java.util.List<BMFolder> |
getFoldersByParent(java.lang.String userUid,
long parentId) |
java.util.Map<java.lang.String,java.lang.String> |
getFolderSyncVersions(Account account) |
BMFolder |
getMailFolderByPath(java.lang.String userUid,
java.lang.String path) |
java.util.List<java.lang.String> |
getSentItems(BackendSession bs,
int folderId) |
java.lang.String |
getSystemConf(java.lang.String key)
Fetches the value of an EAS system conf.
|
java.util.List<java.lang.String> |
getWipedDevices() |
void |
insertClientId(java.lang.String clientId)
Saves the client used by SendMail to identity resends
|
void |
insertSentItems(BackendSession bs,
int folderId,
java.util.Set<java.lang.String> uids) |
boolean |
isKnownClientId(java.lang.String clientId)
Returns true if the clientId is known and the email must not be sent by
the SendMail command
|
boolean |
needReset(BackendSession bs) |
void |
resetFolder(BackendSession bs) |
void |
resetSentItems(BackendSession bs,
int folderId) |
void |
setFolderSyncVersions(FolderSyncVersions versions) |
boolean |
updateFolder(BackendSession bs,
ItemDataType type,
java.lang.String folderUri,
java.lang.String folderName) |
void |
updateLastHearbeat(DeviceId deviceId,
long value) |
void |
updateLastSync(BackendSession bs)
Update device lastSync
|
public java.lang.String getSystemConf(java.lang.String key)
ISyncStorage
getSystemConf
in interface ISyncStorage
public java.util.List<java.lang.String> getWipedDevices()
getWipedDevices
in interface ISyncStorage
public void updateLastSync(BackendSession bs)
ISyncStorage
updateLastSync
in interface ISyncStorage
public long findLastHeartbeat(DeviceId deviceId)
findLastHeartbeat
in interface ISyncStorage
public void updateLastHearbeat(DeviceId deviceId, long value)
updateLastHearbeat
in interface ISyncStorage
public BMFolder getFolder(int collectionId) throws CollectionNotFoundException
getFolder
in interface ISyncStorage
CollectionNotFoundException
public BMFolder getFolderByUri(java.lang.String userUid, java.lang.String folderUri) throws CollectionNotFoundException
getFolderByUri
in interface ISyncStorage
CollectionNotFoundException
public BMFolder getMailFolderByPath(java.lang.String userUid, java.lang.String path) throws CollectionNotFoundException
getMailFolderByPath
in interface ISyncStorage
CollectionNotFoundException
public java.util.List<BMFolder> getFoldersByParent(java.lang.String userUid, long parentId) throws CollectionNotFoundException
getFoldersByParent
in interface ISyncStorage
CollectionNotFoundException
public java.lang.Long createFolder(BackendSession bs, ItemDataType type, java.lang.String folderName)
ISyncStorage
createFolder
in interface ISyncStorage
public boolean deleteFolder(BackendSession bs, ItemDataType type, java.lang.String folderUri)
deleteFolder
in interface ISyncStorage
public boolean updateFolder(BackendSession bs, ItemDataType type, java.lang.String folderUri, java.lang.String folderName)
updateFolder
in interface ISyncStorage
public boolean needReset(BackendSession bs)
needReset
in interface ISyncStorage
public void resetFolder(BackendSession bs)
resetFolder
in interface ISyncStorage
public java.util.List<java.lang.String> getSentItems(BackendSession bs, int folderId)
getSentItems
in interface ISyncStorage
public void insertSentItems(BackendSession bs, int folderId, java.util.Set<java.lang.String> uids)
insertSentItems
in interface ISyncStorage
public void resetSentItems(BackendSession bs, int folderId)
resetSentItems
in interface ISyncStorage
public void insertClientId(java.lang.String clientId)
ISyncStorage
insertClientId
in interface ISyncStorage
public boolean isKnownClientId(java.lang.String clientId)
ISyncStorage
isKnownClientId
in interface ISyncStorage
public java.util.List<java.lang.Integer> getCollectionIds(java.lang.String collectionPath)
ISyncStorage
getCollectionIds
in interface ISyncStorage
public void setFolderSyncVersions(FolderSyncVersions versions)
setFolderSyncVersions
in interface ISyncStorage
public java.util.Map<java.lang.String,java.lang.String> getFolderSyncVersions(Account account)
getFolderSyncVersions
in interface ISyncStorage
Copyright © 2021. All Rights Reserved.