Klasse ProductControllerImpl

java.lang.Object
de.dlr.proseo.ingestor.rest.ProductControllerImpl
Alle implementierten Schnittstellen:
ProductController

@Component public class ProductControllerImpl extends Object implements ProductController
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<?>
    countProducts(String mission, String[] productClass, String mode, String fileClass, String quality, String startTimeFrom, String startTimeTo, String genTimeFrom, String genTimeTo, Long jobStepId, org.springframework.http.HttpHeaders httpHeaders)
    Number of products available, possibly filtered by mission, product class and time range
    org.springframework.http.ResponseEntity<RestProduct>
    createProduct(@Valid RestProduct product, org.springframework.http.HttpHeaders httpHeaders)
    Create a product from the given Json object (does NOT create associated product files!)
    org.springframework.http.ResponseEntity<?>
    deleteProductById(Long id, org.springframework.http.HttpHeaders httpHeaders)
    Delete a product by ID
    org.springframework.http.ResponseEntity<?>
    downloadProductById(Long id, Long fromByte, Long toByte, org.springframework.http.HttpHeaders httpHeaders)
    Get the primary data file (or ZIP file, if available) for the product as data stream (optionally range-restricted), returns a redirection link to the Storage Manager of a random Processing Facility
    org.springframework.http.ResponseEntity<?>
    getDownloadTokenById(Long id, String fileName, org.springframework.http.HttpHeaders httpHeaders)
    Get a JSON Web Token for creating a download link to a Storage Manager
    org.springframework.http.ResponseEntity<RestProduct>
    getProductById(Long id, org.springframework.http.HttpHeaders httpHeaders)
    Find the product with the given ID
    org.springframework.http.ResponseEntity<RestProduct>
    getProductByUuid(@Pattern(regexp="^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$") String uuid, org.springframework.http.HttpHeaders httpHeaders)
    Get a product by UUID
    org.springframework.http.ResponseEntity<List<RestProduct>>
    getProducts(String mission, String[] productClass, String mode, String fileClass, String quality, String startTimeFrom, String startTimeTo, String genTimeFrom, String genTimeTo, Integer recordFrom, Integer recordTo, Long jobStepId, String[] orderBy, org.springframework.http.HttpHeaders httpHeaders)
    List of all products filtered by mission, product class, start time range; the output will be ordered by the columns given in orderBy, and the resulting product list will only contain the records in the given range
    org.springframework.http.ResponseEntity<RestProduct>
    modifyProduct(Long id, RestProduct product, org.springframework.http.HttpHeaders httpHeaders)
    Update the product with the given ID with the attribute values of the given Json object.

    Von Klasse geerbte Methoden java.lang.Object

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

    • ProductControllerImpl

      public ProductControllerImpl()
  • Methodendetails

    • deleteProductById

      public org.springframework.http.ResponseEntity<?> deleteProductById(Long id, org.springframework.http.HttpHeaders httpHeaders)
      Delete a product by ID
      Angegeben von:
      deleteProductById in Schnittstelle ProductController
      Parameter:
      id - the ID of the product to delete
      httpHeaders - HTTP Authentication header
      Gibt zurück:
      a response entity with HTTP status "NO_CONTENT", if the deletion was successful, or HTTP status "NOT_FOUND", if the product did not exist, or HTTP status "BAD_REQUEST", if the product still has files at some Processing Facility, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "NOT_MODIFIED", if the deletion was unsuccessful
    • getProducts

      public org.springframework.http.ResponseEntity<List<RestProduct>> getProducts(String mission, String[] productClass, String mode, String fileClass, String quality, String startTimeFrom, String startTimeTo, String genTimeFrom, String genTimeTo, Integer recordFrom, Integer recordTo, Long jobStepId, String[] orderBy, org.springframework.http.HttpHeaders httpHeaders)
      List of all products filtered by mission, product class, start time range; the output will be ordered by the columns given in orderBy, and the resulting product list will only contain the records in the given range
      Angegeben von:
      getProducts in Schnittstelle ProductController
      Parameter:
      mission - the mission code
      productClass - an array of product types
      mode - processing mode as defined for the mission
      fileClass - one of the file classes defined for the mission
      quality - indicator for the suitability of this product for general use
      startTimeFrom - earliest sensing start time
      startTimeTo - latest sensing start time
      genTimeFrom - product generation time, earliest
      genTimeTo - product generation time, latest
      recordFrom - the first product to retrieve
      recordTo - the last product to retrieve
      jobStepId - job step that produced the products (if any)
      orderBy - an array of strings containing a column name and an optional sort direction (ASC/DESC), separated by white space
      httpHeaders - HTTP Authentication header
      Gibt zurück:
      HTTP status "OK" and a list of products or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "NOT_FOUND" and an error message, if no products matching the search criteria were found HTTP status "TOO MANY REQUESTS" if the result list exceeds a configured maximum
    • countProducts

      public org.springframework.http.ResponseEntity<?> countProducts(String mission, String[] productClass, String mode, String fileClass, String quality, String startTimeFrom, String startTimeTo, String genTimeFrom, String genTimeTo, Long jobStepId, org.springframework.http.HttpHeaders httpHeaders)
      Number of products available, possibly filtered by mission, product class and time range
      Angegeben von:
      countProducts in Schnittstelle ProductController
      Parameter:
      mission - the mission code
      productClass - an array of product types
      mode - processing mode as defined for the mission
      fileClass - one of the file classes defined for the mission
      quality - indicator for the suitability of this product for general use
      startTimeFrom - earliest sensing start time
      startTimeTo - latest sensing start time
      genTimeFrom - product generation time, earliest
      genTimeTo - product generation time, latest
      jobStepId - job step that produced the products (if any)
      httpHeaders - HTTP Authentication header
      Gibt zurück:
      HTTP status "OK" and the number of products found (may be zero) or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted
    • createProduct

      public org.springframework.http.ResponseEntity<RestProduct> createProduct(@Valid RestProduct product, org.springframework.http.HttpHeaders httpHeaders)
      Create a product from the given Json object (does NOT create associated product files!)
      Angegeben von:
      createProduct in Schnittstelle ProductController
      Parameter:
      product - the Json object to create the product from
      httpHeaders - HTTP Authentication header
      Gibt zurück:
      HTTP status "CREATED" and a response containing a Json object corresponding to the product after persistence (with ID and version for all contained objects) or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "BAD_REQUEST", if any of the input data was invalid
    • getProductById

      public org.springframework.http.ResponseEntity<RestProduct> getProductById(Long id, org.springframework.http.HttpHeaders httpHeaders)
      Find the product with the given ID
      Angegeben von:
      getProductById in Schnittstelle ProductController
      Parameter:
      id - the ID to look for
      httpHeaders - HTTP Authentication header
      Gibt zurück:
      HTTP status "OK" and a Json object corresponding to the product found or HTTP status "BAD_REQUEST" and an error message, if no product ID was given, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "NOT_FOUND" and an error message, if no product with the given ID exists
    • modifyProduct

      public org.springframework.http.ResponseEntity<RestProduct> modifyProduct(Long id, RestProduct product, org.springframework.http.HttpHeaders httpHeaders)
      Update the product with the given ID with the attribute values of the given Json object. This method will NOT modify associated product files.
      Angegeben von:
      modifyProduct in Schnittstelle ProductController
      Parameter:
      id - the ID of the product to update
      product - a Json object containing the modified (and unmodified) attributes
      httpHeaders - HTTP Authentication header
      Gibt zurück:
      HTTP status "OK" and a response containing a Json object corresponding to the product after modification (with ID and version for all contained objects) or HTTP status "NOT_MODIFIED" and the unchanged product, if no attributes were actually changed, or HTTP status "NOT_FOUND" and an error message, if no product with the given ID 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 has been modified since retrieval by the client
    • getProductByUuid

      public org.springframework.http.ResponseEntity<RestProduct> getProductByUuid(@Pattern(regexp="^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$") @Pattern(regexp="^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$") String uuid, org.springframework.http.HttpHeaders httpHeaders)
      Get a product by UUID
      Angegeben von:
      getProductByUuid in Schnittstelle ProductController
      Parameter:
      uuid - the universally unique product identifier
      httpHeaders - HTTP Authentication header
      Gibt zurück:
      HTTP status "OK" and a Json object corresponding to the product found or HTTP status "BAD_REQUEST" and an error message, if no or an invalid product UUID was given, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "NOT_FOUND" and an error message, if no product with the given UUID exists
    • downloadProductById

      public org.springframework.http.ResponseEntity<?> downloadProductById(Long id, Long fromByte, Long toByte, org.springframework.http.HttpHeaders httpHeaders)
      Get the primary data file (or ZIP file, if available) for the product as data stream (optionally range-restricted), returns a redirection link to the Storage Manager of a random Processing Facility
      Angegeben von:
      downloadProductById in Schnittstelle ProductController
      Parameter:
      id - the ID of the product to download
      fromByte - the first byte of the data stream to download (optional, default is file start, i.e. byte 0)
      toByte - the last byte of the data stream to download (optional, default is file end, i.e. file size - 1)
      httpHeaders - HTTP Authentication header
      Gibt zurück:
      HTTP status "TEMPORARY_REDIRECT" and a redirect URL in the HTTP Location header, or HTTP status "BAD_REQUEST" and an error message, if no or an invalid product ID was given, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "NOT_FOUND" and an error message, if no product with the given ID exists or if it does not have a data file
    • getDownloadTokenById

      public org.springframework.http.ResponseEntity<?> getDownloadTokenById(Long id, String fileName, org.springframework.http.HttpHeaders httpHeaders)
      Get a JSON Web Token for creating a download link to a Storage Manager
      Angegeben von:
      getDownloadTokenById in Schnittstelle ProductController
      Parameter:
      id - the ID of the product to download
      fileName - the name of the file to download (default primary data file or ZIP file, if available)
      httpHeaders - HTTP Authentication header
      Gibt zurück:
      HTTP status "OK" and the signed JSON Web Token (JWS) as per RFC 7515 and RFC 7519, or HTTP status "BAD_REQUEST" and an error message, if no or an invalid product ID was given, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "NOT_FOUND" and an error message, if no product with the given ID or no file with the given name exists