Class ConfigValueController

java.lang.Object
es.kukenan.smartfi.microservice.backoffice.controller.ConfigValueController

@RestController public class ConfigValueController extends Object
Appointment Rest API controller.
  • Field Details

    • PAPI_CONFIG_VALUES_BASE_PATH

      private static final String PAPI_CONFIG_VALUES_BASE_PATH
      Base path for backoffice Config Values public API.
      See Also:
    • API_CONFIG_VALUES_BASE_PATH

      private static final String API_CONFIG_VALUES_BASE_PATH
      Base path for backoffice Config Values API.
      See Also:
    • API_UPDATE_CONFIG_VALUES_BASE_PATH

      private static final String API_UPDATE_CONFIG_VALUES_BASE_PATH
      Base path for backoffice Config Values API.
      See Also:
    • API_UPDATE_COMPANY_CONFIG_VALUES_PATH

      private static final String API_UPDATE_COMPANY_CONFIG_VALUES_PATH
      Path for backoffice update Company Config Values API.
      See Also:
    • API_BACKOFFICE_AUTHORITIES

      public static final String API_BACKOFFICE_AUTHORITIES
      Authority (role) required in order to be able to invoke change application status.
      See Also:
    • API_ADMIN_BACKOFFICE_AUTHORITIES

      public static final String API_ADMIN_BACKOFFICE_AUTHORITIES
      Authority (role) required in order to be able to invoke change application status.
      See Also:
    • configValueService

      @Autowired private ConfigValueService configValueService
      Configuration Value Service.
  • Constructor Details

    • ConfigValueController

      public ConfigValueController()
  • Method Details

    • getConfigValuesOnboarding

      @GetMapping(path="/papi/v1/backoffice/config-values", produces="application/json") public org.springframework.http.ResponseEntity<Object> getConfigValuesOnboarding()
      Get configuration values.
      Returns:
      Configuration values list.
    • getConfigValues

      @GetMapping(path="/papi/v1/backoffice/config-values-filtered", produces="application/json") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<List<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.ConfigValueDto>>> getConfigValues(@RequestParam(name="product",required=false,defaultValue="") String product, @RequestParam(name="companyId",required=false,defaultValue="0") int companyId)
      Get configuration values.
      Parameters:
      product - product type
      companyId - company identifier
      Returns:
      Configuration values list.
    • updateConfigValue

      @PreAuthorize("(hasRole(\'ROLE_ACCESS_ADMIN\') and hasRole(\'ROLE_LEVEL_BACKOFFICE_ADMIN\')) or (hasRole(\'ROLE_ACCESS_COMPANY\') and hasRole(\'ROLE_LEVEL_USER_COMPANY\')) or (hasRole(\'ROLE_ACCESS_MODERATOR\') and hasRole(\'ROLE_LEVEL_USER_MODERATOR\'))") @PutMapping(path="/api/v1/backoffice/config-values-filtered", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Object> updateConfigValue(es.kukenan.smartfi.common.security.WalletAuthentication authentication, @RequestBody List<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.ConfigValueDto> configValueDtos)
      Update configuration values.
      Parameters:
      authentication - user credentials.
      configValueDtos - configuration values to update.
      Returns:
      ok.
    • updateCompanyConfigValue

      @PreAuthorize("(hasRole(\'ROLE_ACCESS_ADMIN\') and hasRole(\'ROLE_LEVEL_BACKOFFICE_ADMIN\')) or (hasRole(\'ROLE_ACCESS_MODERATOR\') and hasRole(\'ROLE_LEVEL_USER_MODERATOR\'))") @PutMapping(path="/api/v1/backoffice/company-config-values", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Object> updateCompanyConfigValue(es.kukenan.smartfi.common.security.WalletAuthentication authentication, @RequestBody List<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.ConfigValueDto> configValueDtos, @RequestParam(name="companyId",required=false,defaultValue="0") int companyId)
      Update configuration values for Company.
      Parameters:
      authentication - user credentials.
      configValueDtos - configuration values to update.
      companyId - company identifier.
      Returns:
      ok.