Class AppConfigurationController

java.lang.Object
cf.maybelambda.httpvalidator.springboot.controller.AppConfigurationController

@RestController @CrossOrigin public class AppConfigurationController extends Object
Controller for handling configuration updates of the application.
  • Field Details

  • Constructor Details

    • AppConfigurationController

      public AppConfigurationController()
  • Method Details

    • updateValidatorRunSchedule

      @PutMapping("/api/validator/runschedule") public org.springframework.http.ResponseEntity<Map<String,String>> updateValidatorRunSchedule(@RequestBody Map<String,String> body)
      Updates the validator run schedule based on the provided cron expression. Returns bad request status with error message for invalid expression.
      Parameters:
      body - The request body containing the cron expression.
      Returns:
      ResponseEntity indicating success or failure of the update operation.
    • updateValidatorDataFile

      @PutMapping("/api/validator/datafile") public org.springframework.http.ResponseEntity<Map<String,String>> updateValidatorDataFile(@RequestBody org.springframework.web.multipart.MultipartFile file)
      Updates the validator data file with the contents from the provided multipart file. Returns internal server error status with error message for data file update failure (IO error). Returns bad request status with error message for invalid data file.
      Parameters:
      file - The multipart file containing the updated data.
      Returns:
      ResponseEntity indicating success or failure of the update operation.