@PreAuthorize("hasDomainConfigurationAccess(#domainConfigurationForm.domainId) or hasRole('ROLE_ADMIN')")
@RequestMapping(value = "/manager/saveDomainConfiguration", method = RequestMethod.POST)
public String saveDomainConfiguration(Model model, @ModelAttribute DomainConfigurationForm domainConfigurationForm) {
Domain domain = domainService.get(domainConfigurationForm.getDomainId());
if (domain == null) {
throw new EntityNotFoundException(String.format("Domain entity not found while saving DomainConfiguration: %s", domainConfigurationForm.getDomainId()));
}
model.addAttribute("domain", domain);
DomainConfiguration domainConfiguration = getDomainConfiguration(domain, domainConfigurationForm);
domainConfigurationService.update(domainConfiguration);