org.apache.tapestry5.internal.spring
Class SpringModuleDef

java.lang.Object
  extended by org.apache.tapestry5.internal.spring.SpringModuleDef
All Implemented Interfaces:
ModuleDef

public class SpringModuleDef
extends java.lang.Object
implements ModuleDef

A wrapper that converts a Spring ApplicationContext into a set of service definitions, compatible with Tapestry 5 IoC, for the beans defined in the context, as well as the context itself.


Constructor Summary
SpringModuleDef(javax.servlet.ServletContext servletContext)
           
 
Method Summary
 java.lang.Class getBuilderClass()
           
 java.util.Set<ContributionDef> getContributionDefs()
          Returns a contribution, "SpringBean", to the MasterObjectProvider service.
 java.util.Set<DecoratorDef> getDecoratorDefs()
          Returns an empty set.
 java.lang.String getLoggerName()
           
 ServiceDef getServiceDef(java.lang.String serviceId)
           
 java.util.Set<java.lang.String> getServiceIds()
           
protected  org.springframework.context.ApplicationContext locateApplicationContext(javax.servlet.ServletContext servletContext)
          Invoked to obtain the Spring ApplicationContext, presumably stored in the ServletContext.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringModuleDef

public SpringModuleDef(javax.servlet.ServletContext servletContext)
Method Detail

locateApplicationContext

protected org.springframework.context.ApplicationContext locateApplicationContext(javax.servlet.ServletContext servletContext)
Invoked to obtain the Spring ApplicationContext, presumably stored in the ServletContext. This method is only used in Tapestry 5.0 compatibility mode (in Tapestry 5.1 and above, the default is for Tapestry to create the ApplicationContext).

Parameters:
servletContext - used to locate the ApplicationContext
Returns:
the ApplicationContext itself
Throws:
java.lang.RuntimeException - if the ApplicationContext could not be located or is otherwise invalid
Since:
5.2.0

getBuilderClass

public java.lang.Class getBuilderClass()
Specified by:
getBuilderClass in interface ModuleDef

getContributionDefs

public java.util.Set<ContributionDef> getContributionDefs()
Returns a contribution, "SpringBean", to the MasterObjectProvider service. It is ordered after the built-in contributions.

Specified by:
getContributionDefs in interface ModuleDef

getDecoratorDefs

public java.util.Set<DecoratorDef> getDecoratorDefs()
Returns an empty set.

Specified by:
getDecoratorDefs in interface ModuleDef

getLoggerName

public java.lang.String getLoggerName()
Specified by:
getLoggerName in interface ModuleDef

getServiceDef

public ServiceDef getServiceDef(java.lang.String serviceId)
Specified by:
getServiceDef in interface ModuleDef

getServiceIds

public java.util.Set<java.lang.String> getServiceIds()
Specified by:
getServiceIds in interface ModuleDef


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.