@Component 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 |
|---|---|
javax.ws.rs.core.Response |
addSetting(javax.ws.rs.core.UriInfo uriInfo,
String name,
String value)
Adds a setting to the system.
|
javax.ws.rs.core.Response |
getAllSettings()
Gets all settings in the system.
|
javax.ws.rs.core.Response |
getSettingByName(String name)
Gets a setting by name.
|
javax.ws.rs.core.Response |
removeSettingByName(String name)
Deletes a setting in the system by name.
|
void |
setSettingDao(org.nhindirect.config.store.dao.SettingDao settingDao)
Sets the settings Dao.
|
javax.ws.rs.core.Response |
updateSetting(String name,
String value)
Updates the value of a setting.
|
@Autowired public void setSettingDao(org.nhindirect.config.store.dao.SettingDao settingDao)
settingDao - Settings Daopublic javax.ws.rs.core.Response getAllSettings()
public javax.ws.rs.core.Response getSettingByName(String name)
name - The name of the setting to retrieve.public javax.ws.rs.core.Response addSetting(@Context
javax.ws.rs.core.UriInfo uriInfo,
String name,
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.public javax.ws.rs.core.Response updateSetting(String name, String value)
name - The name of the setting to update.value - The new value of the setting.public javax.ws.rs.core.Response removeSettingByName(String name)
name - The name of the setting to delete.Copyright © 2015. All Rights Reserved.