org.xwiki.portlet.view
Class HTMLStreamFilter
java.lang.Object
org.xwiki.portlet.view.HTMLStreamFilter
- All Implemented Interfaces:
- StreamFilter
public class HTMLStreamFilter
- extends Object
- implements StreamFilter
Rewrites a servlet HTML stream into a portlet HTML stream.
- Version:
- $Id: 202e76dbc789ceec7aed8d8a5b2607ec670a5508 $
|
Constructor Summary |
HTMLStreamFilter(URLRewriter urlRewriter,
String portletNamespace,
boolean wrapOutput)
Creates a new HTML stream filter which executes the following transformations:
converts relative servlet URLs prefixed with the given context path to portlet URLs created using the given
URL factory
name-space HTML element identifiers to prevent conflicts with other portlets and the portal page itself
rewrite in-line JavaScript code to use the name-spaced element identifiers
rewrite in-line CSS to prevent interference with other portlets and the portal page itself
. |
|
Method Summary |
void |
filter(Reader reader,
Writer writer)
Filters the given character stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HTMLStreamFilter
public HTMLStreamFilter(URLRewriter urlRewriter,
String portletNamespace,
boolean wrapOutput)
- Creates a new HTML stream filter which executes the following transformations:
- converts relative servlet URLs prefixed with the given context path to portlet URLs created using the given
URL factory
- name-space HTML element identifiers to prevent conflicts with other portlets and the portal page itself
- rewrite in-line JavaScript code to use the name-spaced element identifiers
- rewrite in-line CSS to prevent interference with other portlets and the portal page itself
.
- Parameters:
urlRewriter - the object used to rewrite servlet URLs into portlet URLsportletNamespace - the string used to name-space HTML element identifiers in the context of the portal pagewrapOutput - true to wrap the output in a container that has the namespace identifier,
false otherwise
filter
public void filter(Reader reader,
Writer writer)
- Description copied from interface:
StreamFilter
- Filters the given character stream.
- Specified by:
filter in interface StreamFilter
- Parameters:
reader - the character stream to be filteredwriter - the resulting character stream
Copyright © 2004-2013 XWiki. All Rights Reserved.