org.xwiki.portlet.view
Class HTMLStreamFilter

java.lang.Object
  extended by 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
 

Constructor Detail

HTMLStreamFilter

public HTMLStreamFilter(URLRewriter urlRewriter,
                        String portletNamespace,
                        boolean wrapOutput)
Creates a new HTML stream filter which executes the following transformations: .

Parameters:
urlRewriter - the object used to rewrite servlet URLs into portlet URLs
portletNamespace - the string used to name-space HTML element identifiers in the context of the portal page
wrapOutput - true to wrap the output in a container that has the namespace identifier, false otherwise
Method Detail

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 filtered
writer - the resulting character stream


Copyright © 2004-2013 XWiki. All Rights Reserved.