@Component public class StyleServiceImpl extends Object implements StyleService
| Modifier and Type | Field and Description |
|---|---|
static String |
BOOTSTRAP_FALL_BACK_THEME |
| Constructor and Description |
|---|
StyleServiceImpl(org.molgenis.data.settings.AppSettings appSettings,
IdGenerator idGenerator,
FileStore fileStore,
FileMetaFactory fileMetaFactory,
StyleSheetFactory styleSheetFactory,
DataService dataService) |
| Modifier and Type | Method and Description |
|---|---|
Style |
addStyle(String styleId,
String bootstrap3FileName,
InputStream bootstrap3StyleData,
String bootstrap4FileName,
InputStream bootstrap4StyleData)
Add a bootstrap theme
|
StyleSheet |
findThemeByName(String themeName)
Find the styleSheet for a given theme name
|
Set<Style> |
getAvailableStyles()
Fetches the available styleSheet from the data store and stores them in a list
|
Style |
getSelectedStyle()
Get the style that is currently selected
|
Style |
getStyle(String styleName)
Returns a style that matches the name of the given input
|
org.springframework.core.io.FileSystemResource |
getThemeData(String styleName,
BootstrapVersion bootstrapVersion)
Get the styleSheet data for a given theme and bootstrap version ( 3 or 4 )
|
void |
setSelectedStyle(String styleName)
Set the runtime property that controls the css style with a selected style
|
public static final String BOOTSTRAP_FALL_BACK_THEME
public StyleServiceImpl(org.molgenis.data.settings.AppSettings appSettings, IdGenerator idGenerator, FileStore fileStore, FileMetaFactory fileMetaFactory, StyleSheetFactory styleSheetFactory, DataService dataService)
public Set<Style> getAvailableStyles()
StyleServicegetAvailableStyles in interface StyleServicepublic Style addStyle(String styleId, String bootstrap3FileName, InputStream bootstrap3StyleData, String bootstrap4FileName, InputStream bootstrap4StyleData) throws MolgenisStyleException
StyleServiceaddStyle in interface StyleServicestyleId - the them identifier used in the requestbootstrap3FileName - the name to use as fileName for the bootstrap 3 filebootstrap3StyleData - the bootstrap 3 style databootstrap4FileName - the name to use as fileName for the bootstrap 4 file, this is optionalbootstrap4StyleData - the bootstrap 4 style data, this is optionalMolgenisStyleExceptionpublic void setSelectedStyle(String styleName)
StyleServicesetSelectedStyle in interface StyleServicepublic Style getSelectedStyle()
StyleServicegetSelectedStyle in interface StyleServicepublic Style getStyle(String styleName)
StyleServicegetStyle in interface StyleServicepublic org.springframework.core.io.FileSystemResource getThemeData(String styleName, BootstrapVersion bootstrapVersion) throws MolgenisStyleException
StyleServicegetThemeData in interface StyleServicestyleName - the theme identifierbootstrapVersion - the bootstrap version ( 3 or 4)MolgenisStyleExceptionpublic StyleSheet findThemeByName(String themeName)
StyleServicefindThemeByName in interface StyleServicethemeName - the name of the themeCopyright © 2017. All rights reserved.