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,java.lang.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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendReportEntries(ReportBody reportBody)Append report entriesvoidcheckStatus()Check the status from the servicevoidcheckStatus(javax.ws.rs.core.MultivaluedHashMap<java.lang.String,java.lang.Object> headers)Check the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificatevoidcleanupReport(java.lang.String processId, ReportType reportType)Clean all entries with the given process Id tenant and reportTypevoidclose()Close the underneath http clientvoidconsumeAnyEntityAndClose(javax.ws.rs.core.Response response)Helper when an error occurs on client usage side to consume response howevervoidcreateExtractedMetadataDistributionFileForAu(java.lang.String processId)voidexportUnitsToInvalidate(java.lang.String processId, ReportExportRequest reportExportRequest)Generate units to invalidate by process Id.voidgeneratePurgeAccessionRegisterReport(java.lang.String processId, ReportExportRequest reportExportRequest)Generate elimination action accession register for deleted units by status and process Id.voidgeneratePurgeDistinctObjectGroupInUnitReport(java.lang.String processId, ReportExportRequest reportExportRequest)Generate purge district object groups for units by status and process Id.javax.ws.rs.client.ClientgetChunkedClient()javax.ws.rs.client.ClientgetClient()VitamClientFactory<?>getClientFactory()java.lang.StringgetResourcePath()Get the resource path of the server.java.lang.StringgetServiceUrl()Get the service URLjavax.ws.rs.core.Responsemake(VitamRequestBuilder request)javax.ws.rs.core.ResponsemakeSpecifyingUrl(VitamRequestBuilder request)com.fasterxml.jackson.databind.JsonNodereadComputedDetailsFromReport(ReportType reportType, java.lang.String processId)static voidstaticConsumeAnyEntityAndClose(javax.ws.rs.core.Response response)This method consume everything (in particular InputStream) and close the response.voidstoreExtractedMetadataForAu(java.util.List<ExtractedMetadata> extractedMetadata)voidstoreReportToWorkspace(Report reportInfo)java.lang.StringtoString()-
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 Detail
-
generatePurgeDistinctObjectGroupInUnitReport
public void generatePurgeDistinctObjectGroupInUnitReport(java.lang.String processId, ReportExportRequest reportExportRequest) throws VitamClientInternalExceptionDescription copied from interface:BatchReportClientGenerate purge district object groups for units by status and process Id. Report is stored in JSONL format in workspace.- Specified by:
generatePurgeDistinctObjectGroupInUnitReportin interfaceBatchReportClientreportExportRequest- report export request- Throws:
VitamClientInternalException
-
appendReportEntries
public void appendReportEntries(ReportBody reportBody) throws VitamClientInternalException
Description copied from interface:BatchReportClientAppend report entries- Specified by:
appendReportEntriesin interfaceBatchReportClient- Parameters:
reportBody- the given entry document.- Throws:
VitamClientInternalException
-
storeReportToWorkspace
public void storeReportToWorkspace(Report reportInfo) throws VitamClientInternalException
- Specified by:
storeReportToWorkspacein interfaceBatchReportClient- Throws:
VitamClientInternalException
-
exportUnitsToInvalidate
public void exportUnitsToInvalidate(java.lang.String processId, ReportExportRequest reportExportRequest) throws VitamClientInternalExceptionDescription copied from interface:BatchReportClientGenerate units to invalidate by process Id. Report is stored in JSONL format without duplicates.- Specified by:
exportUnitsToInvalidatein interfaceBatchReportClient- Throws:
VitamClientInternalException
-
generatePurgeAccessionRegisterReport
public void generatePurgeAccessionRegisterReport(java.lang.String processId, ReportExportRequest reportExportRequest) throws VitamClientInternalExceptionDescription copied from interface:BatchReportClientGenerate 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:
generatePurgeAccessionRegisterReportin interfaceBatchReportClientreportExportRequest- report export request- Throws:
VitamClientInternalException
-
cleanupReport
public void cleanupReport(java.lang.String processId, ReportType reportType) throws VitamClientInternalExceptionDescription copied from interface:BatchReportClientClean all entries with the given process Id tenant and reportType- Specified by:
cleanupReportin interfaceBatchReportClient- Parameters:
processId- the given process IdreportType- report type- Throws:
VitamClientInternalException
-
storeExtractedMetadataForAu
public void storeExtractedMetadataForAu(java.util.List<ExtractedMetadata> extractedMetadata) throws VitamClientInternalException
- Specified by:
storeExtractedMetadataForAuin interfaceBatchReportClient- Throws:
VitamClientInternalException
-
createExtractedMetadataDistributionFileForAu
public void createExtractedMetadataDistributionFileForAu(java.lang.String processId) throws java.lang.Exception- Specified by:
createExtractedMetadataDistributionFileForAuin interfaceBatchReportClient- Throws:
java.lang.Exception
-
readComputedDetailsFromReport
public com.fasterxml.jackson.databind.JsonNode readComputedDetailsFromReport(ReportType reportType, java.lang.String processId)
- Specified by:
readComputedDetailsFromReportin interfaceBatchReportClient
-
staticConsumeAnyEntityAndClose
public static void staticConsumeAnyEntityAndClose(javax.ws.rs.core.Response response)
This method consume everything (in particular InputStream) and close the response.- Parameters:
response-
-
consumeAnyEntityAndClose
public final void consumeAnyEntityAndClose(javax.ws.rs.core.Response response)
Description copied from interface:MockOrRestClientHelper when an error occurs on client usage side to consume response however- Specified by:
consumeAnyEntityAndClosein interfaceMockOrRestClient
-
checkStatus
public void checkStatus() throws VitamApplicationServerExceptionDescription copied from interface:MockOrRestClientCheck the status from the service- Specified by:
checkStatusin interfaceMockOrRestClient- Throws:
VitamApplicationServerException- if the Server is unavailable
-
checkStatus
public void checkStatus(javax.ws.rs.core.MultivaluedHashMap<java.lang.String,java.lang.Object> headers) throws VitamApplicationServerExceptionDescription copied from interface:MockOrRestClientCheck the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificate- Specified by:
checkStatusin interfaceMockOrRestClient- Throws:
VitamApplicationServerException- if the Server is unavailable
-
getResourcePath
public java.lang.String getResourcePath()
Description copied from interface:MockOrRestClientGet the resource path of the server.- Specified by:
getResourcePathin interfaceMockOrRestClient- Returns:
- the resource path as string
-
getServiceUrl
public java.lang.String getServiceUrl()
Description copied from interface:MockOrRestClientGet the service URL- Specified by:
getServiceUrlin interfaceMockOrRestClient- Returns:
- the service URL
-
close
public void close()
Description copied from interface:MockOrRestClientClose the underneath http client- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceMockOrRestClient- Specified by:
closein interfaceVitamAutoCloseable
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
makeSpecifyingUrl
public javax.ws.rs.core.Response makeSpecifyingUrl(VitamRequestBuilder request) throws VitamClientInternalException
- Throws:
VitamClientInternalException
-
make
public javax.ws.rs.core.Response make(VitamRequestBuilder request) throws VitamClientInternalException
- Throws:
VitamClientInternalException
-
getClientFactory
public VitamClientFactory<?> getClientFactory()
-
getClient
public javax.ws.rs.client.Client getClient()
-
getChunkedClient
public javax.ws.rs.client.Client getChunkedClient()
-
-