com.go.teaservlet
Class AdminApplication.ContextImpl

java.lang.Object
  |
  +--com.go.tea.runtime.DefaultContext
        |
        +--com.go.teatools.TeaToolsUtils
              |
              +--com.go.teaservlet.AdminApplication.ContextImpl
All Implemented Interfaces:
AdminContext, Context, OutputReceiver, TeaToolsConstants, TeaToolsContext, UtilityContext
Enclosing class:
AdminApplication

public class AdminApplication.ContextImpl
extends TeaToolsUtils
implements AdminContext


Inner Class Summary
 class AdminApplication.ContextImpl.HandyClassInfoImpl
           
 
Inner classes inherited from class com.go.teaservlet.TeaToolsContext
TeaToolsContext.HandyClassInfo
 
Field Summary
protected  ApplicationRequest mRequest
           
protected  ApplicationResponse mResponse
           
 
Fields inherited from interface com.go.teatools.TeaToolsConstants
BEGIN_CODE_TAG, DEFAULT_CONTEXT_CLASS, EMPTY_CLASS_ARRAY, EMPTY_OBJECT_ARRAY, END_CODE_TAG, IMPLICIT_TEA_IMPORTS, TEA_FILE_EXTENSION
 
Constructor Summary
protected AdminApplication.ContextImpl(ApplicationRequest request, ApplicationResponse response)
           
 
Method Summary
 void dynamicTemplateCall(java.lang.String templateName)
          allows a template to dynamically call another template
 void dynamicTemplateCall(java.lang.String templateName, java.lang.Object[] params)
          allows a template to dynamically call another template this time with parameters.
 java.lang.Class getClassForName(java.lang.String classname)
          Returns a Class object for a given name.
 TeaToolsContext.HandyClassInfo getHandyClassInfo(java.lang.Class clazz)
          Returns a bean full of handy information about the specified class.
 TeaToolsContext.HandyClassInfo getHandyClassInfo(java.lang.String fullClassName)
          Returns a bean full of handy information about the specified class.
 java.lang.String getObjectIdentifier(java.lang.Object obj)
          Returns a String that uniquely identifies the given Object.
 TeaServletAdmin getTeaServletAdmin()
          Gets the admin information for the TeaServlet.
 java.lang.Object obtainContextByName(java.lang.String appName)
          returns a context for the specified application instance by name.
 void streamClassBytes(java.lang.String className)
          Streams the structural bytes of the named class via the HttpResponse.
 
Methods inherited from class com.go.teatools.TeaToolsUtils
acceptsSubstitution, acceptsSubstitution, compareFileExtension, convertArrayClassName, createContextClass, createContextClass, createMethodDescriptions, createParameterDescriptions, createPatternString, createPropertyDescriptions, createTypeDescription, createWhitespaceString, decapitalize, getAccessFlags, getArrayClassName, getArrayDimensions, getArrayDimensionsString, getArrayType, getAttributeValue, getBeanInfo, getBeanInfo, getClassForName, getClassName, getClassName, getClassPackage, getClassPackage, getClassTypeName, getDescription, getDescriptionFirstSentence, getFirstSentence, getFullClassName, getFullClassName, getInnerClassName, getPackageVersion, getTeaBeanPropertyDescriptors, getTeaContextMethodDescriptors, getTeaContextMethodDescriptors, getTeaContextMethodDescriptors, getTeaFullClassName, isForeachCompatible, isIfCompatible, isImplicitTeaImport, isImplicitTeaImport, isLikelyContextClass, isTeaFileName, loadContextClasses, main, parseClassName, print, removeFileExtension, sortDescriptors, sortMethodDescriptors, sortPropertyDescriptors
 
Methods inherited from class com.go.tea.runtime.DefaultContext
cardinal, cardinal, currentDate, dateFormat, dateFormat, endsWith, find, find, findFirst, findFirst, findLast, findLast, getAvailableLocales, getAvailableTimeZones, getDateFormat, getDateFormatTimeZone, getLocale, getNullFormat, getNumberFormat, getNumberFormatInfinity, getNumberFormatNaN, nullFormat, numberFormat, numberFormat, ordinal, ordinal, print, print, print, print, print, print, replace, replace, replace, replaceFirst, replaceFirst, replaceLast, replaceLast, setLocale, setLocale, setLocale, shortOrdinal, shortOrdinal, startsWith, substring, substring, toLowerCase, toString, toString, toString, toString, toString, toString, toString, toString, toUpperCase, trim, trimLeading, trimTrailing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.go.teaservlet.TeaToolsContext
createPatternString, createWhitespaceString, getFirstSentence
 

Field Detail

mRequest

protected ApplicationRequest mRequest

mResponse

protected ApplicationResponse mResponse
Constructor Detail

AdminApplication.ContextImpl

protected AdminApplication.ContextImpl(ApplicationRequest request,
                                       ApplicationResponse response)
Method Detail

getTeaServletAdmin

public TeaServletAdmin getTeaServletAdmin()
                                   throws javax.servlet.ServletException
Description copied from interface: AdminContext
Gets the admin information for the TeaServlet. The user also can reload the application or reload templates.

This function processes the following HTTP request parameters:

Specified by:
getTeaServletAdmin in interface AdminContext
Following copied from interface: com.go.teaservlet.AdminContext
Returns:
the admin information

getObjectIdentifier

public java.lang.String getObjectIdentifier(java.lang.Object obj)
Description copied from interface: AdminContext
Returns a String that uniquely identifies the given Object.
Specified by:
getObjectIdentifier in interface AdminContext

getClassForName

public java.lang.Class getClassForName(java.lang.String classname)
Description copied from interface: AdminContext
Returns a Class object for a given name. it basically lets templates perform Class.forName(classname);
Specified by:
getClassForName in interface AdminContext
Overrides:
getClassForName in class TeaToolsUtils
Following copied from class: com.go.teatools.TeaToolsUtils
Parameters:
className - the name of the Class

streamClassBytes

public void streamClassBytes(java.lang.String className)
                      throws AbortTemplateException
Streams the structural bytes of the named class via the HttpResponse.
Specified by:
streamClassBytes in interface AdminContext

dynamicTemplateCall

public void dynamicTemplateCall(java.lang.String templateName)
                         throws java.lang.Exception
allows a template to dynamically call another template
Specified by:
dynamicTemplateCall in interface AdminContext

dynamicTemplateCall

public void dynamicTemplateCall(java.lang.String templateName,
                                java.lang.Object[] params)
                         throws java.lang.Exception
allows a template to dynamically call another template this time with parameters.
Specified by:
dynamicTemplateCall in interface AdminContext

obtainContextByName

public java.lang.Object obtainContextByName(java.lang.String appName)
                                     throws javax.servlet.ServletException
Description copied from interface: AdminContext
returns a context for the specified application instance by name. this is useful when dynamically calling a function in that context.
Specified by:
obtainContextByName in interface AdminContext

getHandyClassInfo

public TeaToolsContext.HandyClassInfo getHandyClassInfo(java.lang.String fullClassName)
Description copied from interface: TeaToolsContext
Returns a bean full of handy information about the specified class.
Specified by:
getHandyClassInfo in interface TeaToolsContext

getHandyClassInfo

public TeaToolsContext.HandyClassInfo getHandyClassInfo(java.lang.Class clazz)
Description copied from interface: TeaToolsContext
Returns a bean full of handy information about the specified class.
Specified by:
getHandyClassInfo in interface TeaToolsContext