Package de.dlr.proseo.ordermgr.rest
Klasse MissionControllerImpl
java.lang.Object
de.dlr.proseo.ordermgr.rest.MissionControllerImpl
- Alle implementierten Schnittstellen:
MissionController
Spring MVC controller for the prosEO Order Manager; implements the services required to manage missions. Handles the HTTP requests
related to mission management.
- Autor:
- Ranjitha Vignesh
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibung(Package privat) OrdermgrConfiguration
The Order Manager configuration(Package privat) org.springframework.boot.web.client.RestTemplateBuilder
REST template builder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungorg.springframework.http.ResponseEntity
<RestMission> createMission
(@Valid RestMission mission) Creates a new mission with the provided data.org.springframework.http.ResponseEntity
<?> deleteMissionById
(Long id, Boolean force, Boolean deleteProducts) Delete a mission by ID.org.springframework.http.ResponseEntity
<RestMission> getMissionById
(Long id) Retrieves the mission with the specified ID.org.springframework.http.ResponseEntity
<List<RestMission>> getMissions
(String missionCode) Retrieves a list of all missions or a mission with a specific code.org.springframework.http.ResponseEntity
<RestMission> modifyMission
(Long id, @Valid RestMission mission) Updates the mission with the specified ID using the attribute values of the given JSON object.
-
Felddetails
-
orderManagerConfig
The Order Manager configuration -
rtb
@Autowired org.springframework.boot.web.client.RestTemplateBuilder rtbREST template builder
-
-
Konstruktordetails
-
MissionControllerImpl
public MissionControllerImpl()
-
-
Methodendetails
-
getMissions
Retrieves a list of all missions or a mission with a specific code.- Angegeben von:
getMissions
in SchnittstelleMissionController
- Parameter:
missionCode
- The code of the mission to retrieve.- Gibt zurück:
- A response entity with either a list of missions and HTTP status OK or an error message and an HTTP status indicating failure.
-
createMission
public org.springframework.http.ResponseEntity<RestMission> createMission(@Valid @Valid RestMission mission) throws IllegalArgumentException Creates a new mission with the provided data.- Angegeben von:
createMission
in SchnittstelleMissionController
- Parameter:
mission
- The JSON object representing the mission to be created.- Gibt zurück:
- A response entity containing the JSON object corresponding to the created mission (with ID and version for all contained objects) and HTTP status "CREATED" or an error message and an HTTP status indicating failure.
- Löst aus:
IllegalArgumentException
- If any of the input data is invalid.
-
getMissionById
Retrieves the mission with the specified ID.- Angegeben von:
getMissionById
in SchnittstelleMissionController
- Parameter:
id
- The ID of the mission to retrieve.- Gibt zurück:
- A response entity corresponding to the found mission and HTTP status "OK", or an error message and HTTP status "NOT_FOUND" if no mission with the given ID exists.
-
modifyMission
public org.springframework.http.ResponseEntity<RestMission> modifyMission(Long id, @Valid @Valid RestMission mission) Updates the mission with the specified ID using the attribute values of the given JSON object.- Angegeben von:
modifyMission
in SchnittstelleMissionController
- Parameter:
id
- The ID of the mission to update.mission
- A JSON object containing the modified (and unmodified) attributes.- Gibt zurück:
- A response entity containing a JSON object corresponding to the mission after modification (with ID and version for all contained objects) and HTTP status "OK", 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 mission with the given ID exists.
-
deleteMissionById
public org.springframework.http.ResponseEntity<?> deleteMissionById(Long id, Boolean force, Boolean deleteProducts) Delete a mission by ID.- Angegeben von:
deleteMissionById
in SchnittstelleMissionController
- Parameter:
id
- the ID of the mission to deleteforce
- flag whether to also delete all configured items (but not products)deleteProducts
- flag whether to also delete all stored products (also from all processing facilities, requires "force")- Gibt zurück:
- a response entity with HTTP status "NO_CONTENT", if the deletion was successful, "BAD_REQUEST" if "deleteProducts" was specified without "force" or if dependent objects exist for the mission, "NOT_FOUND" if the mission did not exist, or "NOT_MODIFIED" if the deletion was unsuccessful
-