Class IngestExternalResource
- java.lang.Object
-
- fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
-
- fr.gouv.vitam.ingest.external.rest.IngestExternalResource
-
@Path("/ingest-external/v1") public class IngestExternalResource extends ApplicationStatusResource
-
-
Field Summary
-
Fields inherited from class fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
STATUS_URL, TENANTS_URL
-
-
Constructor Summary
Constructors Constructor Description IngestExternalResource(IngestExternalConfiguration ingestExternalConfiguration, SecureEndpointRegistry secureEndpointRegistry, FormatIdentifierFactory formatIdentifierFactory, IngestInternalClientFactory ingestInternalClientFactory)
Constructor IngestExternalResource
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
downloadArchiveTransferReplyAsStream(java.lang.String objectId)
Download archive transfer reply stored by Ingest operationjavax.ws.rs.core.Response
downloadIngestManifestsAsStream(java.lang.String objectId)
Download manifest stored by Ingest operationjavax.ws.rs.core.Response
listResourceEndpoints()
List secured resource end pointsvoid
upload(java.lang.String contextId, java.lang.String action, java.lang.String manifestDigestAlgo, java.lang.String manifestDigestValue, java.io.InputStream uploadedInputStream, javax.ws.rs.container.AsyncResponse asyncResponse)
upload the file in localvoid
uploadLocal(java.lang.String contextId, java.lang.String action, java.lang.String manifestDigestAlgo, java.lang.String manifestDigestValue, LocalFile localFile, javax.ws.rs.container.AsyncResponse asyncResponse)
upload a local file-
Methods inherited from class fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
getServerTenants, status
-
-
-
-
Constructor Detail
-
IngestExternalResource
public IngestExternalResource(IngestExternalConfiguration ingestExternalConfiguration, SecureEndpointRegistry secureEndpointRegistry, FormatIdentifierFactory formatIdentifierFactory, IngestInternalClientFactory ingestInternalClientFactory)
Constructor IngestExternalResource- Parameters:
ingestExternalConfiguration
- the configuration of server resourcesecureEndpointRegistry
-
-
-
Method Detail
-
listResourceEndpoints
@Path("/") @OPTIONS @Produces("application/json") public javax.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") java.lang.String contextId, @HeaderParam("X-ACTION") java.lang.String action, @HeaderParam("X-Manifest-Digest-Algo") java.lang.String manifestDigestAlgo, @HeaderParam("X-Manifest-Digest-Value") java.lang.String manifestDigestValue, java.io.InputStream uploadedInputStream, @Suspended javax.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") java.lang.String contextId, @HeaderParam("X-ACTION") java.lang.String action, @HeaderParam("X-Manifest-Digest-Algo") java.lang.String manifestDigestAlgo, @HeaderParam("X-Manifest-Digest-Value") java.lang.String manifestDigestValue, LocalFile localFile, @Suspended javax.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 javax.ws.rs.core.Response downloadArchiveTransferReplyAsStream(@PathParam("objectId") java.lang.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 javax.ws.rs.core.Response downloadIngestManifestsAsStream(@PathParam("objectId") java.lang.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
-
-