public class OpenCrxSyncBackend extends Object implements SyncBackend
SyncBackend.RequestContextDOMAIN_SEPARATOR| Constructor and Description |
|---|
OpenCrxSyncBackend(javax.jdo.PersistenceManagerFactory pmf,
String providerName)
Create backend with default data type mapper.
|
OpenCrxSyncBackend(javax.jdo.PersistenceManagerFactory pmf,
String providerName,
DatatypeMapper datatypeMapper) |
| Modifier and Type | Method and Description |
|---|---|
protected Activity |
createActivity(ActivityGroup group,
short activityClass,
String name,
String detailedDescription,
Date scheduledStart) |
protected Document |
createDocument(DocumentFolder documentFolder,
String name) |
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) |
org.openmdx.base.accessor.jmi.cci.RefObject_1_0 |
findFolder(UserHome user,
String profileName,
SyncCollection collection,
boolean forAddDelete,
boolean forChange) |
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 windowSize,
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) |
List<SyncFolder> |
getFolders(SyncBackend.RequestContext requestContext,
String profileName,
String syncKey,
boolean activeFoldersOnly) |
String |
getNextSyncKey(SyncBackend.RequestContext requestContext,
String syncKey) |
protected AirSyncProfile |
getSyncProfile(UserHome user,
String profileName) |
protected UserHome |
getUserHome(javax.jdo.PersistenceManager pm,
String userId) |
boolean |
isInitialSync(SyncBackend.RequestContext requestContext,
String syncKey) |
String |
moveDataItem(SyncBackend.RequestContext requestContext,
String profileName,
String srcFolderId,
String dstFolderId,
String itemId) |
protected javax.jdo.PersistenceManager |
newPersistenceManager(SyncBackend.RequestContext requestContext) |
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 clientSyncProfile,
Set<String> folderIds,
boolean noSyncKeys,
boolean noMappings)
Updates the client profile.
|
public OpenCrxSyncBackend(javax.jdo.PersistenceManagerFactory pmf,
String providerName)
public OpenCrxSyncBackend(javax.jdo.PersistenceManagerFactory pmf,
String providerName,
DatatypeMapper datatypeMapper)
protected javax.jdo.PersistenceManager newPersistenceManager(SyncBackend.RequestContext requestContext) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceExceptionprotected AirSyncProfile getSyncProfile(UserHome user, String profileName)
public SyncBackend.RequestContext newRequestContext(String userId, Object context)
newRequestContext in interface SyncBackendpublic org.openmdx.base.accessor.jmi.cci.RefObject_1_0 findFolder(UserHome user, String profileName, SyncCollection collection, boolean forAddDelete, boolean forChange)
public boolean isInitialSync(SyncBackend.RequestContext requestContext, String syncKey) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceExceptionpublic String getNextSyncKey(SyncBackend.RequestContext requestContext, String syncKey)
getNextSyncKey in interface SyncBackendpublic void deleteDataItem(SyncBackend.RequestContext requestContext, String profileName, SyncCollection collection, String itemId) throws org.openmdx.base.exception.ServiceException
deleteDataItem in interface SyncBackendorg.openmdx.base.exception.ServiceExceptionpublic SyncDataItem fetchDataItem(SyncBackend.RequestContext requestContext, String profileName, SyncCollection collection, String itemId) throws org.openmdx.base.exception.ServiceException
fetchDataItem in interface SyncBackendorg.openmdx.base.exception.ServiceExceptionpublic AttachmentDataT getAttachementData(SyncBackend.RequestContext requestContext, String attachmentId) throws org.openmdx.base.exception.ServiceException
getAttachementData in interface SyncBackendorg.openmdx.base.exception.ServiceExceptionprotected Activity createActivity(ActivityGroup group, short activityClass, String name, String detailedDescription, Date scheduledStart) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceExceptionprotected Document createDocument(DocumentFolder documentFolder, String name) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceExceptionpublic String createOrUpdateDataItem(SyncBackend.RequestContext requestContext, String profileName, SyncCollection collection, String itemId, IData data) throws org.openmdx.base.exception.ServiceException
createOrUpdateDataItem in interface SyncBackendorg.openmdx.base.exception.ServiceExceptionpublic String moveDataItem(SyncBackend.RequestContext requestContext, String profileName, String srcFolderId, String dstFolderId, String itemId) throws org.openmdx.base.exception.ServiceException
moveDataItem in interface SyncBackendorg.openmdx.base.exception.ServiceExceptionpublic void setDataItemReadFlag(SyncBackend.RequestContext requestContext, String folderId, String itemId, boolean read) throws org.openmdx.base.exception.ServiceException
setDataItemReadFlag in interface SyncBackendorg.openmdx.base.exception.ServiceExceptionpublic GetChangedDataItemsResult getChangedDataItems(SyncBackend.RequestContext requestContext, String profileName, SyncCollection collection, boolean noData, int windowSize, SyncDataItem.State state, Set<String> excludes) throws org.openmdx.base.exception.ServiceException
getChangedDataItems in interface SyncBackendorg.openmdx.base.exception.ServiceExceptionpublic List<String> getDeletedDataItems(SyncBackend.RequestContext requestContext, String profileName, SyncCollection collection, String syncKeyTo) throws org.openmdx.base.exception.ServiceException
SyncBackendgetDeletedDataItems in interface SyncBackendorg.openmdx.base.exception.ServiceExceptionpublic String createOrUpdateFolder(SyncBackend.RequestContext requestContext, SyncFolder folder)
createOrUpdateFolder in interface SyncBackendpublic String deleteFolder(SyncBackend.RequestContext requestContext, String folderId)
deleteFolder in interface SyncBackendpublic boolean folderIsValid(SyncBackend.RequestContext requestContext, String profileName, SyncCollection collection) throws org.openmdx.base.exception.ServiceException
SyncBackendfolderIsValid in interface SyncBackendorg.openmdx.base.exception.ServiceExceptionpublic List<SyncFolder> getFolders(SyncBackend.RequestContext requestContext, String profileName, String syncKey, boolean activeFoldersOnly) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceExceptionpublic List<SyncFolder> getChangedFolders(SyncBackend.RequestContext requestContext, String profileName, String syncKey) throws org.openmdx.base.exception.ServiceException
getChangedFolders in interface SyncBackendorg.openmdx.base.exception.ServiceExceptionpublic List<SyncFolder> getDeletedFolders(SyncBackend.RequestContext requestContext, String profileName, String syncKey) throws org.openmdx.base.exception.ServiceException
getDeletedFolders in interface SyncBackendorg.openmdx.base.exception.ServiceExceptionpublic void sendMail(SyncBackend.RequestContext requestContext, InputStream mimeMessage) throws org.openmdx.base.exception.ServiceException
sendMail in interface SyncBackendorg.openmdx.base.exception.ServiceExceptionpublic File getContextTempDir(SyncBackend.RequestContext requestContext, File tempDir) throws org.openmdx.base.exception.ServiceException
getContextTempDir in interface SyncBackendorg.openmdx.base.exception.ServiceExceptionpublic ClientProfile getClientProfile(SyncBackend.RequestContext requestContext, String profileName) throws org.openmdx.base.exception.ServiceException
getClientProfile in interface SyncBackendorg.openmdx.base.exception.ServiceExceptionpublic void updateClientProfile(SyncBackend.RequestContext requestContext, ClientProfile clientSyncProfile, Set<String> folderIds, boolean noSyncKeys, boolean noMappings) throws org.openmdx.base.exception.ServiceException
SyncBackendupdateClientProfile in interface SyncBackendrequestContext - request context.clientSyncProfile - 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.org.openmdx.base.exception.ServiceExceptionThis software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.