org.millstone.webadapter
Interface ThemeSource

All Known Implementing Classes:
CollectionThemeSource, DirectoryThemeSource, JarThemeSource, ServletThemeSource

public interface ThemeSource

Interface implemented by theme sources.

Since:
3.0
Version:
3.0.3
Author:
IT Mill Ltd.

Nested Class Summary
static class ThemeSource.ThemeException
          Theme exception.
 
Method Summary
 long getModificationTime()
          Get the last modification time, used to reload theme on changes.
 java.lang.String getName()
          Get the name of the ThemeSource.
 java.io.InputStream getResource(java.lang.String resourceId)
          Get input stream for the resource with the specified resource id.
 Theme getThemeByName(java.lang.String name)
          Return Theme instance by name.
 java.util.Collection getThemes()
          Get list of themes in the theme source.
 java.util.Collection getXSLStreams(Theme theme, WebBrowser type)
          Get XSL stream for the specified theme and web-browser type.
 

Method Detail

getName

public java.lang.String getName()
Get the name of the ThemeSource.

Returns:
Name of the theme source.

getXSLStreams

public java.util.Collection getXSLStreams(Theme theme,
                                          WebBrowser type)
                                   throws ThemeSource.ThemeException
Get XSL stream for the specified theme and web-browser type. Returns the XSL templates, which are used to process the UIDL data. The type parameter is used to limit the templates, which are returned based on the theme fileset requirements.

Parameters:
theme - Theme, which XSL should be returned
type - The type of the current client.
Returns:
Colection containing the XSL streams.
ThemeSource.ThemeException
See Also:
Theme

getModificationTime

public long getModificationTime()
Get the last modification time, used to reload theme on changes.

Returns:
Last modification time of the theme source.

getResource

public java.io.InputStream getResource(java.lang.String resourceId)
                                throws ThemeSource.ThemeException
Get input stream for the resource with the specified resource id.

Returns:
Stream where the resource can be read.
Throws:
ThemeSource.ThemeException - If the resource is not found or there was some problem finding the resource.

getThemes

public java.util.Collection getThemes()
Get list of themes in the theme source.

Returns:
List of themes included in the theme source.

getThemeByName

public Theme getThemeByName(java.lang.String name)
Return Theme instance by name.

Parameters:
name - Theme name.
Returns:
Theme instance matching the name, or null if not found.


Copyright © 2000,2001,2002 IT Mill Ltd. All Rights Reserved.