public class WorkspaceProcessDataManagement extends Object implements ProcessDataManagement
PROCESS_CONTAINER| Constructor and Description |
|---|
WorkspaceProcessDataManagement(WorkspaceClientFactory workspaceClientFactory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createFolder(String folderName)
Create a folder with the name {folderName} if does not exist on the process container
|
boolean |
createProcessContainer()
Create the process container (initialisation) if does not exist
|
DistributorIndex |
getDistributorIndex(String folderName,
String fileName) |
static ProcessDataManagement |
getInstance()
Get the current instance
|
ProcessWorkflow |
getProcessWorkflow(String folderName,
String asyncId)
Retrieve a workflow instance on process container
|
Map<String,ProcessWorkflow> |
getProcessWorkflowFor(Integer tenantId,
String folderName)
Get process workflow map for tenantId and folderName (server id from serverIdentity)
|
boolean |
isFolderExist(String folderName)
Check if the folder with name {folderName} exists on process container
|
boolean |
isProcessContainerExist()
Check if the process container exists
|
void |
persistDistributorIndex(String folderName,
String fileName,
DistributorIndex distributorIndex) |
void |
persistProcessWorkflow(String folderName,
String asyncId,
ProcessWorkflow processWorkflow)
Put process workflow instance in workspace
|
boolean |
removeFolder(String folderName)
Delete folder with name {folderName} if exists on process container
|
void |
removeProcessWorkflow(String folderName,
String asyncId)
Delete process workflow instance on process container
|
public WorkspaceProcessDataManagement(WorkspaceClientFactory workspaceClientFactory)
public static ProcessDataManagement getInstance()
public boolean createProcessContainer()
throws ProcessingStorageWorkspaceException
ProcessDataManagementcreateProcessContainer in interface ProcessDataManagementProcessingStorageWorkspaceException - when storage error occurspublic boolean isProcessContainerExist()
throws ProcessingStorageWorkspaceException
ProcessDataManagementisProcessContainerExist in interface ProcessDataManagementProcessingStorageWorkspaceException - when storage error occurspublic boolean createFolder(String folderName) throws ProcessingStorageWorkspaceException
ProcessDataManagementcreateFolder in interface ProcessDataManagementfolderName - the name of the folder to createProcessingStorageWorkspaceException - when storage error occurspublic boolean isFolderExist(String folderName) throws ProcessingStorageWorkspaceException
ProcessDataManagementisFolderExist in interface ProcessDataManagementfolderName - the folder name to checkProcessingStorageWorkspaceException - when storage error occurspublic boolean removeFolder(String folderName) throws ProcessingStorageWorkspaceException
ProcessDataManagementremoveFolder in interface ProcessDataManagementfolderName - the folderName to deleteProcessingStorageWorkspaceException - when storage error occurspublic void persistProcessWorkflow(String folderName, String asyncId, ProcessWorkflow processWorkflow) throws ProcessingStorageWorkspaceException, InvalidParseOperationException
ProcessDataManagementpersistProcessWorkflow in interface ProcessDataManagementfolderName - the folder to put workflow instance on process containerasyncId - the request id (asynchronous id)processWorkflow - the instance to saveProcessingStorageWorkspaceException - when storage error occursInvalidParseOperationException - when serializing object to json failpublic void persistDistributorIndex(String folderName, String fileName, DistributorIndex distributorIndex) throws ProcessingStorageWorkspaceException, InvalidParseOperationException
persistDistributorIndex in interface ProcessDataManagementProcessingStorageWorkspaceExceptionInvalidParseOperationExceptionpublic DistributorIndex getDistributorIndex(String folderName, String fileName) throws ProcessingStorageWorkspaceException, InvalidParseOperationException
getDistributorIndex in interface ProcessDataManagementProcessingStorageWorkspaceExceptionInvalidParseOperationExceptionpublic ProcessWorkflow getProcessWorkflow(String folderName, String asyncId) throws ProcessingStorageWorkspaceException, InvalidParseOperationException
ProcessDataManagementgetProcessWorkflow in interface ProcessDataManagementfolderName - the folder on process container to get workflow instanceasyncId - the request id (asynchronous id)ProcessingStorageWorkspaceException - when storage error occursInvalidParseOperationException - when deserializing object to json failpublic void removeProcessWorkflow(String folderName, String asyncId) throws ProcessingStorageWorkspaceException
ProcessDataManagementremoveProcessWorkflow in interface ProcessDataManagementfolderName - the folder on process container to remove workflow instanceasyncId - the request id (asynchronous id)ProcessingStorageWorkspaceException - when storage error occurspublic Map<String,ProcessWorkflow> getProcessWorkflowFor(Integer tenantId, String folderName) throws ProcessingStorageWorkspaceException
ProcessDataManagementgetProcessWorkflowFor in interface ProcessDataManagementtenantId - the tenant IDfolderName - the folder name (server id from serverIdentity)ProcessingStorageWorkspaceException - thrown if an error ocurred when loading process fileCopyright © 2021 Vitam. All rights reserved.