Package fr.gouv.vitam.batch.report.rest.repository

# Class EvidenceAuditReportRepository

java.lang.Object
fr.gouv.vitam.batch.report.rest.repository.ReportCommonRepository
fr.gouv.vitam.batch.report.rest.repository.EvidenceAuditReportRepository

public class EvidenceAuditReportRepository extends ReportCommonRepository
EvidenceAuditReportRepository

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `EVIDENCE_AUDIT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EvidenceAuditReportRepository(MongoDbAccess mongoDbAccess)`
  `EvidenceAuditReportRepository(MongoDbAccess mongoDbAccess, String collectionName)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `bulkAppendReport(List<EvidenceAuditObjectModel> reports)`
  Appends report items to database
  `ReportResults`
  `computeVitamResults(String processId, Integer tenantId)`
  Compute the number of OK, WARNING, and KO
  `void`
  `deleteReportByIdAndTenant(String processId, int tenantId)`
  delete the report at finalization Step
  `com.mongodb.client.MongoCursor<org.bson.Document>`
  `findCollectionByProcessIdTenant(String processId, int tenantId)`
  Retrieve all report mongo document for a report
  `com.mongodb.client.MongoCursor<org.bson.Document>`
  `findCollectionByProcessIdTenantAndStatus(String processId, int tenantId, String... status)`
  Retrieve report mongo document for a report filtered by defined statuses
  `EvidenceAuditStatsModel`
  `stats(String processId, int tenantId)`
  Generate statistics of evidence audit report

  ### Methods inherited from class fr.gouv.vitam.batch.report.rest.repository.ReportCommonRepository

  `bulkAppendReport, deleteReportByIdAndTenant`

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

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

- ## Field Details

  - ### EVIDENCE_AUDIT

    public static final String EVIDENCE_AUDIT
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### EvidenceAuditReportRepository

    public EvidenceAuditReportRepository(MongoDbAccess mongoDbAccess, String collectionName)

  - ### EvidenceAuditReportRepository

    public EvidenceAuditReportRepository(MongoDbAccess mongoDbAccess)

- ## Method Details

  - ### bulkAppendReport

    public void bulkAppendReport(List<EvidenceAuditObjectModel> reports)
    Appends report items to database
    Parameters:
      `reports` - report items

  - ### deleteReportByIdAndTenant

    public void deleteReportByIdAndTenant(String processId, int tenantId)
    delete the report at finalization Step
    Parameters:
      `processId` - the process id
      `tenantId` - the tenantId id

  - ### computeVitamResults

    public ReportResults computeVitamResults(String processId, Integer tenantId)
    Compute the number of OK, WARNING, and KO
    Parameters:
      `processId` - the process id
      `tenantId` - the tenantId id

  - ### findCollectionByProcessIdTenant

    public com.mongodb.client.MongoCursor<org.bson.Document> findCollectionByProcessIdTenant(String processId, int tenantId)
    Retrieve all report mongo document for a report
    Parameters:
      `processId` - processId
      `tenantId` - tenantId
    Returns:
      mongo cursor of report documents

  - ### findCollectionByProcessIdTenantAndStatus

    public com.mongodb.client.MongoCursor<org.bson.Document> findCollectionByProcessIdTenantAndStatus(String processId, int tenantId, String... status)
    Retrieve report mongo document for a report filtered by defined statuses
    Parameters:
      `processId` - processId
      `tenantId` - tenantId
      `status` - statuses
    Returns:
      mongo cursor of report documents

  - ### stats

    public EvidenceAuditStatsModel stats(String processId, int tenantId)
    Generate statistics of evidence audit report
    Parameters:
      `processId` - processId
      `tenantId` - tenantId
    Returns:
      statistics of evidence audit report