Package de.dlr.proseo.ordergen.rest
Class TriggerControllerImpl
java.lang.Object
de.dlr.proseo.ordergen.rest.TriggerControllerImpl
- All Implemented Interfaces:
TriggerController
Implementation of the TriggerController
- Author:
- Ernst Melchinger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<?> countTriggers(String mission, String name, String type, String orderTemplate, String inputProductClass, String outputProductClass, org.springframework.http.HttpHeaders httpHeaders) count the triggers filtered by mission, name, type, orderTemplate, inputProductClass, outputProductClassorg.springframework.http.ResponseEntity<RestTrigger> createTrigger(@Valid RestTrigger restTrigger, org.springframework.http.HttpHeaders httpHeaders) Create a trigger from the given Json objectorg.springframework.http.ResponseEntity<Object> deleteTrigger(String mission, String name, String type, org.springframework.http.HttpHeaders httpHeaders) Delete all triggers filtered by mission, name, type.org.springframework.http.ResponseEntity<List<RestTrigger>> getByProductType(String mission, String productType, org.springframework.http.HttpHeaders httpHeaders) Get all data driven triggers for orderTemplates having the given product class as input product classorg.springframework.http.ResponseEntity<List<RestTrigger>> getTriggers(String mission, String name, String type, String orderTemplate, String inputProductClass, String outputProductClass, Integer recordFrom, Integer recordTo, String[] orderBy, org.springframework.http.HttpHeaders httpHeaders) Get a List of OrderTriggers filtered by mission, name and type.org.springframework.http.ResponseEntity<Object> reloadTriggers(String mission, org.springframework.http.HttpHeaders httpHeaders) Reload and restart all triggers (mission is not used)org.springframework.http.ResponseEntity<RestTrigger> updateTrigger(RestTrigger restTrigger, org.springframework.http.HttpHeaders httpHeaders) Update a trigger from the given JSON object
-
Constructor Details
-
TriggerControllerImpl
public TriggerControllerImpl()
-
-
Method Details
-
getTriggers
public org.springframework.http.ResponseEntity<List<RestTrigger>> getTriggers(String mission, String name, String type, String orderTemplate, String inputProductClass, String outputProductClass, Integer recordFrom, Integer recordTo, String[] orderBy, org.springframework.http.HttpHeaders httpHeaders) Get a List of OrderTriggers filtered by mission, name and type.- Specified by:
getTriggersin interfaceTriggerController- Parameters:
mission- the mission codename- the trigger nametype- the trigger typehttpHeaders- the HTTP request headers (injected)- Returns:
- HTTP status "OK" and the list of Json representation of the triggers found or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted
-
countTriggers
public org.springframework.http.ResponseEntity<?> countTriggers(String mission, String name, String type, String orderTemplate, String inputProductClass, String outputProductClass, org.springframework.http.HttpHeaders httpHeaders) Description copied from interface:TriggerControllercount the triggers filtered by mission, name, type, orderTemplate, inputProductClass, outputProductClass- Specified by:
countTriggersin interfaceTriggerController
-
createTrigger
public org.springframework.http.ResponseEntity<RestTrigger> createTrigger(@Valid @Valid RestTrigger restTrigger, org.springframework.http.HttpHeaders httpHeaders) Create a trigger from the given Json object- Specified by:
createTriggerin interfaceTriggerController- Parameters:
restTrigger- the Json object to create the trigger fromhttpHeaders- HTTP Authentication header- Returns:
- HTTP status "CREATED" and a response containing a Json object corresponding to the trigger 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
-
deleteTrigger
public org.springframework.http.ResponseEntity<Object> deleteTrigger(String mission, String name, String type, org.springframework.http.HttpHeaders httpHeaders) Delete all triggers filtered by mission, name, type.- Specified by:
deleteTriggerin interfaceTriggerController- Parameters:
mission- the mission codename- the trigger nametype- the trigger typehttpHeaders- the HTTP request headers (injected)- Returns:
- a response entity with HTTP status "NO_CONTENT", if the deletion was successful, or HTTP status "NOT_FOUND", if the trigger did not exist, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "NOT_MODIFIED", if the deletion was unsuccessful
-
updateTrigger
public org.springframework.http.ResponseEntity<RestTrigger> updateTrigger(RestTrigger restTrigger, org.springframework.http.HttpHeaders httpHeaders) Update a trigger from the given JSON object- Specified by:
updateTriggerin interfaceTriggerController- Parameters:
restTrigger- the Json object to create the trigger fromhttpHeaders- HTTP Authentication header- Returns:
- HTTP status "OK" and a response containing a Json object corresponding to the trigger 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
-
getByProductType
public org.springframework.http.ResponseEntity<List<RestTrigger>> getByProductType(String mission, String productType, org.springframework.http.HttpHeaders httpHeaders) Get all data driven triggers for orderTemplates having the given product class as input product class- Specified by:
getByProductTypein interfaceTriggerController- Parameters:
mission- the mission codeproductType- the product type of the requested product class- Returns:
- HTTP status "OK" and the list of Json representation of the triggers found or HTTP status "BAD_REQUEST" and an error message, if the given product type is invalid, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted
-
reloadTriggers
public org.springframework.http.ResponseEntity<Object> reloadTriggers(String mission, org.springframework.http.HttpHeaders httpHeaders) Reload and restart all triggers (mission is not used)- Specified by:
reloadTriggersin interfaceTriggerController
-