public class OpenCrxSyncBackend extends Object implements SyncBackend
SyncBackend.RequestContext
DOMAIN_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.ServiceException
protected AirSyncProfile getSyncProfile(UserHome user, String profileName)
public SyncBackend.RequestContext newRequestContext(String userId, Object context)
newRequestContext
in interface SyncBackend
public 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.ServiceException
public String getNextSyncKey(SyncBackend.RequestContext requestContext, String syncKey)
getNextSyncKey
in interface SyncBackend
public void deleteDataItem(SyncBackend.RequestContext requestContext, String profileName, SyncCollection collection, String itemId) throws org.openmdx.base.exception.ServiceException
deleteDataItem
in interface SyncBackend
org.openmdx.base.exception.ServiceException
public SyncDataItem fetchDataItem(SyncBackend.RequestContext requestContext, String profileName, SyncCollection collection, String itemId) throws org.openmdx.base.exception.ServiceException
fetchDataItem
in interface SyncBackend
org.openmdx.base.exception.ServiceException
public AttachmentDataT getAttachementData(SyncBackend.RequestContext requestContext, String attachmentId) throws org.openmdx.base.exception.ServiceException
getAttachementData
in interface SyncBackend
org.openmdx.base.exception.ServiceException
protected Activity createActivity(ActivityGroup group, short activityClass, String name, String detailedDescription, Date scheduledStart) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
protected Document createDocument(DocumentFolder documentFolder, String name) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
public String createOrUpdateDataItem(SyncBackend.RequestContext requestContext, String profileName, SyncCollection collection, String itemId, IData data) throws org.openmdx.base.exception.ServiceException
createOrUpdateDataItem
in interface SyncBackend
org.openmdx.base.exception.ServiceException
public String moveDataItem(SyncBackend.RequestContext requestContext, String profileName, String srcFolderId, String dstFolderId, String itemId) throws org.openmdx.base.exception.ServiceException
moveDataItem
in interface SyncBackend
org.openmdx.base.exception.ServiceException
public void setDataItemReadFlag(SyncBackend.RequestContext requestContext, String folderId, String itemId, boolean read) throws org.openmdx.base.exception.ServiceException
setDataItemReadFlag
in interface SyncBackend
org.openmdx.base.exception.ServiceException
public 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 SyncBackend
org.openmdx.base.exception.ServiceException
public List<String> getDeletedDataItems(SyncBackend.RequestContext requestContext, String profileName, SyncCollection collection, String syncKeyTo) throws org.openmdx.base.exception.ServiceException
SyncBackend
getDeletedDataItems
in interface SyncBackend
org.openmdx.base.exception.ServiceException
public String createOrUpdateFolder(SyncBackend.RequestContext requestContext, SyncFolder folder)
createOrUpdateFolder
in interface SyncBackend
public String deleteFolder(SyncBackend.RequestContext requestContext, String folderId)
deleteFolder
in interface SyncBackend
public boolean folderIsValid(SyncBackend.RequestContext requestContext, String profileName, SyncCollection collection) throws org.openmdx.base.exception.ServiceException
SyncBackend
folderIsValid
in interface SyncBackend
org.openmdx.base.exception.ServiceException
public List<SyncFolder> getFolders(SyncBackend.RequestContext requestContext, String profileName, String syncKey, boolean activeFoldersOnly) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
public List<SyncFolder> getChangedFolders(SyncBackend.RequestContext requestContext, String profileName, String syncKey) throws org.openmdx.base.exception.ServiceException
getChangedFolders
in interface SyncBackend
org.openmdx.base.exception.ServiceException
public List<SyncFolder> getDeletedFolders(SyncBackend.RequestContext requestContext, String profileName, String syncKey) throws org.openmdx.base.exception.ServiceException
getDeletedFolders
in interface SyncBackend
org.openmdx.base.exception.ServiceException
public void sendMail(SyncBackend.RequestContext requestContext, InputStream mimeMessage) throws org.openmdx.base.exception.ServiceException
sendMail
in interface SyncBackend
org.openmdx.base.exception.ServiceException
public File getContextTempDir(SyncBackend.RequestContext requestContext, File tempDir) throws org.openmdx.base.exception.ServiceException
getContextTempDir
in interface SyncBackend
org.openmdx.base.exception.ServiceException
public ClientProfile getClientProfile(SyncBackend.RequestContext requestContext, String profileName) throws org.openmdx.base.exception.ServiceException
getClientProfile
in interface SyncBackend
org.openmdx.base.exception.ServiceException
public void updateClientProfile(SyncBackend.RequestContext requestContext, ClientProfile clientSyncProfile, Set<String> folderIds, boolean noSyncKeys, boolean noMappings) throws org.openmdx.base.exception.ServiceException
SyncBackend
updateClientProfile
in interface SyncBackend
requestContext
- 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.ServiceException
This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.