@Controller public class AdminSettingsController extends AbstractController
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private UserService |
userService |
Constructor and Description |
---|
AdminSettingsController() |
Modifier and Type | Method and Description |
---|---|
org.springframework.web.servlet.ModelAndView |
displaySettings(Principal user) |
String |
dump() |
Map<String,Object> |
getData() |
UserService |
getUserService() |
private void |
logSettings(Collection<SettingValue<?>> values) |
void |
setUserService(UserService userService) |
String |
unauthorized(org.springframework.security.authentication.BadCredentialsException ex) |
private void |
updateAdminUser(javax.servlet.http.HttpServletRequest request,
Principal user) |
private void |
updateAdminUser(javax.servlet.http.HttpServletRequest req,
String newPassword,
String newUsername,
String currentPassword,
String currentUsername) |
private void |
updateSettings(javax.servlet.http.HttpServletRequest request) |
void |
updateSettings(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Principal user) |
getBasePath, getContext, getDatabaseSettingsHandler, getMetaDataHandler, getSettingsManager, parseBoolean, parseBoolean, setContext, toSimpleMap
private static final org.slf4j.Logger LOG
@Autowired private UserService userService
public UserService getUserService()
public void setUserService(UserService userService)
@ExceptionHandler(value=org.springframework.security.authentication.BadCredentialsException.class) @ResponseStatus(value=UNAUTHORIZED) @ResponseBody public String unauthorized(org.springframework.security.authentication.BadCredentialsException ex)
@RequestMapping(value="/admin/settings", method=GET) public org.springframework.web.servlet.ModelAndView displaySettings(Principal user)
@RequestMapping(value="/admin/settings", method=POST) public void updateSettings(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Principal user) throws org.springframework.security.core.AuthenticationException, ConfigurationException
org.springframework.security.core.AuthenticationException
ConfigurationException
@ResponseBody @RequestMapping(value="/admin/settings.json", method=GET, produces="application/json; charset=UTF-8") public String dump()
private void logSettings(Collection<SettingValue<?>> values)
private void updateSettings(javax.servlet.http.HttpServletRequest request) throws ConnectionProviderException
ConnectionProviderException
private void updateAdminUser(javax.servlet.http.HttpServletRequest request, Principal user) throws org.springframework.security.core.AuthenticationException, ConfigurationException
org.springframework.security.core.AuthenticationException
ConfigurationException
private void updateAdminUser(javax.servlet.http.HttpServletRequest req, String newPassword, String newUsername, String currentPassword, String currentUsername) throws org.springframework.security.core.AuthenticationException, ConfigurationException
org.springframework.security.core.AuthenticationException
ConfigurationException
Copyright © 2012-2014 52north.org. All Rights Reserved.