public class ThemeServiceImpl extends Object implements ThemeService
THEME| Constructor and Description |
|---|
ThemeServiceImpl(ReadPersistenceService persistenceService,
Recorder recorder,
EventService eventService,
TechnicalLoggerService logger,
QueriableLoggerService queriableLoggerService,
ThemeRetriever themeRetriever) |
| Modifier and Type | Method and Description |
|---|---|
STheme |
createTheme(STheme theme)
Add a new theme
|
void |
deleteTheme(long id)
Delete theme by its id
|
void |
deleteTheme(STheme theme)
Delete theme by the given theme
|
STheme |
getLastModifiedTheme(SThemeType type)
Get the last modified theme for the specific type.
|
long |
getLastUpdateDate(SThemeType type) |
long |
getNumberOfThemes(QueryOptions queryOptions)
Get the number of the themes corresponding to criteria
|
STheme |
getTheme(long id)
Get theme by its id
|
STheme |
getTheme(SThemeType type,
boolean isDefault)
Get the default or current theme for the specific type.
|
void |
pause() |
void |
restoreDefaultTheme(SThemeType type)
Restore default theme by the given type
|
void |
resume() |
List<STheme> |
searchThemes(QueryOptions queryOptions)
Search the themes corresponding to criteria
|
void |
start() |
void |
stop() |
STheme |
updateTheme(STheme sTheme,
EntityUpdateDescriptor descriptor)
Update a theme by the given theme and the new content
|
public ThemeServiceImpl(ReadPersistenceService persistenceService, Recorder recorder, EventService eventService, TechnicalLoggerService logger, QueriableLoggerService queriableLoggerService, ThemeRetriever themeRetriever)
public STheme createTheme(STheme theme) throws SThemeCreationException
ThemeServicecreateTheme in interface ThemeServicetheme - The theme to createSThemeCreationException - If an exception is thrown during sTheme creationpublic void deleteTheme(long id)
throws SThemeNotFoundException,
SThemeDeletionException
ThemeServicedeleteTheme in interface ThemeServiceid - The identifier of the theme to deleteSThemeNotFoundException - If the identifier does not refer to an existing sThemeSThemeDeletionException - If an exception is thrown during sTheme deletionpublic void deleteTheme(STheme theme) throws SThemeDeletionException
ThemeServicedeleteTheme in interface ThemeServicetheme - The theme to deleteSThemeDeletionException - If an exception is thrown during sTheme deletionpublic void restoreDefaultTheme(SThemeType type) throws SRestoreThemeException
ThemeServicerestoreDefaultTheme in interface ThemeServicetype - The type of the theme to restoreSRestoreThemeException - If an exception is thrown when the default theme is restoredpublic STheme getTheme(SThemeType type, boolean isDefault) throws SThemeNotFoundException, SThemeReadException
ThemeServicegetTheme in interface ThemeServicetype - The type of the themeisDefault - Theme is default or notSThemeNotFoundException - If the type does not refer to an existing sThemeSThemeReadExceptionpublic STheme getTheme(long id) throws SThemeNotFoundException, SThemeReadException
ThemeServicegetTheme in interface ThemeServiceid - The identifier of the themeSThemeNotFoundException - If the identifier does not refer to an existing sThemeSThemeReadExceptionpublic STheme getLastModifiedTheme(SThemeType type) throws SThemeNotFoundException, SThemeReadException
ThemeServicegetLastModifiedTheme in interface ThemeServicetype - The type of the themeSThemeNotFoundException - If the type does not refer to an existing sThemeSThemeReadExceptionpublic long getLastUpdateDate(SThemeType type) throws SBonitaReadException
getLastUpdateDate in interface ThemeServiceSBonitaReadExceptionpublic STheme updateTheme(STheme sTheme, EntityUpdateDescriptor descriptor) throws SThemeUpdateException
ThemeServiceupdateTheme in interface ThemeServicesTheme - The theme to updatedescriptor - All attributes to updateSThemeUpdateException - If an exception is thrown during sTheme updatepublic long getNumberOfThemes(QueryOptions queryOptions) throws SBonitaReadException
ThemeServicegetNumberOfThemes in interface ThemeServicequeryOptions - A map of specific parameters of a querySBonitaReadExceptionpublic List<STheme> searchThemes(QueryOptions queryOptions) throws SBonitaReadException
ThemeServicesearchThemes in interface ThemeServicequeryOptions - A map of specific parameters of a querySBonitaReadExceptionpublic void start()
throws org.bonitasoft.engine.commons.exceptions.SBonitaException
start in interface org.bonitasoft.engine.commons.LifecycleServiceorg.bonitasoft.engine.commons.exceptions.SBonitaExceptionpublic void stop()
throws org.bonitasoft.engine.commons.exceptions.SBonitaException
stop in interface org.bonitasoft.engine.commons.LifecycleServiceorg.bonitasoft.engine.commons.exceptions.SBonitaExceptionpublic void pause()
throws org.bonitasoft.engine.commons.exceptions.SBonitaException
pause in interface org.bonitasoft.engine.commons.LifecycleServiceorg.bonitasoft.engine.commons.exceptions.SBonitaExceptionpublic void resume()
throws org.bonitasoft.engine.commons.exceptions.SBonitaException
resume in interface org.bonitasoft.engine.commons.LifecycleServiceorg.bonitasoft.engine.commons.exceptions.SBonitaExceptionCopyright © 2018 Bonitasoft S.A.. All rights reserved.