Package de.dlr.proseo.ordermgr.rest
Klasse OrderControllerImpl
java.lang.Object
de.dlr.proseo.ordermgr.rest.OrderControllerImpl
- Alle implementierten Schnittstellen:
OrderController
Spring MVC controller for the prosEO Order Manager; implements the services required to manage processing orders
- Autor:
- Ranjitha Vignesh
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungorg.springframework.http.ResponseEntity
<String> countOrders
(String mission, String identifier, Long nid) Count orders filtered by mission, identifier and id not equal nid.org.springframework.http.ResponseEntity
<String> countSelectOrders
(String mission, String identifier, String[] state, String[] productClass, String startTimeFrom, String startTimeTo, Long recordFrom, Long recordTo, String[] orderBy) Calculate the amount of orders satisfying the selection parameters.org.springframework.http.ResponseEntity
<RestOrder> createOrder
(RestOrder restOrder) Create an order from the given JSON objectorg.springframework.http.ResponseEntity
<?> deleteOrderById
(Long id) Delete an order by IDgetAndSelectOrders
(String mission, String identifier, String[] state, String[] productClass, String startTimeFrom, String startTimeTo, Long recordFrom, Long recordTo, String[] orderBy) Retrieve a list of orders satisfying the selection parametersorg.springframework.http.ResponseEntity
<RestOrder> getOrderById
(Long id) Find the order with the given IDgetOrders
(String mission, String identifier, String[] productClasses, Date startTimeFrom, Date startTimeTo, Date executionTimeFrom, Date executionTimeTo) List of all orders filtered by mission, identifier, productClasses, starttime rangeorg.springframework.http.ResponseEntity
<RestOrder> modifyOrder
(Long id, @Valid RestOrder restOrder) Update the order with the given ID with the attribute values of the given JSON object.
-
Konstruktordetails
-
OrderControllerImpl
public OrderControllerImpl()
-
-
Methodendetails
-
createOrder
Create an order from the given JSON object- Angegeben von:
createOrder
in SchnittstelleOrderController
- Parameter:
restOrder
- the JSON object to create the order from- Gibt zurück:
- HTTP status "CREATED" and a response containing a JSON object corresponding to the order 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
-
getOrders
public org.springframework.http.ResponseEntity<List<RestOrder>> getOrders(String mission, String identifier, String[] productClasses, @DateTimeFormat Date startTimeFrom, @DateTimeFormat Date startTimeTo, @DateTimeFormat Date executionTimeFrom, @DateTimeFormat Date executionTimeTo) List of all orders filtered by mission, identifier, productClasses, starttime range- Angegeben von:
getOrders
in SchnittstelleOrderController
- Parameter:
mission
- the mission codeidentifier
- the unique order identifier stringproductClasses
- an array of product typesstartTimeFrom
- earliest sensing start timestartTimeTo
- latest sensing start timeexecutionTimeFrom
- earliest order execution timeexecutionTimeTo
- latest order execution time- Gibt zurück:
- HTTP status "OK" and a list of products or HTTP status "NOT_FOUND" and an error message, if no products matching the search criteria were found, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted
-
getAndSelectOrders
public org.springframework.http.ResponseEntity<List<RestOrder>> getAndSelectOrders(String mission, String identifier, String[] state, String[] productClass, String startTimeFrom, String startTimeTo, Long recordFrom, Long recordTo, String[] orderBy) Retrieve a list of orders satisfying the selection parameters- Angegeben von:
getAndSelectOrders
in SchnittstelleOrderController
- Parameter:
mission
- the mission codeidentifier
- the unique order identifier stringstate
- an array of order statesproductClass
- an array of product typesstartTimeFrom
- earliest sensing start timestartTimeTo
- latest sensing start timerecordFrom
- first record of filtered and ordered result to returnrecordTo
- last record of filtered and ordered result to returnorderBy
- an array of strings containing a column name and an optional sort direction (ASC/DESC), separated by white space- Gibt zurück:
- the result list
-
countSelectOrders
public org.springframework.http.ResponseEntity<String> countSelectOrders(String mission, String identifier, String[] state, String[] productClass, String startTimeFrom, String startTimeTo, Long recordFrom, Long recordTo, String[] orderBy) Calculate the amount of orders satisfying the selection parameters. Mission code is mandatory.- Angegeben von:
countSelectOrders
in SchnittstelleOrderController
- Parameter:
mission
- the mission codeidentifier
- the unique order identifier stringstate
- an array of order statesproductClass
- an array of product typesstartTimeFrom
- earliest sensing start timestartTimeTo
- latest sensing start timerecordFrom
- first record of filtered and ordered result to returnrecordTo
- last record of filtered and ordered result to returnorderBy
- an array of strings containing a column name and an optional sort direction (ASC/DESC),separated by white space- Gibt zurück:
- The order count
-
getOrderById
Find the order with the given ID- Angegeben von:
getOrderById
in SchnittstelleOrderController
- Parameter:
id
- the ID to look for- Gibt zurück:
- HTTP status "OK" and a JSON object corresponding to the found order or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "NOT_FOUND", if no orbit with the given ID exists
-
deleteOrderById
Delete an order by ID- Angegeben von:
deleteOrderById
in SchnittstelleOrderController
- Parameter:
id
- the ID of the order to delete- Gibt zurück:
- a response entity with HTTP status "NO_CONTENT", if the deletion was successful, or HTTP status "NOT_FOUND" and an error message, if the orbit did not exist, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "NOT_MODIFIED" and an error message, if the deletion was unsuccessful
-
modifyOrder
public org.springframework.http.ResponseEntity<RestOrder> modifyOrder(Long id, @Valid @Valid RestOrder restOrder) Update the order with the given ID with the attribute values of the given JSON object.- Angegeben von:
modifyOrder
in SchnittstelleOrderController
- Parameter:
id
- the ID of the order to updaterestOrder
- 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 order after modification (with ID and version for all contained objects) or HTTP status "NOT_MODIFIED" and the unchanged order, if no attributes were actually changed, or HTTP status "NOT_FOUND" and an error message, if no order with the given ID exists, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted
-
countOrders
@Transactional(isolation=REPEATABLE_READ, readOnly=true) public org.springframework.http.ResponseEntity<String> countOrders(String mission, String identifier, Long nid) Count orders filtered by mission, identifier and id not equal nid.- Angegeben von:
countOrders
in SchnittstelleOrderController
- Parameter:
mission
- The mission codeidentifier
- The unique order identifier stringnid
- The ids of orbit(s) found has to be unequal to nid- Gibt zurück:
- The number of orders found
-