Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.theme
Interface ThemeManager

All Known Implementing Classes:
AbstractThemeManager, ForumThemeManager

public interface ThemeManager

Manages all aspects of themes and theme maps. Use the ThemeManagerFactory.getInstance() method to retrieve a concrete instance of this interface.


Method Summary
 void addThemeMap(java.lang.String theme, ThemeMap themeMap)
          Adds a theme mapping to the system.
 void deleteThemeMap(ThemeMap themeMap)
          Removes a theme mapping from the system.
 Theme determineTheme(com.opensymphony.xwork.ActionContext context, javax.servlet.http.HttpServletRequest request)
          Returns the Theme corresponding to the given parameters, or null if no theme meets the criteria.
 Theme getGlobalTheme()
          Returns the Theme object that is currently installed as the 'Global' theme, or null if a global theme is not installed.
 Theme getTheme(ThemeMap themeMap)
          Returns the Theme object corresponding to the provided themeMap, or null if no association is found.
 java.lang.String getThemeHome()
          Returns the absolute path to the theme home directory.
 java.util.Map getThemeMaps()
          Returns a Map of theme name -> ThemeMap objects.
 java.util.Collection getThemes()
          Returns a Collection of Theme objects for all the themes in the system.
 void reloadThemeMaps()
          Used to force a reload (and resort) of theme maps.
 

Method Detail

getThemeHome

java.lang.String getThemeHome()
Returns the absolute path to the theme home directory. By default this will be located at jiveHome/themes however this can be changed by specifying a fully qualified path as the value to the jive property 'themes.directory'.

Returns:
the absolute path to the theme home directory.

getThemes

java.util.Collection getThemes()
Returns a Collection of Theme objects for all the themes in the system.

Returns:
a Collection of Theme objects for all the themes in the system.

getThemeMaps

java.util.Map getThemeMaps()
Returns a Map of theme name -> ThemeMap objects.

Returns:
a map of theme name -> ThemeMap objects.
See Also:
ThemeMap

getGlobalTheme

Theme getGlobalTheme()
Returns the Theme object that is currently installed as the 'Global' theme, or null if a global theme is not installed.

Returns:
the Theme object corresponding to the currently installed as the 'Global' theme, or null if a global theme is not installed.

getTheme

Theme getTheme(ThemeMap themeMap)
Returns the Theme object corresponding to the provided themeMap, or null if no association is found.

Parameters:
themeMap - the theme map to use to retrieve the theme
Returns:
the Theme object corresponding to the provided themeMap, or null if no association is found

determineTheme

Theme determineTheme(com.opensymphony.xwork.ActionContext context,
                     javax.servlet.http.HttpServletRequest request)
Returns the Theme corresponding to the given parameters, or null if no theme meets the criteria.

Parameters:
context - the action context
request - the servlet request
Returns:
the Theme corresponding to the given parameters, or null if no theme meets the criteria
See Also:
Theme

addThemeMap

void addThemeMap(java.lang.String theme,
                 ThemeMap themeMap)
Adds a theme mapping to the system.

Parameters:
theme - the name of the theme
themeMap - the ThemeMap containing the criteria used to determine when to use the theme

deleteThemeMap

void deleteThemeMap(ThemeMap themeMap)
Removes a theme mapping from the system.

Parameters:
themeMap - the ThemeMap to remove.

reloadThemeMaps

void reloadThemeMaps()
Used to force a reload (and resort) of theme maps. This method should be called whenever the ThemeType priorities have been changed.


Jive Forums Project Page

Copyright © 1999-2006 Jive Software.