Class ProcessDataAccessImpl
- java.lang.Object
-
- fr.gouv.vitam.processing.data.core.ProcessDataAccessImpl
-
- All Implemented Interfaces:
ProcessDataAccess
public class ProcessDataAccessImpl extends java.lang.Object implements ProcessDataAccess
ProcessMonitoringImpl class implementing the ProcessMonitoring Persists processWorkflow object (to json) at each step in process/name as .json Remove this file at the end (completed, failed state)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToWorkflowList(ProcessWorkflow processWorkflow)Add process to Workflow
Only use on application starting to load persisted workflow (state are PAUSED or FAILED only)voidclearWorkflow()java.util.List<ProcessWorkflow>findAllProcessWorkflow(java.lang.Integer tenantId)Retrieves All the workflow process for monitoring purpose The final business scope of this feature is likely to be redefined, to match the future needProcessWorkflowfindOneProcessWorkflow(java.lang.String processId, java.lang.Integer tenantId)Gets Process Workflow by IDstatic ProcessDataAccessImplgetInstance()Get the Process Monitoring instancejava.util.Map<java.lang.Integer,java.util.Map<java.lang.String,ProcessWorkflow>>getWorkFlowList()getter of WorkflowListProcessWorkflowinitProcessWorkflow(WorkFlow workflow, java.lang.String containerName)Allows a process to be initialized
-
-
-
Method Detail
-
getInstance
public static ProcessDataAccessImpl getInstance()
Get the Process Monitoring instance- Returns:
- the ProcessMonitoring instance
-
initProcessWorkflow
public ProcessWorkflow initProcessWorkflow(WorkFlow workflow, java.lang.String containerName)
Description copied from interface:ProcessDataAccessAllows a process to be initialized- Specified by:
initProcessWorkflowin interfaceProcessDataAccess- Parameters:
workflow- the workflow to initcontainerName- : null not allowed , the name of the container to be processed- Returns:
LogbookTypeProcess
-
findOneProcessWorkflow
public ProcessWorkflow findOneProcessWorkflow(java.lang.String processId, java.lang.Integer tenantId) throws WorkflowNotFoundException
Description copied from interface:ProcessDataAccessGets Process Workflow by ID- Specified by:
findOneProcessWorkflowin interfaceProcessDataAccess- Parameters:
processId- the process idtenantId- the working tenant- Returns:
ProcessWorkflow- Throws:
WorkflowNotFoundException- thrown when process workflow not found
-
clearWorkflow
public void clearWorkflow()
-
findAllProcessWorkflow
public java.util.List<ProcessWorkflow> findAllProcessWorkflow(java.lang.Integer tenantId)
Description copied from interface:ProcessDataAccessRetrieves All the workflow process for monitoring purpose The final business scope of this feature is likely to be redefined, to match the future need- Specified by:
findAllProcessWorkflowin interfaceProcessDataAccess- Parameters:
tenantId- the working tenant- Returns:
- All the workflow process details
-
addToWorkflowList
public void addToWorkflowList(ProcessWorkflow processWorkflow)
Description copied from interface:ProcessDataAccessAdd process to Workflow
Only use on application starting to load persisted workflow (state are PAUSED or FAILED only)- Specified by:
addToWorkflowListin interfaceProcessDataAccess- Parameters:
processWorkflow- the loaded persisted process to add
-
getWorkFlowList
public java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,ProcessWorkflow>> getWorkFlowList()
Description copied from interface:ProcessDataAccessgetter of WorkflowList- Specified by:
getWorkFlowListin interfaceProcessDataAccess- Returns:
-
-