|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.portal.server.impl.ThemeServerImpl
public class ThemeServerImpl
TODO: A description of this class.
Constructor Summary | |
---|---|
ThemeServerImpl()
|
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)
Lookup the theme with the provided name and return it. |
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 appName)
Remove all themes for the given WebApp (ServletContext). |
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 ThemeServerImpl()
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
ThemeServer
addTheme
in interface ThemeServer
metaData
- the meta data about the theme
ThemeException
public void removeTheme(java.lang.String name)
public void removeTheme(ServerRegistrationID themeID)
ThemeServer
removeTheme
in interface ThemeServer
themeID
- the registration id of the theme to be removedpublic void removeThemes(java.lang.String appName)
In case a web app gets removed (undeployed), and this web app contains registered portal themes, all themes of that web app, need to be removed to prevent unresolvable links, etc.
removeThemes
in interface ThemeServer
appName
- the name of the application that contains the themes that need to be removedpublic void setDefault(ServerRegistrationID themeID) throws ThemeException
ThemeServer
setDefault
in interface ThemeServer
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 themespublic 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)
ThemeServer
getTheme
in interface ThemeServer
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 truepublic PortalTheme getTheme(java.lang.String name, boolean defaultOnNull)
getTheme
in interface ThemeServer
name
- the theme to look fordefaultOnNull
- if true, return the default theme if the theme with the provided name is not available
defaultOnNull
is true, and
there is no theme with the provided name
java.lang.IllegalArgumentException
- if the provided name is null or emptypublic java.util.Collection getThemes()
ThemeServer
getThemes
in interface ThemeServer
public java.util.Collection getThemeNames()
ThemeServer
getThemeNames
in interface ThemeServer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |