org.xwiki.portlet.view
Class JavaScriptStreamFilter

java.lang.Object
  extended by org.xwiki.portlet.view.JavaScriptStreamFilter
All Implemented Interfaces:
StreamFilter

public class JavaScriptStreamFilter
extends Object
implements StreamFilter

Synchronizes the JavaScript code with the rewritten HTML code. Precisely, updates all occurrences of element identifiers after they have been modified to ensure their uniqueness.

Version:
$Id: 446104142253cf50142e19e690a5f62e079a8479 $

Constructor Summary
JavaScriptStreamFilter(String namespace)
          Creates a new JavaScript stream filter that updates all occurrences or element identifiers inside the JavaScript code.
 
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

JavaScriptStreamFilter

public JavaScriptStreamFilter(String namespace)
Creates a new JavaScript stream filter that updates all occurrences or element identifiers inside the JavaScript code.

Parameters:
namespace - the string that was used to name-space all element identifiers
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.