Interface ThemeService
-
- All Superinterfaces:
CRUDService<ThemeDTO,ThemeData,ThemeDataParams>,Service
- All Known Subinterfaces:
ThemeServiceLocal
public interface ThemeService extends CRUDService<ThemeDTO,ThemeData,ThemeDataParams>
Contains the operations over themes
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidapplyThemes(@NotNull ApplyThemesDTO params)Applies the given themes to the given configuration: logged user, guests, mobile and pay application.FileInfoexport(@NotNull Long id)Exports the given themeStringgetCSS(@NotNull Long id)Returns the CSS corresponding to the theme with the given idStringgetFallbackCSS(@NotNull ThemeType type)Returns a default CSS corresponding to the theme type.ThemesListDatagetListData(@NotNull ConfigurationVO configuration)Returns data to list themes in a configurationThemeVOgetTheme(ThemeType type)Returns the theme for the given type.ThemeVOgetVO(@NotNull Long id)Returns theThemeVOwith the given id.LongimportNew(@NotNull ConfigurationVO configuration, String importedFromFile, SerializableInputStream in)Import the theme definitions from file, creating it on the given configuration, returning the new theme idList<ThemeVO>list(@NotNull ConfigurationVO configuration)Returns a list with visible themes on the given configuration sorted by theme type (first main web themes)-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
-
-
-
Method Detail
-
applyThemes
void applyThemes(@NotNull @NotNull ApplyThemesDTO params) throws FrameworkExceptionApplies the given themes to the given configuration: logged user, guests, mobile and pay application. Passing null means the theme will be inherited from parent configurations, but is not possible for the system default configuration. The themes must be defined within that configuration or in any of it's ancestors.- Throws:
FrameworkException
-
export
FileInfo export(@NotNull @NotNull Long id) throws FrameworkException
Exports the given theme- Throws:
FrameworkException
-
getCSS
String getCSS(@NotNull @NotNull Long id) throws FrameworkException
Returns the CSS corresponding to the theme with the given id- Throws:
FrameworkException
-
getFallbackCSS
String getFallbackCSS(@NotNull @NotNull ThemeType type) throws FrameworkException
Returns a default CSS corresponding to the theme type. It's used only in case the selected theme fails to compile.- Throws:
FrameworkException
-
getListData
ThemesListData getListData(@NotNull @NotNull ConfigurationVO configuration) throws FrameworkException
Returns data to list themes in a configuration- Throws:
FrameworkException
-
getTheme
ThemeVO getTheme(ThemeType type) throws FrameworkException
Returns the theme for the given type. In case ofThemeType.MAIN_WEBthe returned theme depends on if there is a logged user or not.- Throws:
FrameworkException
-
getVO
ThemeVO getVO(@NotNull @NotNull Long id) throws FrameworkException
Returns theThemeVOwith the given id.- Throws:
FrameworkException
-
importNew
Long importNew(@NotNull @NotNull ConfigurationVO configuration, String importedFromFile, SerializableInputStream in) throws FrameworkException, FileParsingException
Import the theme definitions from file, creating it on the given configuration, returning the new theme id
-
list
List<ThemeVO> list(@NotNull @NotNull ConfigurationVO configuration) throws FrameworkException
Returns a list with visible themes on the given configuration sorted by theme type (first main web themes)- Throws:
FrameworkException
-
-