org.kuali.rice.core.resourceloader
Class SpringBeanFactoryResourceLoader

java.lang.Object
  extended by org.kuali.rice.core.lifecycle.BaseLifecycle
      extended by org.kuali.rice.core.resourceloader.ResourceLoaderContainer
          extended by org.kuali.rice.core.resourceloader.BaseResourceLoader
              extended by org.kuali.rice.core.resourceloader.SpringBeanFactoryResourceLoader
All Implemented Interfaces:
Lifecycle, ObjectLoader, ResourceLoader, ServiceLocator, org.springframework.beans.factory.BeanFactoryAware

public class SpringBeanFactoryResourceLoader
extends BaseResourceLoader
implements org.springframework.beans.factory.BeanFactoryAware

A ResourceLoader that is BeanFactoryAware and can be wired inside of Spring to provide resource loading capabilities to that Spring BeanFactory.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
private  org.springframework.beans.factory.BeanFactory beanFactory
           
 
Fields inherited from class org.kuali.rice.core.resourceloader.BaseResourceLoader
LOG
 
Fields inherited from interface org.kuali.rice.core.resourceloader.ResourceLoader
EMBEDDED_CLIENT_APP_RESOURCE_LOADER, EMBEDDED_PLUGIN, KSB_CONFIGURER_CONTAINER_NAME, PLUGIN_REGISTRY_LOADER_NAME, RMI_PLUGIN, ROOT_RESOURCE_LOADER_NAME, WEB_SERVICE_PLUGIN
 
Constructor Summary
SpringBeanFactoryResourceLoader()
           
SpringBeanFactoryResourceLoader(QName name)
           
 
Method Summary
protected  org.springframework.beans.factory.BeanFactory getBeanFactory()
           
 Object getService(QName serviceName)
          Fetches the service with the given name.
protected  String resolveServiceName(QName serviceName)
          Resolves the given QName service name to a String representation which is used to lookup the service in Spring.
 void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
           
 
Methods inherited from class org.kuali.rice.core.resourceloader.BaseResourceLoader
getClassLoader, getContents, getObject, getServiceLocator, isPostProcessContainer, postProcessObject, postProcessService, setClassLoader, setPostProcessContainer, start, stop, wrap
 
Methods inherited from class org.kuali.rice.core.resourceloader.ResourceLoaderContainer
addResourceLoader, addResourceLoaderFirst, containsResourceLoader, getName, getResourceLoader, getResourceLoaderNames, getResourceLoaders, removeAllResourceLoaders, removeResourceLoader, setName, toString
 
Methods inherited from class org.kuali.rice.core.lifecycle.BaseLifecycle
isStarted, setStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.core.resourceloader.ResourceLoader
addResourceLoader, addResourceLoaderFirst, getName, getResourceLoader, getResourceLoaderNames, getResourceLoaders, removeResourceLoader, setName
 
Methods inherited from interface org.kuali.rice.core.lifecycle.Lifecycle
isStarted
 

Field Detail

beanFactory

private org.springframework.beans.factory.BeanFactory beanFactory
Constructor Detail

SpringBeanFactoryResourceLoader

public SpringBeanFactoryResourceLoader()

SpringBeanFactoryResourceLoader

public SpringBeanFactoryResourceLoader(QName name)
Method Detail

setBeanFactory

public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
                    throws org.springframework.beans.BeansException
Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
Throws:
org.springframework.beans.BeansException

getBeanFactory

protected org.springframework.beans.factory.BeanFactory getBeanFactory()

getService

public Object getService(QName serviceName)
Description copied from interface: ServiceLocator
Fetches the service with the given name.

Specified by:
getService in interface ServiceLocator
Overrides:
getService in class BaseResourceLoader

resolveServiceName

protected String resolveServiceName(QName serviceName)
Resolves the given QName service name to a String representation which is used to lookup the service in Spring. Default implementation simply calls toString() on the QName.



Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.