@Controller @RequestMapping(value="/plugin/thememanager") public class ThemeManagerController extends PluginController
| Modifier and Type | Field and Description |
|---|---|
static String |
ID |
static String |
URI |
PLUGIN_URI_PREFIX| Constructor and Description |
|---|
ThemeManagerController(StyleService styleService) |
| Modifier and Type | Method and Description |
|---|---|
Style |
addBootstrapTheme(org.springframework.web.multipart.MultipartFile bootstrap3Style,
org.springframework.web.multipart.MultipartFile bootstrap4Style)
Add a new bootstrap theme, theme is passed as a bootstrap css file.
|
ErrorMessageResponse |
handleStyleException(Exception e) |
String |
init(org.springframework.ui.Model model) |
void |
setBootstrapTheme(String styleName)
Set a new bootstrap theme
|
getId, getPluginSettings, getUripublic static final String ID
public static final String URI
public ThemeManagerController(StyleService styleService)
@GetMapping public String init(org.springframework.ui.Model model)
@PreAuthorize(value="hasAnyRole(\'ROLE_SU\')")
@PostMapping(value="/set-bootstrap-theme",
produces="application/json",
consumes="application/json")
@ResponseBody
public void setBootstrapTheme(@RequestBody
String styleName)
@PreAuthorize(value="hasAnyRole(\'ROLE_SU\')") @PostMapping(value="/add-bootstrap-theme") @ResponseBody public Style addBootstrapTheme(@RequestParam(value="bootstrap3-style") org.springframework.web.multipart.MultipartFile bootstrap3Style, @RequestParam(value="bootstrap4-style",required=false) org.springframework.web.multipart.MultipartFile bootstrap4Style) throws MolgenisStyleException
MolgenisStyleException@ResponseBody @ResponseStatus(value=BAD_REQUEST) @ExceptionHandler(value=MolgenisStyleException.class) public ErrorMessageResponse handleStyleException(Exception e)
Copyright © 2017. All rights reserved.