org.kuali.rice.core.resourceloader
Class SpringResourceLoader

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.SpringResourceLoader
All Implemented Interfaces:
Lifecycle, ObjectLoader, ResourceLoader, ServiceLocator

public class SpringResourceLoader
extends BaseResourceLoader

A simple ResourceLoader which wraps a Spring ConfigurableApplicationContext. Starts and stops the ConfigurableApplicationContext.

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

Field Summary
private  org.springframework.context.ConfigurableApplicationContext context
           
private  String[] fileLocs
           
private static org.apache.log4j.Logger LOG
           
private  org.springframework.context.ApplicationContext parentContext
           
private  SpringResourceLoader parentSpringResourceLoader
           
 
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
SpringResourceLoader(QName name, String fileLoc)
           
SpringResourceLoader(QName name, String[] fileLocs)
           
 
Method Summary
 org.springframework.context.ConfigurableApplicationContext getContext()
           
 Object getService(QName serviceName)
          Fetches the service with the given name.
 void setParentContext(org.springframework.context.ApplicationContext parentContext)
           
 void setParentSpringResourceLoader(SpringResourceLoader parentSpringResourceLoader)
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.kuali.rice.core.resourceloader.BaseResourceLoader
getClassLoader, getContents, getObject, getServiceLocator, isPostProcessContainer, postProcessObject, postProcessService, setClassLoader, setPostProcessContainer, 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

LOG

private static final org.apache.log4j.Logger LOG

parentSpringResourceLoader

private SpringResourceLoader parentSpringResourceLoader

parentContext

private org.springframework.context.ApplicationContext parentContext

context

private org.springframework.context.ConfigurableApplicationContext context

fileLocs

private final String[] fileLocs
Constructor Detail

SpringResourceLoader

public SpringResourceLoader(QName name,
                            String fileLoc)

SpringResourceLoader

public SpringResourceLoader(QName name,
                            String[] fileLocs)
Method Detail

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

start

public void start()
           throws Exception
Specified by:
start in interface Lifecycle
Overrides:
start in class BaseResourceLoader
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface Lifecycle
Overrides:
stop in class BaseResourceLoader
Throws:
Exception

getContext

public org.springframework.context.ConfigurableApplicationContext getContext()

setParentContext

public void setParentContext(org.springframework.context.ApplicationContext parentContext)

setParentSpringResourceLoader

public void setParentSpringResourceLoader(SpringResourceLoader parentSpringResourceLoader)


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