fr.paris.lutece.portal.service.spring
Class SpringContextService

java.lang.Object
  extended by fr.paris.lutece.portal.service.spring.SpringContextService

public class SpringContextService
extends java.lang.Object

This class provides a way to use Spring Framework ligthweight containers offering IoC (Inversion of Control) features.

See Also:
http://www.springframework.org

Method Summary
static java.lang.Object getBean(java.lang.String strName)
          Return an instance, which may be shared or independent, of the given bean name.
static java.lang.Object getPluginBean(java.lang.String strPluginName, java.lang.String strName)
          Return an instance of the given bean name loaded by the a Spring BeanFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBean

public static java.lang.Object getBean(java.lang.String strName)
Return an instance, which may be shared or independent, of the given bean name. This method allows a Spring BeanFactory to be used as a replacement for the Singleton or Prototype design pattern.
The bean is retreived from the main context defined in the WEB-INF/conf/core_context.xml.

Parameters:
strName - The bean's name
Returns:
The instance of the bean

getPluginBean

public static java.lang.Object getPluginBean(java.lang.String strPluginName,
                                             java.lang.String strName)
Return an instance of the given bean name loaded by the a Spring BeanFactory. The bean is retreived from a plugin context defined in the WEB-INF/conf/plugins/[plugin_name]_context.xml.

Parameters:
strPluginName - The Plugin's name
strName - The bean's name
Returns:
The instance of the bean


Copyright © 2007 Mairie de Paris. All Rights Reserved.