@RestController @RequestMapping(value="setting") public class SettingResource extends ProtectedResource
Although not required, this class is instantiated using the Jersey SpringServlet and dependencies are defined in the Sprint context XML file.
| Constructor and Description |
|---|
SettingResource()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Void> |
addSetting(org.nhindirect.config.model.Setting setting)
Adds a setting to the system.
|
reactor.core.publisher.Mono<Void> |
addSetting(String name,
String value)
Adds a setting to the system.
|
reactor.core.publisher.Flux<org.nhindirect.config.model.Setting> |
getAllSettings()
Gets all settings in the system.
|
reactor.core.publisher.Mono<org.nhindirect.config.model.Setting> |
getSettingByName(String name)
Gets a setting by name.
|
reactor.core.publisher.Mono<Void> |
removeSettingByName(String name)
Deletes a setting in the system by name.
|
void |
setSettingRepository(org.nhindirect.config.repository.SettingRepository settingRepo)
Sets the settings repository.
|
reactor.core.publisher.Mono<Void> |
updateSetting(org.nhindirect.config.model.Setting setting)
Updates the value of a setting.
|
reactor.core.publisher.Mono<Void> |
updateSetting(String name,
String value)
Updates the value of a setting.
|
@Autowired public void setSettingRepository(org.nhindirect.config.repository.SettingRepository settingRepo)
settingRepo - Settings repository@GetMapping(produces="application/json") public reactor.core.publisher.Flux<org.nhindirect.config.model.Setting> getAllSettings()
@GetMapping(value="{name}",
produces="application/json")
public reactor.core.publisher.Mono<org.nhindirect.config.model.Setting> getSettingByName(@PathVariable(value="name")
String name)
name - The name of the setting to retrieve.@PutMapping(value="{name}/{value}")
@ResponseStatus(value=CREATED)
public reactor.core.publisher.Mono<Void> addSetting(@PathVariable(value="name")
String name,
@PathVariable(value="value")
String value)
uriInfo - Injected URI context used for building the location URI.name - The name of the setting to add.value - The value of the setting.@PutMapping @ResponseStatus(value=CREATED) public reactor.core.publisher.Mono<Void> addSetting(@RequestBody org.nhindirect.config.model.Setting setting)
Setting - The setting argument that holds the name and value@PostMapping(value="{name}/{value}")
@ResponseStatus(value=NO_CONTENT)
public reactor.core.publisher.Mono<Void> updateSetting(@PathVariable(value="name")
String name,
@PathVariable(value="value")
String value)
name - The name of the setting to update.value - The new value of the setting.@PostMapping @ResponseStatus(value=NO_CONTENT) public reactor.core.publisher.Mono<Void> updateSetting(@RequestBody org.nhindirect.config.model.Setting setting)
Setting - The setting argument that holds the name and value that is to be updated@DeleteMapping(value="{name}")
public reactor.core.publisher.Mono<Void> removeSettingByName(@PathVariable(value="name")
String name)
name - The name of the setting to delete.Copyright © 2021. All rights reserved.