Package de.dlr.proseo.api.aipclient.rest
Class BynameControllerImpl
java.lang.Object
de.dlr.proseo.api.aipclient.rest.BynameControllerImpl
- All Implemented Interfaces:
BynameController
Retrieve a single product from a remote Long-term Archive by file name
- Author:
- Dr. Thomas Bassler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<RestProduct> downloadByName(String filename, String facility, org.springframework.http.HttpHeaders httpHeaders) Provide the product with the given file name at the given processing facility.
-
Constructor Details
-
BynameControllerImpl
public BynameControllerImpl()
-
-
Method Details
-
downloadByName
public org.springframework.http.ResponseEntity<RestProduct> downloadByName(String filename, String facility, org.springframework.http.HttpHeaders httpHeaders) Provide the product with the given file name at the given processing facility. If it already is available there, do nothing and just return the product metadata. If it is not available locally, query all configured LTAs for a product with the given file name, the first response is returned to the caller, then download from the LTA and ingested at the given processing facility.- Specified by:
downloadByNamein interfaceBynameController- Parameters:
filename- The (unique) product file name to search forfacility- The processing facility to store the downloaded product files inhttpHeaders- the HTTP request headers (injected)- Returns:
- HTTP status "OK" and a Json representation of the product provided or HTTP status "NOT_FOUND", if no file with the given name could be found either locally or in any configured LTA, or HTTP status "BAD_REQUEST", if an invalid processing facility was given, or HTTP status "INTERNAL_SERVER_ERROR", if the communication to the Ingestor failed or an unexpected exception occurred
-