@Path("/settings") @POST @ApiOperation(value = "Save application settings", notes = "Save application settings") public Response saveSettings(@ApiParam(required = true) ApplicationSettings settings) { Preconditions.checkNotNull(settings); applicationSettingsService.save(settings); return Response.ok().build(); }
private void initialData() { log.info("Populating database with default values"); ApplicationSettings settings = new ApplicationSettings(); settings.setAnnouncement("Set the Public URL in the admin section !"); applicationSettingsService.save(settings); userService.register(USERNAME_ADMIN, "admin", Arrays.asList(Role.ADMIN, Role.USER)); userService.register(USERNAME_DEMO, "demo", Arrays.asList(Role.USER)); }