public class DuraStoreSyncEndpoint extends Object implements SyncEndpoint
Constructor and Description |
---|
DuraStoreSyncEndpoint(ContentStore contentStore,
String username,
String spaceId,
boolean syncDeletes,
boolean jumpStart) |
DuraStoreSyncEndpoint(ContentStore contentStore,
String username,
String spaceId,
boolean syncDeletes,
boolean syncUpdates,
boolean renameUpdates,
boolean jumpStart,
String updateSuffix,
String prefix) |
Modifier and Type | Method and Description |
---|---|
void |
addEndPointListener(EndPointListener listener)
Registers a listener
|
protected void |
addUpdateContent(String contentId,
MonitoredFile syncFile) |
protected Map<String,String> |
createProps(String absolutePath,
String username) |
void |
deleteContent(String spaceId,
String contentId)
Removes content from the endpoint.
|
protected void |
doAddContent(MonitoredFile syncFile,
String contentId,
String absPath) |
protected Map<String,String> |
getContentProperties(String spaceId,
String contentId) |
protected ContentStore |
getContentStore() |
Iterator<String> |
getFilesList()
Retrieves a listing of all files available at the endpoint.
|
protected String |
getSpaceId() |
protected String |
getUsername() |
void |
removeEndPointListener(EndPointListener listener)
Unregisters a listener
|
boolean |
syncFile(MonitoredFile syncFile,
File watchDir)
Ensures that the endpoint includes a file equivalent to the provided
local file:
- If the local file exists but no file with the same path exists at
the endpoint, the local file will be copied to the endpoint
- If the local file exists and is different from a file with the same
path at the endpoint, the local file will replace the file at the
endpoint.
|
SyncResultType |
syncFileAndReturnDetailedResult(MonitoredFile syncFile,
File watchDir)
An alternate form of the syncFile method that returns a more nuanced result.
|
public DuraStoreSyncEndpoint(ContentStore contentStore, String username, String spaceId, boolean syncDeletes, boolean syncUpdates, boolean renameUpdates, boolean jumpStart, String updateSuffix, String prefix)
public DuraStoreSyncEndpoint(ContentStore contentStore, String username, String spaceId, boolean syncDeletes, boolean jumpStart)
protected String getUsername()
public boolean syncFile(MonitoredFile syncFile, File watchDir)
SyncEndpoint
syncFile
in interface SyncEndpoint
syncFile
- local file to sync with the endpointwatchDir
- the directory under watch in which this file residespublic SyncResultType syncFileAndReturnDetailedResult(MonitoredFile syncFile, File watchDir)
SyncEndpoint
syncFileAndReturnDetailedResult
in interface SyncEndpoint
protected void doAddContent(MonitoredFile syncFile, String contentId, String absPath) throws ContentStoreException
ContentStoreException
protected Map<String,String> getContentProperties(String spaceId, String contentId)
public void deleteContent(String spaceId, String contentId) throws ContentStoreException
SyncEndpoint
deleteContent
in interface SyncEndpoint
ContentStoreException
protected void addUpdateContent(String contentId, MonitoredFile syncFile) throws ContentStoreException
ContentStoreException
public Iterator<String> getFilesList()
SyncEndpoint
getFilesList
in interface SyncEndpoint
protected ContentStore getContentStore()
protected String getSpaceId()
public void addEndPointListener(EndPointListener listener)
SyncEndpoint
addEndPointListener
in interface SyncEndpoint
public void removeEndPointListener(EndPointListener listener)
SyncEndpoint
removeEndPointListener
in interface SyncEndpoint
Copyright © 2009–2014 DuraSpace. All rights reserved.