org.kuali.rice.core.impl.resourceloader
Class SpringResourceLoader

java.lang.Object
  extended by org.kuali.rice.core.api.lifecycle.BaseLifecycle
      extended by org.kuali.rice.core.api.resourceloader.ResourceLoaderContainer
          extended by org.kuali.rice.core.framework.resourceloader.BaseResourceLoader
              extended by org.kuali.rice.core.impl.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
 
Fields inherited from class org.kuali.rice.core.framework.resourceloader.BaseResourceLoader
LOG
 
Fields inherited from interface org.kuali.rice.core.api.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, List<String> fileLocs, javax.servlet.ServletContext servletContextcontext)
           
SpringResourceLoader(QName name, String fileLoc, javax.servlet.ServletContext context)
           
 
Method Summary
 String getContents(String indent, boolean servicePerLine)
           
 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.framework.resourceloader.BaseResourceLoader
getClassLoader, getObject, getServiceLocator, isPostProcessContainer, postProcessObject, postProcessService, setClassLoader, setPostProcessContainer
 
Methods inherited from class org.kuali.rice.core.api.resourceloader.ResourceLoaderContainer
addResourceLoader, addResourceLoaderFirst, containsResourceLoader, getName, getResourceLoader, getResourceLoaderNames, getResourceLoaders, removeAllResourceLoaders, removeResourceLoader, setName, toString
 
Methods inherited from class org.kuali.rice.core.api.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.api.resourceloader.ResourceLoader
addResourceLoader, addResourceLoaderFirst, getName, getResourceLoader, getResourceLoaderNames, getResourceLoaders, removeResourceLoader, setName
 
Methods inherited from interface org.kuali.rice.core.api.lifecycle.Lifecycle
isStarted
 

Constructor Detail

SpringResourceLoader

public SpringResourceLoader(QName name,
                            String fileLoc,
                            javax.servlet.ServletContext context)

SpringResourceLoader

public SpringResourceLoader(QName name,
                            List<String> fileLocs,
                            javax.servlet.ServletContext servletContextcontext)
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)

getContents

public String getContents(String indent,
                          boolean servicePerLine)
Specified by:
getContents in interface ResourceLoader
Specified by:
getContents in interface ServiceLocator
Overrides:
getContents in class BaseResourceLoader


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