Klasse ProductArchiveControllerImpl

java.lang.Object
de.dlr.proseo.archivemgr.rest.ProductArchiveControllerImpl
Alle implementierten Schnittstellen:
ArchiveController

@Component public class ProductArchiveControllerImpl extends Object implements ArchiveController
Spring MVC controller for the prosEO Product Archive Manager; implements the services required to manage product archive endpoints
Autor:
Denys Chaykovskiy
  • Konstruktordetails

    • ProductArchiveControllerImpl

      public ProductArchiveControllerImpl()
  • Methodendetails

    • createArchive

      public org.springframework.http.ResponseEntity<RestProductArchive> createArchive(RestProductArchive archive)
      Create a product archive from the given Json object
      Angegeben von:
      createArchive in Schnittstelle ArchiveController
      Parameter:
      archive - the Json object to create the product archive from
      Gibt zurück:
      HTTP status "CREATED" and a response containing a Json object corresponding to the product archive after persistence (with ID and version for all contained objects) or HTTP status "BAD_REQUEST", if any of the input data was invalid
    • getArchives

      public org.springframework.http.ResponseEntity<List<RestProductArchive>> getArchives(String code)
      List of all product archives with no search criteria
      Angegeben von:
      getArchives in Schnittstelle ArchiveController
      Parameter:
      code - the unique product archive name
      Gibt zurück:
      a response entity with either a list of product archives and HTTP status OK or an error message and an HTTP status indicating failure
    • getArchiveById

      public org.springframework.http.ResponseEntity<RestProductArchive> getArchiveById(Long id)
      Find the product archive with the given ID
      Angegeben von:
      getArchiveById in Schnittstelle ArchiveController
      Parameter:
      id - the ID to look for
      Gibt zurück:
      a response entity corresponding to the found product archive and HTTP status "OK" or an error message and HTTP status "NOT_FOUND", if no product archive with the given ID exists
    • deleteArchiveById

      public org.springframework.http.ResponseEntity<?> deleteArchiveById(Long id)
      Delete a product archive by ID
      Angegeben von:
      deleteArchiveById in Schnittstelle ArchiveController
      Parameter:
      id - the ID of the product archive to delete
      Gibt zurück:
      a response entity with HTTP status "NO_CONTENT", if the deletion was successful, "BAD_REQUEST", if the archive still has stored products, TODO: Check dependencies "NOT_FOUND", if the archive did not exist, or "NOT_MODIFIED", if the deletion was unsuccessful
    • modifyArchive

      public org.springframework.http.ResponseEntity<RestProductArchive> modifyArchive(Long id, RestProductArchive restArchive)
      Update the product archive with the given ID with the attribute values of the given Json object.
      Angegeben von:
      modifyArchive in Schnittstelle ArchiveController
      Parameter:
      id - the ID of the product archive to update
      restArchive - a Json object containing the modified (and unmodified) attributes
      Gibt zurück:
      a response containing HTTP status "OK" and a Json object corresponding to the product archive after modification (with ID and version for all contained objects) or HTTP status "NOT_MODIFIED" and the unchanged product archive, if no attributes were actually changed, or HTTP status "NOT_FOUND" and an error message, if no product archive with the given ID exists