站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.4 API 英文版文档

PortalTheme - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.theme
Class PortalTheme

java.lang.Object
  extended byorg.jboss.portal.theme.PortalTheme
Direct Known Subclasses:
WARTheme

public abstract class PortalTheme
extends java.lang.Object

A portal theme is a collection of tags that will be injected into a layout to govern the look and feel of a portal page.

Themes are links to css, javascript and image/resource files. A theme's css needs to cooperate with the markup in the portal layout, the markup produced by the portlets, and the markup produced by the render set.

Any theme that the portal will pick up needs to be defined in a theme descriptor. The theme desciptor is an xml file in WEB-INF/ with the file name *-themes.xml

See Also:
Renderer, PortalLayout

Constructor Summary
PortalTheme()
           
 
Method Summary
abstract  ThemeResult assembleResponse(ServerRequest request, ServerResponse response)
          create the markup that this theme wants to inject into the page
abstract  void assembleResponse(java.io.Writer writer)
          create the markup that this theme wants to inject into the page, and write it to the provided writer
 void destroy()
          Destroy the theme.
 ThemeServiceInfo getServiceInfo()
           
 ThemeInfo getThemeInfo()
           
 void init(ThemeServiceInfo serviceInfo, ThemeInfo info)
          Initialize the theme with a reference to the theme service and the theme meta data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortalTheme

public PortalTheme()
Method Detail

assembleResponse

public abstract ThemeResult assembleResponse(ServerRequest request,
                                             ServerResponse response)
                                      throws java.io.IOException
create the markup that this theme wants to inject into the page

Parameters:
request - the current server request
response - the current server response
Returns:
a ThemeResult containing the markup to inject into the page
Throws:
java.io.IOException

assembleResponse

public abstract void assembleResponse(java.io.Writer writer)
                               throws java.io.IOException
create the markup that this theme wants to inject into the page, and write it to the provided writer

Parameters:
writer - the writer to write the theme markup to
Throws:
java.io.IOException

init

public void init(ThemeServiceInfo serviceInfo,
                 ThemeInfo info)
Initialize the theme with a reference to the theme service and the theme meta data

Parameters:
serviceInfo - a theme service reference
info - the meta data of the theme to render

destroy

public void destroy()
Destroy the theme. Here is your chance to clean up


getThemeInfo

public ThemeInfo getThemeInfo()
Returns:
the theme meta data

getServiceInfo

public ThemeServiceInfo getServiceInfo()
Returns:
the theme service info