Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.tripi.asp
Class AspContext  view AspContext download AspContext.java

java.lang.Object
  extended bycom.tripi.asp.AspContext

public class AspContext
extends java.lang.Object

This class implements a class to hold the current state of ASP execution.


Field Summary
private static org.apache.log4j.Category DBG
          Debugging information
(package private)  java.util.Hashtable globalScope
          Global scope
(package private)  java.util.Vector onPageEnd
          Vector of objects to call OnPageEnd to
(package private)  boolean optionExplicit
          Are we option explicit?
(package private)  java.util.Stack subroutineScope
          Subroutine scope
(package private)  java.util.Hashtable universalScope
          Universal scope
 
Constructor Summary
AspContext(java.util.Hashtable universalScope)
          Constructor.
 
Method Summary
 void addOnPageEnd(java.lang.Object obj)
          Adds a class to call the OnPageEnd when the page ends.
 void callOnPageEnd()
          Calls the OnPageEnd methods of the object.
(package private)  void callOnPageEnd(java.lang.Object obj)
          Calls the OnPageEnd method of a particular object.
(package private)  void callOnPageStart(java.lang.Object obj)
          Calls the OnPageStart method of a particular object.
protected  java.lang.Object clone()
          This function clones this context.
 void forceScope(IdentNode ident)
          This function forces an identifier's scope to the current context.
 Application getAspApplication()
          Utility function to obtain the Application object.
 Request getAspRequest()
          Utility function to obtain the Request object.
 Response getAspResponse()
          Utility function to obtain the Response object.
 Server getAspServer()
          Utility function to obtain the Server object.
 Session getAspSession()
          Utility function to obtain the Session object.
 java.net.URL getURL(java.lang.String filename)
          This function obtains the URL associated with the given filename.
 java.lang.Object getValue(IdentNode ident)
          This function obtains the value of a variable
 boolean inDirectScope(IdentNode ident)
          This function determines if a variable is directly in scope.
 boolean inScope(IdentNode ident)
          This function determines if a variable is in scope.
(package private)  java.util.Hashtable popSubroutineScope()
          Pops a subroutine scope off of the scope stack.
 void processException(java.lang.Exception ex, DebugContext ctx)
          This function handles error processing.
(package private)  void pushSubroutineScope(java.util.Hashtable scope)
          Pushes a new subroutine scope onto the scope stack.
(package private)  boolean resumeNext()
          This utility function checks if ResumeNext is in effect.
(package private)  void setOptionExplicit()
          Sets the option explicit flag.
 void setValue(IdentNode ident, java.lang.Object value)
          Set the value of an identifier.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DBG

private static final org.apache.log4j.Category DBG
Debugging information


universalScope

java.util.Hashtable universalScope
Universal scope


globalScope

java.util.Hashtable globalScope
Global scope


subroutineScope

java.util.Stack subroutineScope
Subroutine scope


onPageEnd

java.util.Vector onPageEnd
Vector of objects to call OnPageEnd to


optionExplicit

boolean optionExplicit
Are we option explicit?

Constructor Detail

AspContext

public AspContext(java.util.Hashtable universalScope)
Constructor.

Method Detail

clone

protected java.lang.Object clone()
This function clones this context.


inDirectScope

public boolean inDirectScope(IdentNode ident)
This function determines if a variable is directly in scope. This is slightly different from inScope, as the variable is not tested against the global scope if we are in a subroutine.


inScope

public boolean inScope(IdentNode ident)
This function determines if a variable is in scope.


forceScope

public void forceScope(IdentNode ident)
This function forces an identifier's scope to the current context.


getValue

public java.lang.Object getValue(IdentNode ident)
                          throws AspException
This function obtains the value of a variable


setValue

public void setValue(IdentNode ident,
                     java.lang.Object value)
              throws AspException
Set the value of an identifier.


setOptionExplicit

void setOptionExplicit()
                 throws AspException
Sets the option explicit flag.


pushSubroutineScope

void pushSubroutineScope(java.util.Hashtable scope)
                   throws AspException
Pushes a new subroutine scope onto the scope stack.


popSubroutineScope

java.util.Hashtable popSubroutineScope()
                                 throws AspException
Pops a subroutine scope off of the scope stack.


getAspServer

public Server getAspServer()
                    throws AspException
Utility function to obtain the Server object. XXX Should this be here, or in a separate class?


getAspSession

public Session getAspSession()
                      throws AspException
Utility function to obtain the Session object.


getAspApplication

public Application getAspApplication()
                              throws AspException
Utility function to obtain the Application object.


getAspRequest

public Request getAspRequest()
                      throws AspException
Utility function to obtain the Request object.


getAspResponse

public Response getAspResponse()
                        throws AspException
Utility function to obtain the Response object.


addOnPageEnd

public void addOnPageEnd(java.lang.Object obj)
Adds a class to call the OnPageEnd when the page ends.


callOnPageEnd

public void callOnPageEnd()
Calls the OnPageEnd methods of the object.


callOnPageEnd

void callOnPageEnd(java.lang.Object obj)
Calls the OnPageEnd method of a particular object.


callOnPageStart

void callOnPageStart(java.lang.Object obj)
Calls the OnPageStart method of a particular object.


resumeNext

boolean resumeNext()
             throws AspException
This utility function checks if ResumeNext is in effect.


processException

public void processException(java.lang.Exception ex,
                             DebugContext ctx)
                      throws AspException
This function handles error processing.


getURL

public java.net.URL getURL(java.lang.String filename)
                    throws AspException
This function obtains the URL associated with the given filename.