public class ThemeServiceImpl extends java.lang.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()
Temporary halt the execution of this service.
|
void |
restoreDefaultTheme(SThemeType type)
Restore default theme by the given type
|
void |
resume()
resume the execution the service
|
java.util.List<STheme> |
searchThemes(QueryOptions queryOptions)
Search the themes corresponding to criteria
|
void |
start()
Start the service
|
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 java.util.List<STheme> searchThemes(QueryOptions queryOptions) throws SBonitaReadException
ThemeServicesearchThemes in interface ThemeServicequeryOptions - A map of specific parameters of a querySBonitaReadExceptionpublic void start()
throws SBonitaException
LifecycleServicestart in interface LifecycleServiceSBonitaExceptionpublic void stop()
throws SBonitaException
stop in interface LifecycleServiceSBonitaExceptionpublic void pause()
throws SBonitaException
LifecycleServicepause in interface LifecycleServiceSBonitaExceptionpublic void resume()
throws SBonitaException
LifecycleServiceresume in interface LifecycleServiceSBonitaException