Class ConfigValueController
java.lang.Object
es.kukenan.smartfi.microservice.backoffice.controller.ConfigValueController
Appointment Rest API controller.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAuthority (role) required in order to be able to invoke change application status.static final StringAuthority (role) required in order to be able to invoke change application status.private static final StringBase path for backoffice Config Values API.private static final StringPath for backoffice update Company Config Values API.private static final StringBase path for backoffice Config Values API.private ConfigValueServiceConfiguration Value Service.private static final StringBase path for backoffice Config Values public API. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<List<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.ConfigValueDto>>>getConfigValues(String product, int companyId) Get configuration values.org.springframework.http.ResponseEntity<Object>Get configuration values.org.springframework.http.ResponseEntity<Object>updateCompanyConfigValue(es.kukenan.smartfi.common.security.WalletAuthentication authentication, List<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.ConfigValueDto> configValueDtos, int companyId) Update configuration values for Company.org.springframework.http.ResponseEntity<Object>updateConfigValue(es.kukenan.smartfi.common.security.WalletAuthentication authentication, List<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.ConfigValueDto> configValueDtos) Update configuration values.
-
Field Details
-
PAPI_CONFIG_VALUES_BASE_PATH
Base path for backoffice Config Values public API.- See Also:
-
API_CONFIG_VALUES_BASE_PATH
Base path for backoffice Config Values API.- See Also:
-
API_UPDATE_CONFIG_VALUES_BASE_PATH
Base path for backoffice Config Values API.- See Also:
-
API_UPDATE_COMPANY_CONFIG_VALUES_PATH
Path for backoffice update Company Config Values API.- See Also:
-
API_BACKOFFICE_AUTHORITIES
Authority (role) required in order to be able to invoke change application status.- See Also:
-
API_ADMIN_BACKOFFICE_AUTHORITIES
Authority (role) required in order to be able to invoke change application status.- See Also:
-
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 typecompanyId- 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.
-