public class WorkspaceThreddsSynchronize extends Object implements WorkspaceThreddsSynchronizedRepository<ThSyncStatus,ThSyncFolderDescriptor>
| Modifier and Type | Field and Description |
|---|---|
static String |
WS_SYNCH_SYNCH_STATUS |
| Modifier and Type | Method and Description |
|---|---|
ThSyncFolderDescriptor |
checkItemSynched(String itemId)
Check item synched.
|
String |
decribeSyncRepository()
Decribe sync repository.
|
ThSyncStatus |
doSync(String itemId)
Do sync.
|
Boolean |
doUnSync(String itemId,
boolean deleteRemoteContent)
Do un sync.
|
List<ThCatalogueBean> |
getAvailableCataloguesByToken(String token)
Gets the available catalogues by token.
|
static WorkspaceThreddsSynchronize |
getInstance()
Gets the single instance of WorkspaceThreddsSynchronize.
|
Sync_Status |
getSynchedStatusFromItemProperty(String itemId,
String username)
Gets the synched status from item property.
|
Boolean |
initRepository()
Inits the repository.
|
ThSyncStatus |
monitorSyncStatus(String itemId)
Gets the sync status.
|
void |
registerCallbackForId(String itemId)
Register callback for id.
|
Boolean |
removeSync(String itemId)
Removes the sync.
|
ThSyncFolderDescriptor |
setSynchronizedFolder(ThSynchFolderConfiguration thConfig,
String itemId)
Sets the synchronized folder.
|
Boolean |
shutDownRepository()
Shutdown repository.
|
Boolean |
stopSync(String itemId)
Stop sync.
|
public static final String WS_SYNCH_SYNCH_STATUS
public static WorkspaceThreddsSynchronize getInstance()
public ThSyncFolderDescriptor checkItemSynched(String itemId) throws ItemNotSynched, WorkspaceFolderLocked, Exception
DoCheckSyncItemcheckItemSynched in interface DoCheckSyncItem<ThSyncFolderDescriptor>itemId - the item idItemNotSynched - the item not synchedException - the exceptionWorkspaceFolderLockedpublic ThSyncFolderDescriptor setSynchronizedFolder(ThSynchFolderConfiguration thConfig, String itemId) throws Exception
thConfig - the th configitemId - the item idException - the exceptionpublic ThSyncStatus doSync(String itemId) throws Exception
DoSyncItemdoSync in interface DoSyncItem<ThSyncStatus>itemId - the item idItemNotSynched - the item not synchedException - the exceptionpublic ThSyncStatus monitorSyncStatus(String itemId) throws ItemNotSynched, Exception
DoSyncItemmonitorSyncStatus in interface DoSyncItem<ThSyncStatus>itemId - the item idItemNotSynched - the item not synchedException - the exceptionpublic Boolean removeSync(String itemId)
DoSyncItemremoveSync in interface DoSyncItem<ThSyncStatus>itemId - the item idpublic Boolean stopSync(String itemId)
DoSyncItemstopSync in interface DoSyncItem<ThSyncStatus>itemId - the item idpublic Boolean initRepository()
DoConnectRepositoryinitRepository in interface DoConnectRepositorypublic Boolean shutDownRepository()
DoConnectRepositoryshutDownRepository in interface DoConnectRepositorypublic String decribeSyncRepository()
WorkspaceThreddsSynchronizedRepositorydecribeSyncRepository in interface WorkspaceThreddsSynchronizedRepository<ThSyncStatus,ThSyncFolderDescriptor>public Sync_Status getSynchedStatusFromItemProperty(String itemId, String username) throws ItemNotSynched, Exception
folderId - the folder idusername - the usernameItemNotSynched - the item not synchedException - the exceptionpublic void registerCallbackForId(String itemId) throws org.gcube.usecases.ws.thredds.faults.ProcessNotFoundException, Exception
registerCallbackForId in interface DoSyncItem<ThSyncStatus>itemId - the item idException - the exceptionorg.gcube.usecases.ws.thredds.faults.ProcessNotFoundExceptionpublic List<ThCatalogueBean> getAvailableCataloguesByToken(String token) throws Exception
token - the tokenException - the exceptionpublic Boolean doUnSync(String itemId, boolean deleteRemoteContent) throws Exception
DoSyncItemdoUnSync in interface DoSyncItem<ThSyncStatus>itemId - the item iddeleteRemoteContent - the delete remote contentItemNotSynched - the item not synchedException - the exceptionCopyright © 2018. All Rights Reserved.