org.apache.wicket.spring
Class SpringWebApplication

java.lang.Object
  extended by org.apache.wicket.Application
      extended by org.apache.wicket.protocol.http.WebApplication
          extended by org.apache.wicket.spring.SpringWebApplication
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware

public abstract class SpringWebApplication
extends org.apache.wicket.protocol.http.WebApplication
implements org.springframework.context.ApplicationContextAware

Base class for spring aware wicket web application object. This class has helper methods to create lazy init proxies based on spring beans, as well as an implementation of ISpringContextLocator.

Author:
Igor Vaynberg (ivaynberg)

Field Summary
 
Fields inherited from class org.apache.wicket.Application
CONFIGURATION, CONTEXTPATH, DEPLOYMENT, DEVELOPMENT
 
Constructor Summary
SpringWebApplication()
          Construct.
 
Method Summary
protected  java.lang.Object createSpringBeanProxy(java.lang.Class clazz)
          Creates a proxy for a spring bean that is safe to put into session and serialize
protected  java.lang.Object createSpringBeanProxy(java.lang.Class clazz, java.lang.String beanName)
          Creates a proxy for a spring bean that is safe to put into session and serialize
 ISpringContextLocator getSpringContextLocator()
          Retrieves the spring application context locator object
protected  org.springframework.context.ApplicationContext internalGetApplicationContext()
          Retrieves the spring application context associated with this application object This method is protected and named internalGetApplicationContext so that the subclass can choose whether or not to add a public getApplicationContext() method
protected  void internalInit()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 
Methods inherited from class org.apache.wicket.protocol.http.WebApplication
getApplicationKey, getConfigurationType, getDefaultRequestCycleFactory, getInitParameter, getRequestCycleProcessor, getResourceFinder, getServletContext, getSessionAttributePrefix, getWicketFilter, init, internalDestroy, logEventTarget, logResponseTarget, mount, mount, mountBookmarkablePage, mountBookmarkablePage, mountSharedResource, newRequestCycle, newRequestCycleProcessor, newSession, newSession, newSession, newSessionStore, newWebRequest, newWebResponse, outputDevelopmentModeWarning, sessionDestroyed, setApplicationKey, setWicketFilter, unmount
 
Methods inherited from class org.apache.wicket.Application
addComponentInstantiationListener, addComponentOnAfterRenderListener, addComponentOnBeforeRenderListener, addRenderHeadListener, configure, destroy, exists, get, get, getApplicationKeys, getApplicationSettings, getConverterLocator, getDebugSettings, getExceptionSettings, getFrameworkSettings, getHomePage, getMarkupCache, getMarkupSettings, getMetaData, getName, getPageSettings, getRequestCycleFactory, getRequestCycleSettings, getRequestLogger, getRequestLoggerSettings, getResourceSettings, getSecuritySettings, getSessionFactory, getSessionSettings, getSessionStore, getSharedResources, initializeComponents, newConverterLocator, newRequestCycle, newRequestLogger, notifyRenderHeadListener, onDestroy, removeComponentInstantiationListener, removeComponentOnAfterRenderListener, removeComponentOnBeforeRenderListener, removeRenderHeadListener, set, setMetaData, unset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringWebApplication

public SpringWebApplication()
Construct.

Method Detail

internalInit

protected void internalInit()
Overrides:
internalInit in class org.apache.wicket.protocol.http.WebApplication
See Also:
Application.internalInit()

setApplicationContext

public final void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                                 throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException
See Also:
ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)

internalGetApplicationContext

protected final org.springframework.context.ApplicationContext internalGetApplicationContext()
Retrieves the spring application context associated with this application object This method is protected and named internalGetApplicationContext so that the subclass can choose whether or not to add a public getApplicationContext() method

Returns:
spring application context

getSpringContextLocator

public ISpringContextLocator getSpringContextLocator()
Retrieves the spring application context locator object

Returns:
spring application context locator object

createSpringBeanProxy

protected java.lang.Object createSpringBeanProxy(java.lang.Class clazz,
                                                 java.lang.String beanName)
Creates a proxy for a spring bean that is safe to put into session and serialize

Parameters:
clazz - class of spring bean
beanName - name of spring bean
Returns:
proxy representing the spring bean

createSpringBeanProxy

protected java.lang.Object createSpringBeanProxy(java.lang.Class clazz)
Creates a proxy for a spring bean that is safe to put into session and serialize

Parameters:
clazz - class of spring bean
Returns:
proxy representing the spring bean


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.