org.trippi.server.http
Class Styler

java.lang.Object
  extended by org.trippi.server.http.Styler

public class Styler
extends java.lang.Object

Utility for performing server-side xsl transformations.

Author:
cwilper@cs.cornell.edu

Constructor Summary
Styler(java.lang.String indexStyle, java.lang.String formStyle, java.lang.String errorStyle)
          Construct a Styler to do transformations.
 
Method Summary
 void reload()
          Reload the stylesheets.
 void sendError(java.lang.String xml, java.io.PrintWriter out)
          Transform the given xml using the error stylesheet, outputting to out.
 void sendForm(java.lang.String xml, java.io.PrintWriter out)
          Transform the given xml using the form stylesheet, outputting to out.
 void sendIndex(java.lang.String xml, java.io.PrintWriter out)
          Transform the given xml using the index stylesheet, outputting to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Styler

public Styler(java.lang.String indexStyle,
              java.lang.String formStyle,
              java.lang.String errorStyle)
       throws java.lang.Exception
Construct a Styler to do transformations. Each parameter is optional (may be given as null), but the caller is responsible for not calling the corresponding send() method.

Throws:
java.lang.Exception
Method Detail

sendIndex

public void sendIndex(java.lang.String xml,
                      java.io.PrintWriter out)
               throws java.lang.Exception
Transform the given xml using the index stylesheet, outputting to out.

Throws:
java.lang.Exception

sendForm

public void sendForm(java.lang.String xml,
                     java.io.PrintWriter out)
              throws java.lang.Exception
Transform the given xml using the form stylesheet, outputting to out.

Throws:
java.lang.Exception

sendError

public void sendError(java.lang.String xml,
                      java.io.PrintWriter out)
               throws java.lang.Exception
Transform the given xml using the error stylesheet, outputting to out.

Throws:
java.lang.Exception

reload

public void reload()
            throws java.lang.Exception
Reload the stylesheets.

Throws:
java.lang.Exception