|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Method Summary | |
void |
addTheme(ThemeRegistrationMetaData metaData)
Add a theme. |
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 |
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. |
Method Detail |
public void addTheme(ThemeRegistrationMetaData metaData) throws ThemeException
metaData
- the meta data about the theme
ThemeException
public void setDefault(ServerRegistrationID themeID) throws ThemeException
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 removeTheme(ServerRegistrationID themeID) throws ThemeException
themeID
- the registration id of the theme to be removed
ThemeException
- if the theme with this id is not available in the list of currently registered themespublic void removeThemes(java.lang.String applicationName) throws ThemeException
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.
applicationName
- the name of the application that hosts the themes to unregister
ThemeException
- if there are no themes registered with this application, or if an error occurs during the removepublic PortalTheme getTheme(ServerRegistrationID themeID, boolean defaultOnNull)
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 true
java.lang.IllegalArgumentException
- if the themeID is nullpublic PortalTheme getTheme(java.lang.String name, boolean defaultOnNull)
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 true
java.lang.IllegalArgumentException
- if the themeID is nullpublic java.util.Collection getThemes()
public java.util.Collection getThemeNames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |