org.millstone.webadapter
Class CollectionThemeSource

java.lang.Object
  |
  +--org.millstone.webadapter.CollectionThemeSource
All Implemented Interfaces:
ThemeSource

public class CollectionThemeSource
extends java.lang.Object
implements ThemeSource

Theme source for consisting of collection of other theme sources. This class is used to implement the retrieval of themes from multiple sources. Also this class implements the inheritance of themes by first retrieving the relevant parent theme information.

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

Nested Class Summary
 
Nested classes inherited from class org.millstone.webadapter.ThemeSource
ThemeSource.ThemeException
 
Constructor Summary
CollectionThemeSource()
           
 
Method Summary
 void add(ThemeSource source)
          Add new theme source to this collection.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionThemeSource

public CollectionThemeSource()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: ThemeSource
Get the name of the ThemeSource.

Specified by:
getName in interface ThemeSource
Returns:
Name of the theme source.
See Also:
ThemeSource.getName()

getXSLStreams

public java.util.Collection getXSLStreams(Theme theme,
                                          WebBrowser type)
                                   throws ThemeSource.ThemeException
Description copied from interface: ThemeSource
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.

Specified by:
getXSLStreams in interface ThemeSource
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:
ThemeSource.getXSLStreams(Theme, WebBrowser)

getModificationTime

public long getModificationTime()
Description copied from interface: ThemeSource
Get the last modification time, used to reload theme on changes.

Specified by:
getModificationTime in interface ThemeSource
Returns:
Last modification time of the theme source.
See Also:
ThemeSource.getModificationTime()

getResource

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

Specified by:
getResource in interface ThemeSource
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.
See Also:
ThemeSource.getResource(String)

getThemes

public java.util.Collection getThemes()
Description copied from interface: ThemeSource
Get list of themes in the theme source.

Specified by:
getThemes in interface ThemeSource
Returns:
List of themes included in the theme source.
See Also:
ThemeSource.getThemes()

getThemeByName

public Theme getThemeByName(java.lang.String name)
Description copied from interface: ThemeSource
Return Theme instance by name.

Specified by:
getThemeByName in interface ThemeSource
Parameters:
name - Theme name.
Returns:
Theme instance matching the name, or null if not found.
See Also:
ThemeSource.getThemeByName(String)

add

public void add(ThemeSource source)
Add new theme source to this collection.

Parameters:
source - Theme source to be added.


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