Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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: 8784 $`
Author:
  Martin Holzner., Roy Russo

Method Summary
`void` | `addTheme(RuntimeContext runtimeContext, PortalThemeMetaData metaData)` Add a theme.
`PortalTheme` | `getDefaultTheme()`
`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, getThemeById, getThemeNames, getThemes`

Method Detail

### addTheme

    void addTheme(RuntimeContext runtimeContext,
                  PortalThemeMetaData metaData)
                  throws ThemeException

  Add a theme.

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

### setDefault

    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

### getDefaultTheme

    PortalTheme getDefaultTheme()

### removeTheme

    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

    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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD