Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.

1 /*****************************************2 * *3 * JBoss Portal: The OpenSource Portal *4 * *5 * Distributable under LGPL license. *6 * See terms of license at gnu.org. *7 * *8 *****************************************/9 10 package org.jboss.portal.server.theme.render;11 12 importorg.jboss.portal.common.MediaType;13 importorg.jboss.portal.server.PortalRequest;14 importorg.jboss.portal.server.PortalResponse;15 importorg.jboss.portal.server.theme.RegionOrientation;16 importorg.w3c.dom.Document;17 18 importjavax.servlet.http.HttpServletRequest;19 20 /**21 * A render context allows all pieces that create markup a way to access relevant information for the current22 * request and render process.23 * <p>A render context is created for each portal request and render tag. It contains all the information needed to24 * generate the markup of one region tag for the portal response.</p>25 *26 * @author <a HREF="mailto:mholzner@novell.com>Martin Holzner</a>27 * @version $LastChangedRevision$, $LastChangedDate$28 */29 publicinterface RenderContext30 {31 /**32 * Get the StringBuffer that holds the markup to write back as response.33 * <p>This is ment to be a convenient way to accumulate the markup generated by the34 * individual processes involved in the rendering of the response. Each renderer in the render set35 * simply appends it's markup to this buffer.</p>36 *37 * @return the StringBuffer that contains the generated markup38 */39 StringBuffer getMarkupFragment();40 41 /**42 * Get the xml dom document that holds the markup to write bach as response (perhaps after its been xsl transformed)43 * This is for apps that rather build the result in XML (instead of a StringBuffer).44 *45 * @return the Document that represents the generated markup46 * @see #getMarkupFragment()47 */48 Document getMarkupFragmentAsDom();49 50 /**51 * Get the media type for this render process52 *53 * @return the media type for this render process54 */55 MediaType getContentType();56 57 /**58 * Get the region orientation for this render process59 *60 * @return the region orientation for this render process61 */62 RegionOrientation getRegionOrientation();63 64 /**65 * Get the servlet request that is currently being serviced66 *67 * @return68 */69 HttpServletRequest getHttpServletRequest();70 71 /**72 * Get the portal request that is currently being serviced73 *74 * @return the portal request that is currently being serviced75 */76 PortalRequest getPortalRequest();77 78 /**79 * Get the portal response for the current request80 *81 * @return the portal response for the current request82 */83 PortalResponse getPortalResponse();84 85 /**86 * Get the implementation of the region renderer to use in this context87 *88 * @return a region renderer to use for this context89 * @throws RenderException90 */91 RegionRenderer getRegionRenderer() throwsRenderException;92 93 /**94 * Get the implementation of the window renderer to use in this context95 *96 * @return a window renderer to use for this context97 * @throws RenderException98 */99 WindowRenderer getWindowRenderer() throwsRenderException;100 101 /**102 * Get the implemetation of the decoration renderer to use in this context103 *104 * @return a decoration renderer to use for this context105 * @throws RenderException106 */107 DecorationRenderer getDecorationRenderer() throwsRenderException;108 109 /**110 * Get the implementation of the portlet renderer to use for this context111 *112 * @return a portlet renderer to use for thsi context113 * @throws RenderException114 */115 PortletRenderer getPortletRenderer() throwsRenderException;116 }117