Class IngestExternalResource
java.lang.Object
fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
fr.gouv.vitam.ingest.external.rest.IngestExternalResource
-
Field Summary
Fields inherited from class fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
STATUS_URL, TENANTS_URL -
Constructor Summary
ConstructorsConstructorDescriptionIngestExternalResource(IngestExternalConfiguration ingestExternalConfiguration, SecureEndpointRegistry secureEndpointRegistry, FormatIdentifierFactory formatIdentifierFactory, IngestInternalClientFactory ingestInternalClientFactory, AntivirusClientFactory antivirusClientFactory) Constructor IngestExternalResource -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponsedownloadArchiveTransferReplyAsStream(String objectId) Download archive transfer reply stored by Ingest operationjakarta.ws.rs.core.ResponsedownloadIngestManifestsAsStream(String objectId) Download manifest stored by Ingest operationjakarta.ws.rs.core.ResponseList secured resource end pointsvoidupload(String contextId, String action, String manifestDigestAlgo, String manifestDigestValue, InputStream uploadedInputStream, jakarta.ws.rs.container.AsyncResponse asyncResponse) upload the file in localvoiduploadLocal(String contextId, String action, String manifestDigestAlgo, String manifestDigestValue, LocalFile localFile, jakarta.ws.rs.container.AsyncResponse asyncResponse) upload a local fileMethods inherited from class fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
getServerTenants, status
-
Constructor Details
-
IngestExternalResource
public IngestExternalResource(IngestExternalConfiguration ingestExternalConfiguration, SecureEndpointRegistry secureEndpointRegistry, FormatIdentifierFactory formatIdentifierFactory, IngestInternalClientFactory ingestInternalClientFactory, AntivirusClientFactory antivirusClientFactory) Constructor IngestExternalResource- Parameters:
ingestExternalConfiguration- the configuration of server resourcesecureEndpointRegistry-
-
-
Method Details
-
listResourceEndpoints
@Path("/") @OPTIONS @Produces("application/json") public jakarta.ws.rs.core.Response listResourceEndpoints()List secured resource end points- Returns:
- response
-
upload
@Path("ingests") @POST @Consumes("application/octet-stream") public void upload(@HeaderParam("X-Context-Id") String contextId, @HeaderParam("X-ACTION") String action, @HeaderParam("X-Manifest-Digest-Algo") String manifestDigestAlgo, @HeaderParam("X-Manifest-Digest-Value") String manifestDigestValue, InputStream uploadedInputStream, @Suspended jakarta.ws.rs.container.AsyncResponse asyncResponse) upload the file in local- Parameters:
contextId- the context id of uploadaction- in workflowuploadedInputStream- data input streamasyncResponse- the asynchronized response
-
uploadLocal
@Path("ingests") @POST @Consumes("application/json") public void uploadLocal(@HeaderParam("X-Context-Id") String contextId, @HeaderParam("X-ACTION") String action, @HeaderParam("X-Manifest-Digest-Algo") String manifestDigestAlgo, @HeaderParam("X-Manifest-Digest-Value") String manifestDigestValue, LocalFile localFile, @Suspended jakarta.ws.rs.container.AsyncResponse asyncResponse) upload a local file- Parameters:
contextId- the context id of uploadaction- in workflowlocalFile- local fileasyncResponse- the asynchronized response
-
downloadArchiveTransferReplyAsStream
@GET @Path("/ingests/{objectId}/archivetransferreply") @Produces("application/octet-stream") public jakarta.ws.rs.core.Response downloadArchiveTransferReplyAsStream(@PathParam("objectId") String objectId) Download archive transfer reply stored by Ingest operationReturn the archive transfer reply as stream asynchronously
The caller is responsible to close the Response after consuming the inputStream.- Parameters:
objectId- the id of archive transfer reply to download- Returns:
- response
-
downloadIngestManifestsAsStream
@GET @Path("/ingests/{objectId}/manifests") @Produces("application/octet-stream") public jakarta.ws.rs.core.Response downloadIngestManifestsAsStream(@PathParam("objectId") String objectId) Download manifest stored by Ingest operationReturn the manifest as stream asynchronously
The caller is responsible to close the Response after consuming the inputStream.- Parameters:
objectId- the id of object to download- Returns:
- The given response with the manifest
-