|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.millstone.webadapter.DirectoryThemeSource
Theme source for reading themes from a directory on the Filesystem.
Nested Class Summary |
Nested classes inherited from class org.millstone.webadapter.ThemeSource |
ThemeSource.ThemeException |
Constructor Summary | |
DirectoryThemeSource(java.io.File path,
WebAdapterServlet webAdapterServlet)
Creates a new instance of ThemeRepository by reading the themes from a local directory. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DirectoryThemeSource(java.io.File path, WebAdapterServlet webAdapterServlet) throws ThemeSource.ThemeException, java.io.FileNotFoundException, java.io.IOException
path
- Path to the source directory .
java.io.FileNotFoundException
- if no theme files are found
ThemeSource.ThemeException
java.io.IOException
Method Detail |
public java.util.Collection getXSLStreams(Theme theme, WebBrowser type) throws ThemeSource.ThemeException
ThemeSource
type
parameter is used to limit
the templates, which are returned based on the theme fileset
requirements.
getXSLStreams
in interface ThemeSource
theme
- Theme, which XSL should be returnedtype
- The type of the current client.
ThemeSource.ThemeException
ThemeSource.getXSLStreams(Theme, WebBrowser)
public long getModificationTime()
ThemeSource
getModificationTime
in interface ThemeSource
ThemeSource.getModificationTime()
public java.io.InputStream getResource(java.lang.String resourceId) throws ThemeSource.ThemeException
ThemeSource
getResource
in interface ThemeSource
ThemeSource.ThemeException
- If the resource is not found or there was
some problem finding the resource.ThemeSource.getResource(String)
public java.util.Collection getThemes()
ThemeSource
getThemes
in interface ThemeSource
ThemeSource.getThemes()
public java.lang.String getName()
ThemeSource
getName
in interface ThemeSource
ThemeSource.getName()
public Theme getThemeByName(java.lang.String name)
ThemeSource
getThemeByName
in interface ThemeSource
name
- Theme name.
ThemeSource.getThemeByName(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |