use of org.hisp.dhis.configuration.Configuration in project dhis2-core by dhis2.
the class ConfigurationController method setSystemId.
@PreAuthorize("hasRole('ALL')")
@ResponseStatus(value = HttpStatus.OK)
@RequestMapping(value = "/systemId", method = RequestMethod.POST)
public void setSystemId(@RequestBody(required = false) String systemId) {
systemId = ObjectUtils.firstNonNull(systemId, UUID.randomUUID().toString());
Configuration config = configurationService.getConfiguration();
config.setSystemId(systemId);
configurationService.setConfiguration(config);
}
use of org.hisp.dhis.configuration.Configuration in project dhis2-core by dhis2.
the class ConfigurationController method removeFeedbackRecipients.
@PreAuthorize("hasRole('ALL') or hasRole('F_SYSTEM_SETTING')")
@RequestMapping(value = "/feedbackRecipients", method = RequestMethod.DELETE)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void removeFeedbackRecipients() {
Configuration config = configurationService.getConfiguration();
config.setFeedbackRecipients(null);
configurationService.setConfiguration(config);
}
Aggregations