public class DuraStoreSyncEndpoint extends Object implements SyncEndpoint
| Constructor and Description |
|---|
DuraStoreSyncEndpoint(ContentStore contentStore,
String username,
String spaceId,
boolean syncDeletes) |
DuraStoreSyncEndpoint(ContentStore contentStore,
String username,
String spaceId,
boolean syncDeletes,
boolean syncUpdates,
boolean renameUpdates,
String updateSuffix) |
| 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) |
protected void |
deleteContent(String spaceId,
String contentId) |
protected String |
getContentId(MonitoredFile syncFile,
File watchDir) |
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, String updateSuffix)
public DuraStoreSyncEndpoint(ContentStore contentStore, String username, String spaceId, boolean syncDeletes)
protected String getUsername()
public boolean syncFile(MonitoredFile syncFile, File watchDir)
SyncEndpointsyncFile in interface SyncEndpointsyncFile - local file to sync with the endpointwatchDir - the directory under watch in which this file residespublic SyncResultType syncFileAndReturnDetailedResult(MonitoredFile syncFile, File watchDir)
SyncEndpointsyncFileAndReturnDetailedResult in interface SyncEndpointprotected Map<String,String> getContentProperties(String spaceId, String contentId)
protected void deleteContent(String spaceId, String contentId) throws ContentStoreException
ContentStoreExceptionprotected void addUpdateContent(String contentId, MonitoredFile syncFile) throws ContentStoreException
ContentStoreExceptionprotected String getContentId(MonitoredFile syncFile, File watchDir)
public Iterator<String> getFilesList()
SyncEndpointgetFilesList in interface SyncEndpointprotected ContentStore getContentStore()
protected String getSpaceId()
public void addEndPointListener(EndPointListener listener)
SyncEndpointaddEndPointListener in interface SyncEndpointpublic void removeEndPointListener(EndPointListener listener)
SyncEndpointremoveEndPointListener in interface SyncEndpointCopyright © 2009-2013 DuraSpace. All Rights Reserved.