Class TriggerControllerImpl

java.lang.Object
de.dlr.proseo.ordergen.rest.TriggerControllerImpl
All Implemented Interfaces:
TriggerController

@Component public class TriggerControllerImpl extends Object implements TriggerController
Implementation of the TriggerController
Author:
Ernst Melchinger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.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, outputProductClass
    org.springframework.http.ResponseEntity<RestTrigger>
    createTrigger(@Valid RestTrigger restTrigger, org.springframework.http.HttpHeaders httpHeaders)
    Create a trigger from the given Json object
    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.
    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
    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.
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      getTriggers in interface TriggerController
      Parameters:
      mission - the mission code
      name - the trigger name
      type - the trigger type
      httpHeaders - 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: TriggerController
      count the triggers filtered by mission, name, type, orderTemplate, inputProductClass, outputProductClass
      Specified by:
      countTriggers in interface TriggerController
    • 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:
      createTrigger in interface TriggerController
      Parameters:
      restTrigger - the Json object to create the trigger from
      httpHeaders - 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:
      deleteTrigger in interface TriggerController
      Parameters:
      mission - the mission code
      name - the trigger name
      type - the trigger type
      httpHeaders - 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:
      updateTrigger in interface TriggerController
      Parameters:
      restTrigger - the Json object to create the trigger from
      httpHeaders - 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:
      getByProductType in interface TriggerController
      Parameters:
      mission - the mission code
      productType - 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:
      reloadTriggers in interface TriggerController