Klasse IngestControllerImpl

java.lang.Object
de.dlr.proseo.ingestor.rest.IngestControllerImpl
Alle implementierten Schnittstellen:
IngestController

@Component public class IngestControllerImpl extends Object implements IngestController
Spring MVC controller for the prosEO Ingestor; implements the services required to ingest products from pickup points into the prosEO database, and to query the database about such products
Autor:
Dr. Thomas Bassler
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    org.springframework.http.ResponseEntity<?>
    deleteProductFile(Long productId, String processingFacility, Boolean eraseFiles, org.springframework.http.HttpHeaders httpHeaders)
    Delete a product file for a product from a given processing facility (metadata and actual data file(s))
    org.springframework.http.ResponseEntity<RestProductFile>
    getProductFile(Long productId, String processingFacility, org.springframework.http.HttpHeaders httpHeaders)
    Get the product file metadata for a product at a given processing facility
    org.springframework.http.ResponseEntity<RestProductFile>
    ingestProductFile(Long productId, String processingFacility, @Valid RestProductFile productFile, org.springframework.http.HttpHeaders httpHeaders)
    Create the metadata of a new product file for a product at a given processing facility (it is assumed that the files themselves are already pushed to the Storage Manager) The Production Planner will be notified of the ingested product.
    org.springframework.http.ResponseEntity<List<RestProduct>>
    ingestProducts(String processingFacility, Boolean copyFiles, @Valid List<IngestorProduct> ingestorProducts, org.springframework.http.HttpHeaders httpHeaders)
    Ingest all given products into the storage manager of the given processing facility.
    org.springframework.http.ResponseEntity<RestProductFile>
    modifyProductFile(Long productId, String processingFacility, RestProductFile productFile, org.springframework.http.HttpHeaders httpHeaders)
    Update the product file metadata for a product at a given processing facility (it is assumed that any new or changed files themselves are already pushed to the Storage Manager)

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • IngestControllerImpl

      public IngestControllerImpl()
  • Methodendetails

    • ingestProducts

      public org.springframework.http.ResponseEntity<List<RestProduct>> ingestProducts(String processingFacility, Boolean copyFiles, @Valid @Valid List<IngestorProduct> ingestorProducts, org.springframework.http.HttpHeaders httpHeaders)
      Ingest all given products into the storage manager of the given processing facility. If the ID of a product to ingest is null or 0 (zero), then the product will be created, otherwise a matching product will be looked up and updated. The Production Planner will be notified of all ingested products. However, notification is optional, and if it fails, the Ingestor still returns with HTTP status CREATED. We rely on a cyclical check by the Production Planner to pick up all newly ingested products, should it not have been notified.
      Angegeben von:
      ingestProducts in Schnittstelle IngestController
      Parameter:
      processingFacility - the processing facility to ingest products to
      copyFiles - indicates, whether to copy the files to a different storage area (default "true"; only applicable if source and target storage type are the same)
      ingestorProducts - a list of product descriptions with product file locations
      httpHeaders - the HTTP request headers (injected)
      Gibt zurück:
      HTTP status "CREATED" and a Json list of the products updated and/or created including their product files or HTTP status "BAD_REQUEST", if an invalid processing facility was given, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "INTERNAL_SERVER_ERROR", if the communication to the Storage Manager or to the Production Planner failed
    • getProductFile

      public org.springframework.http.ResponseEntity<RestProductFile> getProductFile(Long productId, String processingFacility, org.springframework.http.HttpHeaders httpHeaders)
      Get the product file metadata for a product at a given processing facility
      Angegeben von:
      getProductFile in Schnittstelle IngestController
      Parameter:
      productId - the ID of the product to retrieve
      processingFacility - the processing facility to retrieve the product file metadata for
      httpHeaders - the HTTP request headers (injected)
      Gibt zurück:
      HTTP status "OK" and the Json representation of the product file metadata, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "NOT_FOUND", if no product file for the given product ID exists at the given processing facility
    • ingestProductFile

      public org.springframework.http.ResponseEntity<RestProductFile> ingestProductFile(Long productId, String processingFacility, @Valid @Valid RestProductFile productFile, org.springframework.http.HttpHeaders httpHeaders)
      Create the metadata of a new product file for a product at a given processing facility (it is assumed that the files themselves are already pushed to the Storage Manager) The Production Planner will be notified of the ingested product. However, notification is optional, and if it fails, the Ingestor still returns with HTTP status CREATED. We rely on a cyclical check by the Production Planner to pick up all newly ingested products, should it not have been notified.
      Angegeben von:
      ingestProductFile in Schnittstelle IngestController
      Parameter:
      productId - the ID of the product to retrieve
      processingFacility - the name of the processing facility, in which the files have been stored
      productFile - the REST product file to store
      httpHeaders - the HTTP request headers (injected)
      Gibt zurück:
      HTTP status "CREATED" and the updated REST product file (with ID and version) or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "BAD_REQUEST", if the processing facility or the product cannot be found, or if the data for the product file is invalid (also, if a product file for the given processing facility already exists)
    • deleteProductFile

      public org.springframework.http.ResponseEntity<?> deleteProductFile(Long productId, String processingFacility, Boolean eraseFiles, org.springframework.http.HttpHeaders httpHeaders)
      Delete a product file for a product from a given processing facility (metadata and actual data file(s))
      Angegeben von:
      deleteProductFile in Schnittstelle IngestController
      Parameter:
      productId - the ID of the product to retrieve
      processingFacility - the name of the processing facility, from which the files shall be deleted
      eraseFiles - erase the data file(s) from the storage area (default "true")
      httpHeaders - the HTTP request headers (injected)
      Gibt zurück:
      a response entity with HTTP status "NO_CONTENT", if the deletion was successful, or HTTP status "NOT_FOUND", if the processing facility, the product or the product file did not exist, or HTTP status "BAD_REQUEST", if the product currently satisfies a product query for the given processing facility, or HTTP status "NOT_MODIFIED", if the deletion was unsuccessful, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "INTERNAL_SERVER_ERROR", if the communication to the Storage Manager or to the Production Planner failed
    • modifyProductFile

      public org.springframework.http.ResponseEntity<RestProductFile> modifyProductFile(Long productId, String processingFacility, RestProductFile productFile, org.springframework.http.HttpHeaders httpHeaders)
      Update the product file metadata for a product at a given processing facility (it is assumed that any new or changed files themselves are already pushed to the Storage Manager)
      Angegeben von:
      modifyProductFile in Schnittstelle IngestController
      Parameter:
      productId - the ID of the product to retrieve
      processingFacility - the name of the processing facility, in which the files have been stored
      productFile - the REST product file to store
      httpHeaders - the HTTP request headers (injected)
      Gibt zurück:
      HTTP status OK and the updated REST product file (with ID and version) or HTTP status "NOT_FOUND" and an error message, if no product with the given ID or no processing facility with the given name exists, or HTTP status "BAD_REQUEST" and an error message, if any of the input data was invalid, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "CONFLICT"and an error message, if the product file has been modified since retrieval by the client