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

ThemeServiceImpl - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.theme.impl
Class ThemeServiceImpl

java.lang.Object
  extended byorg.jboss.portal.theme.impl.ThemeServiceImpl
All Implemented Interfaces:
org.jboss.system.Service, ThemeService

public class ThemeServiceImpl
extends java.lang.Object
implements ThemeService, org.jboss.system.Service

TODO: A description of this class.


Constructor Summary
ThemeServiceImpl()
           
 
Method Summary
 void addTheme(ThemeRegistrationMetaData metaData)
          Add a theme.
 void create()
           
 void destroy()
           
 PortalTheme getTheme(ServerRegistrationID themeID, boolean defaultOnNull)
          Get a reference to a theme.
 PortalTheme getTheme(java.lang.String name, boolean defaultOnNull)
          Get a reference to a theme.
 java.util.Collection getThemeNames()
          Get a Collection of all the registered theme's names
 java.util.Collection getThemes()
          Get a Collection of all registered themes.
 void removeTheme(ServerRegistrationID themeID)
          Remove the theme from the available themes.
 void removeTheme(java.lang.String name)
           
 void removeThemes(java.lang.String appID)
          Remove all themes that are registered with the provided application.
 void setDefault(ServerRegistrationID themeID)
          Set the default theme on a global scope.
 void setDefault(java.lang.String name)
          Set the default theme.
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThemeServiceImpl

public ThemeServiceImpl()
Method Detail

create

public void create()
            throws java.lang.Exception
Specified by:
create in interface org.jboss.system.Service
Throws:
java.lang.Exception

destroy

public void destroy()
Specified by:
destroy in interface org.jboss.system.Service

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface org.jboss.system.Service
Throws:
java.lang.Exception

stop

public void stop()
Specified by:
stop in interface org.jboss.system.Service

addTheme

public void addTheme(ThemeRegistrationMetaData metaData)
              throws ThemeException
Description copied from interface: ThemeService
Add a theme.

Specified by:
addTheme in interface ThemeService
Parameters:
metaData - the meta data about the theme
Throws:
ThemeException
See Also:
ThemeService.addTheme(org.jboss.portal.theme.metadata.ThemeRegistrationMetaData)

removeTheme

public void removeTheme(java.lang.String name)

removeTheme

public void removeTheme(ServerRegistrationID themeID)
Description copied from interface: ThemeService
Remove the theme from the available themes.

Specified by:
removeTheme in interface ThemeService
Parameters:
themeID - the registration id of the theme to be removed
See Also:
ThemeService.removeTheme(org.jboss.portal.theme.ServerRegistrationID)

removeThemes

public void removeThemes(java.lang.String appID)
Description copied from interface: ThemeService
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.

Specified by:
removeThemes in interface ThemeService
Parameters:
appID - the name of the application that hosts the themes to unregister
See Also:
ThemeService.removeThemes(String)

setDefault

public void setDefault(ServerRegistrationID themeID)
                throws ThemeException
Description copied from interface: ThemeService
Set the default theme on a global scope.

Specified by:
setDefault in interface ThemeService
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
See Also:
ThemeService.setDefault(org.jboss.portal.theme.ServerRegistrationID)

setDefault

public void setDefault(java.lang.String name)
                throws ThemeException
Set the default theme.

Parameters:
name - the name of the theme that is to be set as default
Throws:
ThemeException - if the theme is not part of the available themes

getTheme

public PortalTheme getTheme(ServerRegistrationID themeID,
                            boolean defaultOnNull)
Description copied from interface: ThemeService
Get a reference to a theme.

Specified by:
getTheme in interface ThemeService
Parameters:
themeID - the registration id of the theme to retrieve
defaultOnNull - true, when the server should return the default theme, in case the requested is not found
Returns:
the requested theme, null, or the default theme if defaultOnNull was provided as true
See Also:
ThemeService.getTheme(org.jboss.portal.theme.ServerRegistrationID, boolean)

getTheme

public PortalTheme getTheme(java.lang.String name,
                            boolean defaultOnNull)
Description copied from interface: ThemeService
Get a reference to a theme.

Specified by:
getTheme in interface ThemeService
Parameters:
name - the name of the theme to retrieve
defaultOnNull - true, when the server should return the default theme, in case the requested is not found
Returns:
the requested theme, null, or the default theme if defaultOnNull was provided as true
See Also:
ThemeService.getTheme(String, boolean)

getThemes

public java.util.Collection getThemes()
Description copied from interface: ThemeService
Get a Collection of all registered themes.

Specified by:
getThemes in interface ThemeService
Returns:
a Collection of all registered themes
See Also:
ThemeService.getThemes()

getThemeNames

public java.util.Collection getThemeNames()
Description copied from interface: ThemeService
Get a Collection of all the registered theme's names

Specified by:
getThemeNames in interface ThemeService
Returns:
a collection of theme names
See Also:
ThemeService.getThemeNames()