public class DuraStoreSyncEndpoint extends Object implements SyncEndpoint
| Constructor and Description |
|---|
DuraStoreSyncEndpoint(org.duracloud.client.ContentStore contentStore,
String username,
String spaceId,
boolean syncDeletes,
boolean jumpStart) |
DuraStoreSyncEndpoint(org.duracloud.client.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 org.duracloud.client.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(org.duracloud.client.ContentStore contentStore, String username, String spaceId, boolean syncDeletes, boolean syncUpdates, boolean renameUpdates, boolean jumpStart, String updateSuffix, String prefix)
public DuraStoreSyncEndpoint(org.duracloud.client.ContentStore contentStore, String username, String spaceId, boolean syncDeletes, boolean jumpStart)
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 void doAddContent(MonitoredFile syncFile, String contentId, String absPath) throws org.duracloud.error.ContentStoreException
protected Map<String,String> getContentProperties(String spaceId, String contentId)
public void deleteContent(String spaceId, String contentId) throws org.duracloud.error.ContentStoreException
SyncEndpointdeleteContent in interface SyncEndpointorg.duracloud.error.ContentStoreExceptionprotected void addUpdateContent(String contentId, MonitoredFile syncFile) throws org.duracloud.error.ContentStoreException
public Iterator<String> getFilesList()
SyncEndpointgetFilesList in interface SyncEndpointprotected org.duracloud.client.ContentStore getContentStore()
protected String getSpaceId()
public void addEndPointListener(EndPointListener listener)
SyncEndpointaddEndPointListener in interface SyncEndpointpublic void removeEndPointListener(EndPointListener listener)
SyncEndpointremoveEndPointListener in interface SyncEndpointCopyright © 2009–2018 DuraSpace. All rights reserved.