org.opencrx.application.airsync.backend.cci
Interface SyncBackend
- All Known Implementing Classes:
- OpenCrxSyncBackend
public interface SyncBackend
|
Method Summary |
String |
createOrUpdateDataItem(SyncBackend.RequestContext requestContext,
String profileName,
SyncCollection collection,
String itemId,
IData data)
|
String |
createOrUpdateFolder(SyncBackend.RequestContext requestContext,
SyncFolder folder)
|
void |
deleteDataItem(SyncBackend.RequestContext requestContext,
String profileName,
SyncCollection collection,
String itemId)
|
String |
deleteFolder(SyncBackend.RequestContext requestContext,
String folderId)
|
SyncDataItem |
fetchDataItem(SyncBackend.RequestContext requestContext,
String profileName,
SyncCollection collection,
String itemId)
|
boolean |
folderIsValid(SyncBackend.RequestContext requestContext,
String profileName,
SyncCollection collection)
Validates whether folder specified by folderId and collectionType is valid. |
AttachmentDataT |
getAttachementData(SyncBackend.RequestContext requestContext,
String attachmentId)
|
GetChangedDataItemsResult |
getChangedDataItems(SyncBackend.RequestContext requestContext,
String profileName,
SyncCollection collection,
boolean noData,
int maxItems,
SyncDataItem.State state,
Set<String> excludes)
|
List<SyncFolder> |
getChangedFolders(SyncBackend.RequestContext requestContext,
String profileName,
String syncKey)
|
ClientProfile |
getClientProfile(SyncBackend.RequestContext requestContext,
String profileName)
|
File |
getContextTempDir(SyncBackend.RequestContext requestContext,
File tempDir)
|
List<String> |
getDeletedDataItems(SyncBackend.RequestContext requestContext,
String profileName,
SyncCollection collection,
String syncKeyTo)
Return deleted data items starting from collection.getSyncKey() up to syncKeyTo |
List<SyncFolder> |
getDeletedFolders(SyncBackend.RequestContext requestContext,
String profileName,
String syncKey)
|
String |
getNextSyncKey(SyncBackend.RequestContext requestContext,
String syncKey)
|
String |
moveDataItem(SyncBackend.RequestContext requestContext,
String profileName,
String srcFolderId,
String dstFolderId,
String itemId)
|
SyncBackend.RequestContext |
newRequestContext(String userId,
Object context)
|
void |
sendMail(SyncBackend.RequestContext requestContext,
InputStream mimeMessage)
|
void |
setDataItemReadFlag(SyncBackend.RequestContext requestContext,
String folderId,
String itemId,
boolean read)
|
void |
updateClientProfile(SyncBackend.RequestContext requestContext,
ClientProfile clientProfile,
Set<String> folderIds,
boolean noSyncKeys,
boolean noMappings)
Updates the client profile. |
DOMAIN_SEPARATOR
static final String DOMAIN_SEPARATOR
- See Also:
- Constant Field Values
newRequestContext
SyncBackend.RequestContext newRequestContext(String userId,
Object context)
getNextSyncKey
String getNextSyncKey(SyncBackend.RequestContext requestContext,
String syncKey)
throws ServiceException
- Throws:
ServiceException
fetchDataItem
SyncDataItem fetchDataItem(SyncBackend.RequestContext requestContext,
String profileName,
SyncCollection collection,
String itemId)
throws ServiceException
- Throws:
ServiceException
moveDataItem
String moveDataItem(SyncBackend.RequestContext requestContext,
String profileName,
String srcFolderId,
String dstFolderId,
String itemId)
throws ServiceException
- Throws:
ServiceException
getAttachementData
AttachmentDataT getAttachementData(SyncBackend.RequestContext requestContext,
String attachmentId)
throws ServiceException
- Throws:
ServiceException
createOrUpdateDataItem
String createOrUpdateDataItem(SyncBackend.RequestContext requestContext,
String profileName,
SyncCollection collection,
String itemId,
IData data)
throws ServiceException
- Throws:
ServiceException
deleteDataItem
void deleteDataItem(SyncBackend.RequestContext requestContext,
String profileName,
SyncCollection collection,
String itemId)
throws ServiceException
- Throws:
ServiceException
setDataItemReadFlag
void setDataItemReadFlag(SyncBackend.RequestContext requestContext,
String folderId,
String itemId,
boolean read)
throws ServiceException
- Throws:
ServiceException
getChangedDataItems
GetChangedDataItemsResult getChangedDataItems(SyncBackend.RequestContext requestContext,
String profileName,
SyncCollection collection,
boolean noData,
int maxItems,
SyncDataItem.State state,
Set<String> excludes)
throws ServiceException
- Throws:
ServiceException
getDeletedDataItems
List<String> getDeletedDataItems(SyncBackend.RequestContext requestContext,
String profileName,
SyncCollection collection,
String syncKeyTo)
throws ServiceException
- Return deleted data items starting from collection.getSyncKey() up to syncKeyTo
- Parameters:
requestContext - profileName - collection - currentSyncKey -
- Returns:
- list of deleted items
- Throws:
ServiceException
getChangedFolders
List<SyncFolder> getChangedFolders(SyncBackend.RequestContext requestContext,
String profileName,
String syncKey)
throws ServiceException
- Throws:
ServiceException
getDeletedFolders
List<SyncFolder> getDeletedFolders(SyncBackend.RequestContext requestContext,
String profileName,
String syncKey)
throws ServiceException
- Throws:
ServiceException
createOrUpdateFolder
String createOrUpdateFolder(SyncBackend.RequestContext requestContext,
SyncFolder folder)
throws ServiceException
- Throws:
ServiceException
deleteFolder
String deleteFolder(SyncBackend.RequestContext requestContext,
String folderId)
throws ServiceException
- Throws:
ServiceException
folderIsValid
boolean folderIsValid(SyncBackend.RequestContext requestContext,
String profileName,
SyncCollection collection)
throws ServiceException
- Validates whether folder specified by folderId and collectionType is valid.
- Parameters:
userId - folderId -
- Returns:
- true if folderId is valid.
- Throws:
ServiceException
sendMail
void sendMail(SyncBackend.RequestContext requestContext,
InputStream mimeMessage)
throws ServiceException
- Throws:
ServiceException
getContextTempDir
File getContextTempDir(SyncBackend.RequestContext requestContext,
File tempDir)
throws ServiceException
- Throws:
ServiceException
getClientProfile
ClientProfile getClientProfile(SyncBackend.RequestContext requestContext,
String profileName)
throws ServiceException
- Throws:
ServiceException
updateClientProfile
void updateClientProfile(SyncBackend.RequestContext requestContext,
ClientProfile clientProfile,
Set<String> folderIds,
boolean noSyncKeys,
boolean noMappings)
throws ServiceException
- Updates the client profile.
- Parameters:
requestContext - request context.clientProfile - profile.folderIds - list of folders to be updated. If null all folders are updated.noSyncKeys - sync keys are not updated if true.noMappings - mappings are not updated if true.
- Throws:
ServiceException
This software is published under the BSD license. Copyright © 2003-2010, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.