Package fr.gouv.vitam.processing.data.core

# Class ProcessDataAccessImpl

java.lang.Object
fr.gouv.vitam.processing.data.core.ProcessDataAccessImpl

All Implemented Interfaces:
  `ProcessDataAccess`

public class ProcessDataAccessImpl extends 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

  Modifier and Type
  Method
  Description
  `void`
  `addToWorkflowList(ProcessWorkflow processWorkflow)`
  Add process to Workflow
  Only use on application starting to load persisted workflow (state are PAUSED or FAILED only)
  `void`
  `clearWorkflow()`
  `List<ProcessWorkflow>`
  `findAllProcessWorkflow(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 need
  `ProcessWorkflow`
  `findOneProcessWorkflow(String processId, Integer tenantId)`
  Gets Process Workflow by ID
  `static ProcessDataAccessImpl`
  `getInstance()`
  Get the Process Monitoring instance
  `Map<Integer,Map<String,ProcessWorkflow>>`
  `getWorkFlowList()`
  getter of WorkflowList
  `ProcessWorkflow`
  `initProcessWorkflow(WorkFlow workflow, String containerName)`
  Allows a process to be initialized

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getInstance

    public static ProcessDataAccessImpl getInstance()
    Get the Process Monitoring instance
    Returns:
      the ProcessMonitoring instance

  - ### initProcessWorkflow

    public ProcessWorkflow initProcessWorkflow(WorkFlow workflow, String containerName)
    Description copied from interface: `ProcessDataAccess`
    Allows a process to be initialized
    Specified by:
      `initProcessWorkflow` in interface `ProcessDataAccess`
    Parameters:
      `workflow` - the workflow to init
      `containerName` - : null not allowed , the name of the container to be processed
    Returns:
      `LogbookTypeProcess`

  - ### findOneProcessWorkflow

    public ProcessWorkflow findOneProcessWorkflow(String processId, Integer tenantId) throws WorkflowNotFoundException
    Description copied from interface: `ProcessDataAccess`
    Gets Process Workflow by ID
    Specified by:
      `findOneProcessWorkflow` in interface `ProcessDataAccess`
    Parameters:
      `processId` - the process id
      `tenantId` - the working tenant
    Returns:
      `ProcessWorkflow`
    Throws:
      `WorkflowNotFoundException` - thrown when process workflow not found

  - ### clearWorkflow

    public void clearWorkflow()

  - ### findAllProcessWorkflow

    public List<ProcessWorkflow> findAllProcessWorkflow(Integer tenantId)
    Description copied from interface: `ProcessDataAccess`
    Retrieves 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:
      `findAllProcessWorkflow` in interface `ProcessDataAccess`
    Parameters:
      `tenantId` - the working tenant
    Returns:
      All the workflow process details

  - ### addToWorkflowList

    public void addToWorkflowList(ProcessWorkflow processWorkflow)
    Description copied from interface: `ProcessDataAccess`
    Add process to Workflow
    Only use on application starting to load persisted workflow (state are PAUSED or FAILED only)
    Specified by:
      `addToWorkflowList` in interface `ProcessDataAccess`
    Parameters:
      `processWorkflow` - the loaded persisted process to add

  - ### getWorkFlowList

    public Map<Integer,Map<String,ProcessWorkflow>> getWorkFlowList()
    Description copied from interface: `ProcessDataAccess`
    getter of WorkflowList
    Specified by:
      `getWorkFlowList` in interface `ProcessDataAccess`
    Returns: