站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

ThemeService - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.theme
Interface ThemeService

All Superinterfaces:
ThemeServiceInfo
All Known Implementing Classes:
ThemeServiceImpl

public interface ThemeService
extends ThemeServiceInfo

The ThemeService is the location where all the available themes are stored and retrieved.

The theme server works together with a deployer to register and unregister themes. The portal can access the theme server via the server manager, and query it for available themes.

Version:
$Revision: 5448 $
Author:
Martin Holzner.

Method Summary
 void addTheme(RuntimeContext runtimeContext, PortalThemeMetaData metaData)
          Add a theme.
 void removeTheme(PortalTheme theme)
          Remove the theme from the available themes.
 void removeThemes(java.lang.String applicationName)
          Remove all themes that are registered with the provided application.
 void setDefault(ServerRegistrationID themeID)
          Set the default theme on a global scope.
 
Methods inherited from interface org.jboss.portal.theme.ThemeServiceInfo
getTheme, getTheme, getThemeNames, getThemes
 

Method Detail

addTheme

public void addTheme(RuntimeContext runtimeContext,
                     PortalThemeMetaData metaData)
              throws ThemeException
Add a theme.

Parameters:
metaData - the meta data about the theme
Throws:
ThemeException

setDefault

public void setDefault(ServerRegistrationID themeID)
                throws ThemeException
Set the default theme on a global scope.

Parameters:
themeID - the registration id of the theme to be the new default theme
Throws:
ThemeException - if the theme with this id is not available in the list of currently registered themes

removeTheme

public void removeTheme(PortalTheme theme)
                 throws ThemeException
Remove the theme from the available themes.

Parameters:
theme - the theme to be removed
Throws:
ThemeException - if the theme with this id is not available in the list of currently registered themes

removeThemes

public void removeThemes(java.lang.String applicationName)
                  throws ThemeException
Remove all themes that are registered with the provided application.

On deployment of a new application, the theme descriptor (if any present) in that application is parsed for themes that are to be registered with the theme server. For each entry in the descriptor, a new theme is registered with the theme server. Uppon undeployment of that same application, all themes must be deregistered. This method is a convenient way to achieve this.

Parameters:
applicationName - the name of the application that hosts the themes to unregister
Throws:
ThemeException - if there are no themes registered with this application, or if an error occurs during the remove