net.sf.click
クラス ClickApp

java.lang.Object
  上位を拡張 net.sf.click.ClickApp
すべての実装されたインタフェース:
org.xml.sax.EntityResolver

public class ClickApp
extends java.lang.Object
implements org.xml.sax.EntityResolver

Seasar2のHOT deployに対応するために改編されたClickAppクラス。

TODO WARM deploy、COOL deploy時の性能改善(フィールドリフレクションのキャッシュ)

作成者:
Malcolm Edgar, Naoki Takezoe

コンストラクタの概要
ClickApp()
           
 
メソッドの概要
 java.lang.String getCharset()
          Return the application character encoding.
 java.lang.Class getErrorPageClass()
          Return the error handling page Page Class.
 org.apache.commons.fileupload.FileItemFactory getFileItemFactory()
          Return the application FileItemFactory.
 net.sf.click.util.Format getFormat()
          Return a new format object.
 java.util.Locale getLocale()
          Return the application locale.
 net.sf.click.util.ClickLogger getLogger()
          Return the application logger.
 java.lang.String getModeValue()
          Return the application mode String value:   ["production", "profile", "development", "debug"].
 java.lang.Class getNotFoundPageClass()
          Return the page not found Page Class.
 java.lang.Class getPageClass(java.lang.String path)
          Return the page Class for the given path.
 java.lang.reflect.Field getPageField(java.lang.Class pageClass, java.lang.String fieldName)
          Return the public field of the given name for the pageClass, or null if not defined.
 java.lang.reflect.Field[] getPageFieldArray(java.lang.Class pageClass)
          Return an array public fields for the given page class.
 java.util.Map getPageFields(java.lang.Class pageClass)
          Return Map of public fields for the given page class.
 java.util.Map getPageHeaders(java.lang.String path)
          Return the headers of the page for the given path.
 java.lang.String getPagePath(java.lang.Class pageClass)
          Return the page path for the given page Class.
 javax.servlet.ServletContext getServletContext()
          Return the Click Application servlet context.
 org.apache.velocity.Template getTemplate(java.lang.String path)
          Return the Velocity Template for the give page path.
 org.apache.velocity.Template getTemplate(java.lang.String path, java.lang.String charset)
          Return the Velocity Template for the give page path.
 void init(net.sf.click.util.ClickLogger clickLogger)
          Initialize the click application.
 boolean isJspPage(java.lang.String path)
          Return true if JSP exists for the given ".htm" path.
 boolean isPagesAutoBinding()
          Return true if auto binding is enabled.
 boolean isProductionMode()
          Return true if the application is in PRODUCTION mode.
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          This method resolves the click.dtd for the XML parser using the classpath resource: /net/sf/click/click.dtd.
 void setServletContext(javax.servlet.ServletContext servletContext)
          Set the Click Application servlet context.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ClickApp

public ClickApp()
メソッドの詳細

getServletContext

public javax.servlet.ServletContext getServletContext()
Return the Click Application servlet context.

戻り値:
the application servlet context

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
Set the Click Application servlet context.

パラメータ:
servletContext - the application servlet context

init

public void init(net.sf.click.util.ClickLogger clickLogger)
          throws java.lang.Exception
Initialize the click application.

パラメータ:
clickLogger - the Click runtime logger instance
例外:
java.lang.Exception - if an error occurs initializing the application

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
                                      throws org.xml.sax.SAXException,
                                             java.io.IOException
This method resolves the click.dtd for the XML parser using the classpath resource: /net/sf/click/click.dtd.

定義:
インタフェース org.xml.sax.EntityResolver 内の resolveEntity
例外:
org.xml.sax.SAXException
java.io.IOException
関連項目:
EntityResolver.resolveEntity(String, String)

getCharset

public java.lang.String getCharset()
Return the application character encoding.

戻り値:
the application character encoding

getFileItemFactory

public org.apache.commons.fileupload.FileItemFactory getFileItemFactory()
Return the application FileItemFactory.

戻り値:
the application FileItemFactory

getFormat

public net.sf.click.util.Format getFormat()
Return a new format object.

戻り値:
a new format object

getLocale

public java.util.Locale getLocale()
Return the application locale.

戻り値:
the application locale

getLogger

public net.sf.click.util.ClickLogger getLogger()
Return the application logger.

戻り値:
the application logger.

isPagesAutoBinding

public boolean isPagesAutoBinding()
Return true if auto binding is enabled. Autobinding will automatically bind any request parameters to public fields, add any public controls to the page and add public fields to the page model.

戻り値:
true if request parameters should be automatically bound to public page fields

isProductionMode

public boolean isProductionMode()
Return true if the application is in PRODUCTION mode.

戻り値:
true if the application is in PRODUCTION mode

getModeValue

public java.lang.String getModeValue()
Return the application mode String value:   ["production", "profile", "development", "debug"].

戻り値:
the application mode String value

isJspPage

public boolean isJspPage(java.lang.String path)
Return true if JSP exists for the given ".htm" path.

パラメータ:
path - the Page ".htm" path
戻り値:
true if JSP exists for the given ".htm" path

getPageClass

public java.lang.Class getPageClass(java.lang.String path)
Return the page Class for the given path.

パラメータ:
path - the page path
戻り値:
the page class

getPagePath

public java.lang.String getPagePath(java.lang.Class pageClass)
Return the page path for the given page Class.

パラメータ:
pageClass - the page class
戻り値:
path the page path

getPageHeaders

public java.util.Map getPageHeaders(java.lang.String path)
Return the headers of the page for the given path.

パラメータ:
path - the path of the page
戻り値:
a Map of headers for the given page path

getNotFoundPageClass

public java.lang.Class getNotFoundPageClass()
Return the page not found Page Class.

戻り値:
the page not found Page Class

getErrorPageClass

public java.lang.Class getErrorPageClass()
Return the error handling page Page Class.

戻り値:
the error handling page Page Class

getTemplate

public org.apache.velocity.Template getTemplate(java.lang.String path)
                                         throws java.lang.Exception
Return the Velocity Template for the give page path.

パラメータ:
path - the Velocity template path
戻り値:
the Velocity Template for the give page path
例外:
java.lang.Exception - if Velocity error occurs

getTemplate

public org.apache.velocity.Template getTemplate(java.lang.String path,
                                                java.lang.String charset)
                                         throws java.lang.Exception
Return the Velocity Template for the give page path.

パラメータ:
path - the Velocity template path
charset - the template encoding charset
戻り値:
the Velocity Template for the give page path
例外:
java.lang.Exception - if Velocity error occurs

getPageField

public java.lang.reflect.Field getPageField(java.lang.Class pageClass,
                                            java.lang.String fieldName)
Return the public field of the given name for the pageClass, or null if not defined.

パラメータ:
pageClass - the page class
fieldName - the name of the field
戻り値:
the public field of the pageClass with the given name or null

getPageFieldArray

public java.lang.reflect.Field[] getPageFieldArray(java.lang.Class pageClass)
Return an array public fields for the given page class.

パラメータ:
pageClass - the page class
戻り値:
an array public fields for the given page class

getPageFields

public java.util.Map getPageFields(java.lang.Class pageClass)
Return Map of public fields for the given page class.

パラメータ:
pageClass - the page class
戻り値:
a Map of public fields for the given page class