Package de.dlr.proseo.archivemgr.rest
Klasse ProductArchiveControllerImpl
java.lang.Object
de.dlr.proseo.archivemgr.rest.ProductArchiveControllerImpl
- Alle implementierten Schnittstellen:
ArchiveController
Spring MVC controller for the prosEO Product Archive Manager; implements the services required to manage product archive
endpoints
- Autor:
- Denys Chaykovskiy
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungorg.springframework.http.ResponseEntity
<RestProductArchive> createArchive
(RestProductArchive archive) Create a product archive from the given Json objectorg.springframework.http.ResponseEntity
<?> Delete a product archive by IDorg.springframework.http.ResponseEntity
<RestProductArchive> getArchiveById
(Long id) Find the product archive with the given IDorg.springframework.http.ResponseEntity
<List<RestProductArchive>> getArchives
(String code) List of all product archives with no search criteriaorg.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.
-
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 SchnittstelleArchiveController
- 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
List of all product archives with no search criteria- Angegeben von:
getArchives
in SchnittstelleArchiveController
- 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
Find the product archive with the given ID- Angegeben von:
getArchiveById
in SchnittstelleArchiveController
- 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
Delete a product archive by ID- Angegeben von:
deleteArchiveById
in SchnittstelleArchiveController
- 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 SchnittstelleArchiveController
- Parameter:
id
- the ID of the product archive to updaterestArchive
- 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
-