Class ThemeService
- java.lang.Object
-
- fr.paris.lutece.plugins.theme.service.ThemeService
-
- All Implemented Interfaces:
fr.paris.lutece.portal.service.portal.IThemeService
public class ThemeService extends java.lang.Object implements fr.paris.lutece.portal.service.portal.IThemeServiceThemeService
-
-
Constructor Summary
Constructors Constructor Description ThemeService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description fr.paris.lutece.portal.business.style.Themecreate(fr.paris.lutece.portal.business.style.Theme theme)Creation of an instance of a themefr.paris.lutece.portal.business.style.ThemegetGlobalTheme()Get the global themestatic ThemeServicegetInstance()Return the ThemeService singletonfr.paris.lutece.portal.business.style.ThemegetTheme(java.lang.String strCodeTheme)Get the theme with a given code themefr.paris.lutece.util.ReferenceListgetThemes()Get the list of themesjava.util.Collection<fr.paris.lutece.portal.business.style.Theme>getThemesList()Return the list of all the themesjava.lang.StringgetUserTheme(javax.servlet.http.HttpServletRequest request)Gets the theme selected by the uservoidinit()InitbooleanisValidTheme(java.lang.String strCodeTheme)Checks if the theme is among existing themesvoidremove(java.lang.String strCodeTheme)Remove the theme whose identifier is specified in parametervoidsetGlobalTheme(java.lang.String strGlobalTheme)Set the global themefr.paris.lutece.portal.business.style.Themeupdate(fr.paris.lutece.portal.business.style.Theme theme)Update of the theme which is specified
-
-
-
Method Detail
-
getInstance
public static ThemeService getInstance()
Return the ThemeService singleton- Returns:
- the ThemeService singleton
-
init
public void init()
Init
-
getThemes
public fr.paris.lutece.util.ReferenceList getThemes()
Get the list of themes- Specified by:
getThemesin interfacefr.paris.lutece.portal.service.portal.IThemeService- Returns:
- a list of themes
-
getTheme
public fr.paris.lutece.portal.business.style.Theme getTheme(java.lang.String strCodeTheme)
Get the theme with a given code theme- Specified by:
getThemein interfacefr.paris.lutece.portal.service.portal.IThemeService- Parameters:
strCodeTheme- the code theme- Returns:
- the theme
-
getGlobalTheme
public fr.paris.lutece.portal.business.style.Theme getGlobalTheme()
Get the global theme- Specified by:
getGlobalThemein interfacefr.paris.lutece.portal.service.portal.IThemeService- Returns:
- the global theme
-
getUserTheme
public java.lang.String getUserTheme(javax.servlet.http.HttpServletRequest request)
Gets the theme selected by the user- Specified by:
getUserThemein interfacefr.paris.lutece.portal.service.portal.IThemeService- Parameters:
request- The HTTP request- Returns:
- The theme if available otherwise null
-
getThemesList
public java.util.Collection<fr.paris.lutece.portal.business.style.Theme> getThemesList()
Return the list of all the themes- Specified by:
getThemesListin interfacefr.paris.lutece.portal.service.portal.IThemeService- Returns:
- A collection of themes objects
-
setGlobalTheme
public void setGlobalTheme(java.lang.String strGlobalTheme)
Set the global theme- Specified by:
setGlobalThemein interfacefr.paris.lutece.portal.service.portal.IThemeService- Parameters:
strGlobalTheme- the code theme of the global theme
-
create
public fr.paris.lutece.portal.business.style.Theme create(fr.paris.lutece.portal.business.style.Theme theme)
Creation of an instance of a theme- Specified by:
createin interfacefr.paris.lutece.portal.service.portal.IThemeService- Parameters:
theme- An instance of a theme which contains the informations to store- Returns:
- The instance of a theme which has been created with its primary key.
-
update
public fr.paris.lutece.portal.business.style.Theme update(fr.paris.lutece.portal.business.style.Theme theme)
Update of the theme which is specified- Specified by:
updatein interfacefr.paris.lutece.portal.service.portal.IThemeService- Parameters:
theme- The instance of the theme which contains the data to store- Returns:
- The instance of the theme which has been updated
-
remove
public void remove(java.lang.String strCodeTheme)
Remove the theme whose identifier is specified in parameter- Specified by:
removein interfacefr.paris.lutece.portal.service.portal.IThemeService- Parameters:
strCodeTheme- The identifier of the theme to remove
-
isValidTheme
public boolean isValidTheme(java.lang.String strCodeTheme)
Checks if the theme is among existing themes- Specified by:
isValidThemein interfacefr.paris.lutece.portal.service.portal.IThemeService- Parameters:
strCodeTheme- The theme to check- Returns:
- True if the theme is valid
-
-