|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.portal.theme.impl.ThemeServiceImpl
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 |
public ThemeServiceImpl()
Method Detail |
public void create() throws java.lang.Exception
create
in interface org.jboss.system.Service
java.lang.Exception
public void destroy()
destroy
in interface org.jboss.system.Service
public void start() throws java.lang.Exception
start
in interface org.jboss.system.Service
java.lang.Exception
public void stop()
stop
in interface org.jboss.system.Service
public void addTheme(ThemeRegistrationMetaData metaData) throws ThemeException
ThemeService
addTheme
in interface ThemeService
metaData
- the meta data about the theme
ThemeException
ThemeService.addTheme(org.jboss.portal.theme.metadata.ThemeRegistrationMetaData)
public void removeTheme(java.lang.String name)
public void removeTheme(ServerRegistrationID themeID)
ThemeService
removeTheme
in interface ThemeService
themeID
- the registration id of the theme to be removedThemeService.removeTheme(org.jboss.portal.theme.ServerRegistrationID)
public void removeThemes(java.lang.String appID)
ThemeService
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.
removeThemes
in interface ThemeService
appID
- the name of the application that hosts the themes to unregisterThemeService.removeThemes(String)
public void setDefault(ServerRegistrationID themeID) throws ThemeException
ThemeService
setDefault
in interface ThemeService
themeID
- the registration id of the theme to be the new default theme
ThemeException
- if the theme with this id is not available in the list of currently registered themesThemeService.setDefault(org.jboss.portal.theme.ServerRegistrationID)
public void setDefault(java.lang.String name) throws ThemeException
name
- the name of the theme that is to be set as default
ThemeException
- if the theme is not part of the available themespublic PortalTheme getTheme(ServerRegistrationID themeID, boolean defaultOnNull)
ThemeService
getTheme
in interface ThemeService
themeID
- the registration id of the theme to retrievedefaultOnNull
- true, when the server should return the default theme, in case the requested is not found
defaultOnNull
was provided as trueThemeService.getTheme(org.jboss.portal.theme.ServerRegistrationID, boolean)
public PortalTheme getTheme(java.lang.String name, boolean defaultOnNull)
ThemeService
getTheme
in interface ThemeService
name
- the name of the theme to retrievedefaultOnNull
- true, when the server should return the default theme, in case the requested is not found
defaultOnNull
was provided as trueThemeService.getTheme(String, boolean)
public java.util.Collection getThemes()
ThemeService
getThemes
in interface ThemeService
ThemeService.getThemes()
public java.util.Collection getThemeNames()
ThemeService
getThemeNames
in interface ThemeService
ThemeService.getThemeNames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |