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

RendererFactory - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.theme.impl.render
Class RendererFactory

java.lang.Object
  extended byorg.jboss.portal.theme.impl.render.RendererFactory

public class RendererFactory
extends java.lang.Object

Factory to instantiate implementations of the render set and layout strategy.


Method Summary
static AbstractLayoutStrategy getLayoutStrategy(java.lang.ClassLoader loader, org.apache.xpath.CachedXPathAPI xpath, org.w3c.dom.Node strategyNode)
          Get the defined layout strategy from the provided layout node
static RenderContext getRenderContext(PortalRenderSet renderSet, MediaType contentType, RegionOrientation orientation, java.lang.String regionID, java.util.Map pageProperties, java.util.List regionNames, javax.servlet.http.HttpServletRequest request)
          Get a new instance of a render context, based on the provided values.
static PortalRenderSet getRenderSet(java.lang.String appID, java.lang.String name, java.lang.ClassLoader loader, org.apache.xpath.CachedXPathAPI xpath, org.w3c.dom.Node renderSet)
          Get a portal render set based on the provided information in the renderSet node, and its sub elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLayoutStrategy

public static AbstractLayoutStrategy getLayoutStrategy(java.lang.ClassLoader loader,
                                                       org.apache.xpath.CachedXPathAPI xpath,
                                                       org.w3c.dom.Node strategyNode)
                                                throws javax.xml.transform.TransformerException,
                                                       java.lang.ClassNotFoundException,
                                                       javax.activation.MimeTypeParseException,
                                                       java.lang.IllegalAccessException,
                                                       java.lang.InstantiationException
Get the defined layout strategy from the provided layout node

Parameters:
loader - the classloader of the portal web application that contains the descriptor to which the provided strategyNode belongs
xpath - a CachedXPathAPI instance to use to xpath to the needed sub elements of the strategyNode
strategyNode - the Node in the layout descriptor that represents the strategy
Returns:
an implementation of the LayoutStrategy interface, populated with the values provided in strategyNode, and sub elements
Throws:
javax.xml.transform.TransformerException
java.lang.ClassNotFoundException
javax.activation.MimeTypeParseException
java.lang.IllegalAccessException
java.lang.InstantiationException
See Also:
LayoutStrategy

getRenderSet

public static PortalRenderSet getRenderSet(java.lang.String appID,
                                           java.lang.String name,
                                           java.lang.ClassLoader loader,
                                           org.apache.xpath.CachedXPathAPI xpath,
                                           org.w3c.dom.Node renderSet)
                                    throws javax.xml.transform.TransformerException,
                                           javax.activation.MimeTypeParseException,
                                           java.lang.IllegalAccessException,
                                           java.lang.InstantiationException,
                                           java.lang.ClassNotFoundException
Get a portal render set based on the provided information in the renderSet node, and its sub elements.

A render set consists of implementations for the 4 renderer interfaces (Regionrenderer, WindowRenderer, PortletRenderer, DecorationRenderer). A render set is defined either as part of a layout descriptor (see portal-layouts.xml), or in case of the default renderer set,in WEB-INF/portal-renderSet.xml.

Parameters:
xpath - a CachedXPathAPI instance to provide xpath capability to this method
renderSet - the 'set' Node of the xml definition of the render set
Returns:
a PortalRenderSet containing the the 4 renderer implementations
Throws:
javax.xml.transform.TransformerException - if parsing the set node for the implementation classes fails due to xpath problems
java.lang.ClassNotFoundException
javax.activation.MimeTypeParseException
java.lang.IllegalAccessException
java.lang.InstantiationException
See Also:
PortalRenderSet

getRenderContext

public static RenderContext getRenderContext(PortalRenderSet renderSet,
                                             MediaType contentType,
                                             RegionOrientation orientation,
                                             java.lang.String regionID,
                                             java.util.Map pageProperties,
                                             java.util.List regionNames,
                                             javax.servlet.http.HttpServletRequest request)
Get a new instance of a render context, based on the provided values.

The render context is needed for a render set to produce its markup. The render set is used by the region tag in a layout jsp.

Parameters:
renderSet - the render set to use for this request and tag
contentType - the content/media/mime type of the current request
orientation - the orientation of the region render tag
regionID - the id attribute value to use for the rendered tag
pageProperties - the defined page properties from the portal descriptor
regionNames -
request - the current Servlet request that is being serviced
Returns:
a new instance of a render context
See Also:
RenderContext, PortalRenderSet, MediaType, RegionOrientation