jrun.jsp
Class Translator

java.lang.Object
  |
  +--jrun.jsp.Translator
Direct Known Subclasses:
JSPTranslator, JSTTranslator

public abstract class Translator
extends java.lang.Object

A translator is parses a resource containing JSP syntax into XML, translates the XML with a stylesheet and compiles the output. It also handles all dependency checking. Currently we support two types of output generation, servlets and tag handlers. Subclasses need to implement the following methods:

See Also:

Field Summary
protected  javax.servlet.ServletContext application
           
protected  JSPEngine jspEngine
           
 
Constructor Summary
protected Translator(javax.servlet.ServletContext application, JSPEngine jspEngine)
          JSPServlet and and JRunTagLibrary use this class, they tell us what JavaCompiler and XT processor to use
 
Method Summary
protected  void checkServletPath(java.lang.String spath)
           
protected  void compilePage(TranslationContext tc)
           
protected  TranslationContext createTranslationContext(javax.servlet.ServletContext application, java.lang.String pagePath, java.lang.String className)
           
protected  java.lang.String getClassName(java.lang.String pagePath)
          Subclasses Class name and can override it to further the mangling, they should call super to get the mangled name and add something to the end or beginning.
protected abstract  JSPCompiler getPageCompiler(TranslationContext tc)
           
protected  PageState getPageLock(java.lang.String pagePath)
          Subclasses use this to get a page-level lock
protected  boolean needsTranslating(PageState ps)
           
protected  void parsePage(TranslationContext tc)
           
 boolean translate(java.lang.String pagePath, boolean force)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

application

protected javax.servlet.ServletContext application

jspEngine

protected JSPEngine jspEngine
Constructor Detail

Translator

protected Translator(javax.servlet.ServletContext application,
                     JSPEngine jspEngine)
JSPServlet and and JRunTagLibrary use this class, they tell us what JavaCompiler and XT processor to use
Method Detail

translate

public final boolean translate(java.lang.String pagePath,
                               boolean force)
                        throws javax.servlet.ServletException,
                               java.io.IOException

getPageLock

protected final PageState getPageLock(java.lang.String pagePath)
                               throws java.io.IOException
Subclasses use this to get a page-level lock

getClassName

protected java.lang.String getClassName(java.lang.String pagePath)
Subclasses Class name and can override it to further the mangling, they should call super to get the mangled name and add something to the end or beginning.

parsePage

protected void parsePage(TranslationContext tc)
                  throws javax.servlet.ServletException,
                         java.io.IOException

compilePage

protected void compilePage(TranslationContext tc)
                    throws javax.servlet.ServletException,
                           java.io.IOException

createTranslationContext

protected TranslationContext createTranslationContext(javax.servlet.ServletContext application,
                                                      java.lang.String pagePath,
                                                      java.lang.String className)
                                               throws java.io.IOException

needsTranslating

protected boolean needsTranslating(PageState ps)
                            throws java.io.IOException,
                                   javax.servlet.ServletException

checkServletPath

protected void checkServletPath(java.lang.String spath)
                         throws javax.servlet.ServletException

getPageCompiler

protected abstract JSPCompiler getPageCompiler(TranslationContext tc)


Copyright � 2002 Macromedia Corporation. All Rights Reserved.