Package fr.gouv.vitam.batch.report.client

# Class BatchReportClientRest

java.lang.Object
fr.gouv.vitam.common.client.DefaultClient
fr.gouv.vitam.batch.report.client.BatchReportClientRest

All Implemented Interfaces:
  `BatchReportClient`, `BasicClient`, `MockOrRestClient`, `BasicClient`, `VitamAutoCloseable`, `AutoCloseable`

public class BatchReportClientRest extends DefaultClient implements BatchReportClient

- ## Field Summary

  ### Fields inherited from interface fr.gouv.vitam.common.client.BasicClient

  `STATUS_URL`

  ### Fields inherited from interface fr.gouv.vitam.common.external.client.BasicClient

  `STATUS_URL`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `appendReportEntries(ReportBody reportBody)`
  Append report entries
  `void`
  `checkStatus()`
  Check the status from the service
  `void`
  `checkStatus(jakarta.ws.rs.core.MultivaluedHashMap<String,Object> headers)`
  Check the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificate
  `void`
  `cleanupReport(String processId, ReportType reportType)`
  Clean all entries with the given process Id tenant and reportType
  `void`
  `close()`
  Close the underneath http client
  `final void`
  `consumeAnyEntityAndClose(jakarta.ws.rs.core.Response response)`
  Helper when an error occurs on client usage side to consume response however
  `void`
  `createExtractedMetadataDistributionFileForAu(String processId, WorkFlowExecutionContext executionContext)`
  `void`
  `exportUnitsToInvalidate(String processId, ReportExportRequest reportExportRequest, WorkFlowExecutionContext executionContext)`
  Generate units to invalidate by process Id.
  `void`
  `generatePurgeAccessionRegisterReport(String processId, ReportExportRequest reportExportRequest, WorkFlowExecutionContext executionContext)`
  Generate elimination action accession register for deleted units by status and process Id.
  `void`
  `generatePurgeDistinctObjectGroupInUnitReport(String processId, ReportExportRequest reportExportRequest, WorkFlowExecutionContext executionContext)`
  Generate purge district object groups for units by status and process Id.
  `jakarta.ws.rs.client.Client`
  `getChunkedClient()`
  `jakarta.ws.rs.client.Client`
  `getClient()`
  `VitamClientFactory<?>`
  `getClientFactory()`
  `String`
  `getResourcePath()`
  Get the resource path of the server.
  `String`
  `getServiceUrl()`
  Get the service URL
  `jakarta.ws.rs.core.Response`
  `make(VitamRequestBuilder request)`
  `jakarta.ws.rs.core.Response`
  `makeSpecifyingUrl(VitamRequestBuilder request)`
  `com.fasterxml.jackson.databind.JsonNode`
  `readComputedDetailsFromReport(ReportType reportType, String processId)`
  `static void`
  `staticConsumeAnyEntityAndClose(jakarta.ws.rs.core.Response response)`
  This method consume everything (in particular InputStream) and close the response.
  `void`
  `storeExtractedMetadataForAu(List<ExtractedMetadata> extractedMetadata)`
  `void`
  `storeReportToWorkspace(Report reportInfo, WorkFlowExecutionContext executionContext)`
  `String`
  `toString()`

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

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

  ### Methods inherited from interface fr.gouv.vitam.common.client.MockOrRestClient

  `checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl`

- ## Method Details

  - ### generatePurgeDistinctObjectGroupInUnitReport

    public void generatePurgeDistinctObjectGroupInUnitReport(String processId, ReportExportRequest reportExportRequest, WorkFlowExecutionContext executionContext) throws VitamClientInternalException
    Description copied from interface: `BatchReportClient`
    Generate purge district object groups for units by status and process Id. Report is stored in JSONL format in workspace.
    Specified by:
      `generatePurgeDistinctObjectGroupInUnitReport` in interface `BatchReportClient`
    Parameters:
      `processId` -
      `reportExportRequest` - report export request
      `executionContext` -
    Throws:
      `VitamClientInternalException`

  - ### appendReportEntries

    public void appendReportEntries(ReportBody reportBody) throws VitamClientInternalException
    Description copied from interface: `BatchReportClient`
    Append report entries
    Specified by:
      `appendReportEntries` in interface `BatchReportClient`
    Parameters:
      `reportBody` - the given entry document.
    Throws:
      `VitamClientInternalException`

  - ### storeReportToWorkspace

    public void storeReportToWorkspace(Report reportInfo, WorkFlowExecutionContext executionContext) throws VitamClientInternalException
    Specified by:
      `storeReportToWorkspace` in interface `BatchReportClient`
    Throws:
      `VitamClientInternalException`

  - ### exportUnitsToInvalidate

    public void exportUnitsToInvalidate(String processId, ReportExportRequest reportExportRequest, WorkFlowExecutionContext executionContext) throws VitamClientInternalException
    Description copied from interface: `BatchReportClient`
    Generate units to invalidate by process Id. Report is stored in JSONL format without duplicates.
    Specified by:
      `exportUnitsToInvalidate` in interface `BatchReportClient`
    Throws:
      `VitamClientInternalException`

  - ### generatePurgeAccessionRegisterReport

    public void generatePurgeAccessionRegisterReport(String processId, ReportExportRequest reportExportRequest, WorkFlowExecutionContext executionContext) throws VitamClientInternalException
    Description copied from interface: `BatchReportClient`
    Generate elimination action accession register for deleted units by status and process Id. Report is stored in JSONL format in workspace ORDERED BY opi.
    Specified by:
      `generatePurgeAccessionRegisterReport` in interface `BatchReportClient`
    Parameters:
      `processId` -
      `reportExportRequest` - report export request
      `executionContext` -
    Throws:
      `VitamClientInternalException`

  - ### cleanupReport

    public void cleanupReport(String processId, ReportType reportType) throws VitamClientInternalException
    Description copied from interface: `BatchReportClient`
    Clean all entries with the given process Id tenant and reportType
    Specified by:
      `cleanupReport` in interface `BatchReportClient`
    Parameters:
      `processId` - the given process Id
      `reportType` - report type
    Throws:
      `VitamClientInternalException`

  - ### storeExtractedMetadataForAu

    public void storeExtractedMetadataForAu(List<ExtractedMetadata> extractedMetadata) throws VitamClientInternalException
    Specified by:
      `storeExtractedMetadataForAu` in interface `BatchReportClient`
    Throws:
      `VitamClientInternalException`

  - ### createExtractedMetadataDistributionFileForAu

    public void createExtractedMetadataDistributionFileForAu(String processId, WorkFlowExecutionContext executionContext) throws Exception
    Specified by:
      `createExtractedMetadataDistributionFileForAu` in interface `BatchReportClient`
    Throws:
      `Exception`

  - ### readComputedDetailsFromReport

    public com.fasterxml.jackson.databind.JsonNode readComputedDetailsFromReport(ReportType reportType, String processId)
    Specified by:
      `readComputedDetailsFromReport` in interface `BatchReportClient`

  - ### staticConsumeAnyEntityAndClose

    public static void staticConsumeAnyEntityAndClose(jakarta.ws.rs.core.Response response)
    This method consume everything (in particular InputStream) and close the response.
    Parameters:
      `response` -

  - ### consumeAnyEntityAndClose

    public final void consumeAnyEntityAndClose(jakarta.ws.rs.core.Response response)
    Description copied from interface: `MockOrRestClient`
    Helper when an error occurs on client usage side to consume response however
    Specified by:
      `consumeAnyEntityAndClose` in interface `MockOrRestClient`
    Parameters:
      `response` -

  - ### checkStatus

    public void checkStatus() throws VitamApplicationServerException
    Description copied from interface: `MockOrRestClient`
    Check the status from the service
    Specified by:
      `checkStatus` in interface `MockOrRestClient`
    Throws:
      `VitamApplicationServerException` - if the Server is unavailable

  - ### checkStatus

    public void checkStatus(jakarta.ws.rs.core.MultivaluedHashMap<String,Object> headers) throws VitamApplicationServerException
    Description copied from interface: `MockOrRestClient`
    Check the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificate
    Specified by:
      `checkStatus` in interface `MockOrRestClient`
    Parameters:
      `headers` -
    Throws:
      `VitamApplicationServerException` - if the Server is unavailable

  - ### getResourcePath

    public String getResourcePath()
    Description copied from interface: `MockOrRestClient`
    Get the resource path of the server.
    Specified by:
      `getResourcePath` in interface `MockOrRestClient`
    Returns:
      the resource path as string

  - ### getServiceUrl

    public String getServiceUrl()
    Description copied from interface: `MockOrRestClient`
    Get the service URL
    Specified by:
      `getServiceUrl` in interface `MockOrRestClient`
    Returns:
      the service URL

  - ### close

    public void close()
    Description copied from interface: `MockOrRestClient`
    Close the underneath http client
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `MockOrRestClient`
    Specified by:
      `close` in interface `VitamAutoCloseable`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### makeSpecifyingUrl

    public jakarta.ws.rs.core.Response makeSpecifyingUrl(VitamRequestBuilder request) throws VitamClientInternalException
    Throws:
      `VitamClientInternalException`

  - ### make

    public jakarta.ws.rs.core.Response make(VitamRequestBuilder request) throws VitamClientInternalException
    Throws:
      `VitamClientInternalException`

  - ### getClientFactory

    public VitamClientFactory<?> getClientFactory()

  - ### getClient

    public jakarta.ws.rs.client.Client getClient()

  - ### getChunkedClient

    public jakarta.ws.rs.client.Client getChunkedClient()