org.apache.jetspeed.util.rewriter
Class SampleRewriter

java.lang.Object
  extended byorg.apache.jetspeed.util.rewriter.HTMLRewriter
      extended byorg.apache.jetspeed.util.rewriter.SampleRewriter
All Implemented Interfaces:
Rewriter

public class SampleRewriter
extends HTMLRewriter

Sample of extending HTML Rewriter for your specific needs

Version:
$Id: SampleRewriter.java,v 1.5 2004/02/23 03:18:59 jford Exp $
Author:
David Sean Taylor

Field Summary
 
Fields inherited from class org.apache.jetspeed.util.rewriter.HTMLRewriter
baseURL
 
Constructor Summary
SampleRewriter(java.lang.String basePortalURL, java.lang.String fullPortalURL, java.lang.String sampleURL)
           
 
Method Summary
 void convertTagEvent(javax.swing.text.html.HTML.Tag tag, javax.swing.text.MutableAttributeSet attrs)
           
 boolean enterSimpleTagEvent(javax.swing.text.html.HTML.Tag tag, javax.swing.text.MutableAttributeSet attrs)
           
 java.lang.String exitStartTagEvent(javax.swing.text.html.HTML.Tag tag, javax.swing.text.MutableAttributeSet attrs)
           
 java.lang.String generateNewUrl(java.lang.String targetURL, javax.swing.text.html.HTML.Tag tag, javax.swing.text.html.HTML.Attribute attribute)
           
 java.lang.String getFormID()
           
 boolean getSampleEndFlag()
           
 java.lang.String getSessionID()
           
 boolean proxyAllTags()
           
 java.lang.String rewrite(java.io.Reader input, java.lang.String baseURL)
           
 
Methods inherited from class org.apache.jetspeed.util.rewriter.HTMLRewriter
enterEndTagEvent, enterStartTagEvent, enterText, exitEndTagEvent, exitSimpleTagEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleRewriter

public SampleRewriter(java.lang.String basePortalURL,
                      java.lang.String fullPortalURL,
                      java.lang.String sampleURL)
Method Detail

getSessionID

public java.lang.String getSessionID()

getFormID

public java.lang.String getFormID()

getSampleEndFlag

public boolean getSampleEndFlag()

rewrite

public java.lang.String rewrite(java.io.Reader input,
                                java.lang.String baseURL)
                         throws java.net.MalformedURLException
Specified by:
rewrite in interface Rewriter
Overrides:
rewrite in class HTMLRewriter
Throws:
java.net.MalformedURLException

generateNewUrl

public java.lang.String generateNewUrl(java.lang.String targetURL,
                                       javax.swing.text.html.HTML.Tag tag,
                                       javax.swing.text.html.HTML.Attribute attribute)
Specified by:
generateNewUrl in interface Rewriter
Overrides:
generateNewUrl in class HTMLRewriter

proxyAllTags

public boolean proxyAllTags()
Specified by:
proxyAllTags in interface Rewriter
Overrides:
proxyAllTags in class HTMLRewriter

exitStartTagEvent

public java.lang.String exitStartTagEvent(javax.swing.text.html.HTML.Tag tag,
                                          javax.swing.text.MutableAttributeSet attrs)
Specified by:
exitStartTagEvent in interface Rewriter
Overrides:
exitStartTagEvent in class HTMLRewriter

enterSimpleTagEvent

public boolean enterSimpleTagEvent(javax.swing.text.html.HTML.Tag tag,
                                   javax.swing.text.MutableAttributeSet attrs)
Specified by:
enterSimpleTagEvent in interface Rewriter
Overrides:
enterSimpleTagEvent in class HTMLRewriter

convertTagEvent

public void convertTagEvent(javax.swing.text.html.HTML.Tag tag,
                            javax.swing.text.MutableAttributeSet attrs)
Specified by:
convertTagEvent in interface Rewriter
Overrides:
convertTagEvent in class HTMLRewriter


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.