Package de.dlr.proseo.facmgr.rest
Klasse FacmgrControllerImpl
java.lang.Object
de.dlr.proseo.facmgr.rest.FacmgrControllerImpl
- Alle implementierten Schnittstellen:
FacilityController
Spring MVC controller for the prosEO Facility Manager; implements the
services required to manage processing facilities
- Autor:
- Ranjitha Vignesh
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungorg.springframework.http.ResponseEntity
<RestProcessingFacility> createFacility
(RestProcessingFacility restFacility) Create a facility from the given Json objectorg.springframework.http.ResponseEntity
<?> Delete a facility by IDorg.springframework.http.ResponseEntity
<List<RestProcessingFacility>> getFacilities
(String name) Retrieve a list of facilities filtered by mission and name.org.springframework.http.ResponseEntity
<RestProcessingFacility> getFacilityById
(Long id) Find the facility with the given IDorg.springframework.http.ResponseEntity
<RestProcessingFacility> modifyFacility
(Long id, RestProcessingFacility restFacility) Update the facility with the given ID with the attribute values of the given Json object.
-
Konstruktordetails
-
FacmgrControllerImpl
public FacmgrControllerImpl()
-
-
Methodendetails
-
createFacility
public org.springframework.http.ResponseEntity<RestProcessingFacility> createFacility(RestProcessingFacility restFacility) Create a facility from the given Json object- Angegeben von:
createFacility
in SchnittstelleFacilityController
- Parameter:
restFacility
- the Json object to create the facility from- Gibt zurück:
- HTTP status "CREATED" and a response containing a Json object corresponding to the facility after persistence (with ID and version for all contained objects) or HTTP status "BAD_REQUEST", if any of the input data was invalid
-
getFacilities
public org.springframework.http.ResponseEntity<List<RestProcessingFacility>> getFacilities(String name) Retrieve a list of facilities filtered by mission and name.- Angegeben von:
getFacilities
in SchnittstelleFacilityController
- Parameter:
name
- the name of the facility- Gibt zurück:
- a response entity with either a list of facilities and HTTP status "OK" or an error message and HTTP status "NOT_FOUND" if no matching facilities were found
-
getFacilityById
Find the facility with the given ID- Angegeben von:
getFacilityById
in SchnittstelleFacilityController
- Parameter:
id
- the ID to look for- Gibt zurück:
- a response entity corresponding to the found facility and HTTP status "OK" or an error message and HTTP status "NOT_FOUND", if no facility with the given ID exists
-
deleteFacilityById
Delete a facility by ID- Angegeben von:
deleteFacilityById
in SchnittstelleFacilityController
- Parameter:
id
- the ID of the facility to delete- Gibt zurück:
- a response entity with HTTP status "NO_CONTENT", if the deletion was successful, "BAD_REQUEST", if the facility still has stored products, "NOT_FOUND", if the facility did not exist, or "NOT_MODIFIED", if the deletion was unsuccessful
-
modifyFacility
public org.springframework.http.ResponseEntity<RestProcessingFacility> modifyFacility(Long id, RestProcessingFacility restFacility) Update the facility with the given ID with the attribute values of the given Json object. Both modified and unmodified attributes need to be provided.- Angegeben von:
modifyFacility
in SchnittstelleFacilityController
- Parameter:
id
- the ID of the facility to updaterestFacility
- 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 facility after modification (with ID and version for all contained objects) or HTTP status "NOT_MODIFIED" and the unchanged facility, if no attributes were actually changed, or HTTP status "NOT_FOUND" and an error message, if no facility with the given ID exists
-