fr.paris.lutece.plugins.theme.service
Class ThemeService

java.lang.Object
  extended by fr.paris.lutece.plugins.theme.service.ThemeService
All Implemented Interfaces:
fr.paris.lutece.portal.service.portal.IThemeService

public class ThemeService
extends Object
implements fr.paris.lutece.portal.service.portal.IThemeService

ThemeService


Constructor Summary
ThemeService()
           
 
Method Summary
 fr.paris.lutece.portal.business.style.Theme create(fr.paris.lutece.portal.business.style.Theme theme)
          Creation of an instance of a theme
 fr.paris.lutece.portal.business.style.Theme getGlobalTheme()
          Get the global theme
static ThemeService getInstance()
          Return the ThemeService singleton
 fr.paris.lutece.portal.business.style.Theme getTheme(String strCodeTheme)
          Get the theme with a given code theme
 fr.paris.lutece.util.ReferenceList getThemes()
          Get the list of themes
 Collection<fr.paris.lutece.portal.business.style.Theme> getThemesList()
          Return the list of all the themes
 String getUserTheme(javax.servlet.http.HttpServletRequest request)
          Gets the theme selected by the user
 void init()
          Init
 boolean isValidTheme(String strCodeTheme)
          Checks if the theme is among existing themes
 void remove(String strCodeTheme)
          Remove the theme whose identifier is specified in parameter
 void setGlobalTheme(String strGlobalTheme)
          Set the global theme
 fr.paris.lutece.portal.business.style.Theme update(fr.paris.lutece.portal.business.style.Theme theme)
          Update of the theme which is specified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThemeService

public ThemeService()
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:
getThemes in interface fr.paris.lutece.portal.service.portal.IThemeService
Returns:
a list of themes

getTheme

public fr.paris.lutece.portal.business.style.Theme getTheme(String strCodeTheme)
Get the theme with a given code theme

Specified by:
getTheme in interface fr.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:
getGlobalTheme in interface fr.paris.lutece.portal.service.portal.IThemeService
Returns:
the global theme

getUserTheme

public String getUserTheme(javax.servlet.http.HttpServletRequest request)
Gets the theme selected by the user

Specified by:
getUserTheme in interface fr.paris.lutece.portal.service.portal.IThemeService
Parameters:
request - The HTTP request
Returns:
The theme if available otherwise null

getThemesList

public Collection<fr.paris.lutece.portal.business.style.Theme> getThemesList()
Return the list of all the themes

Specified by:
getThemesList in interface fr.paris.lutece.portal.service.portal.IThemeService
Returns:
A collection of themes objects

setGlobalTheme

public void setGlobalTheme(String strGlobalTheme)
Set the global theme

Specified by:
setGlobalTheme in interface fr.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:
create in interface fr.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:
update in interface fr.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(String strCodeTheme)
Remove the theme whose identifier is specified in parameter

Specified by:
remove in interface fr.paris.lutece.portal.service.portal.IThemeService
Parameters:
strCodeTheme - The identifier of the theme to remove

isValidTheme

public boolean isValidTheme(String strCodeTheme)
Checks if the theme is among existing themes

Specified by:
isValidTheme in interface fr.paris.lutece.portal.service.portal.IThemeService
Parameters:
strCodeTheme - The theme to check
Returns:
True if the theme is valid


Copyright © 2013 Mairie de Paris. All Rights Reserved.