org.kuali.rice.core.framework.resourceloader
Class BaseResourceLoader

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
All Implemented Interfaces:
Lifecycle, ObjectLoader, ResourceLoader, ServiceLocator
Direct Known Subclasses:
BaseWrappingResourceLoader, BeanFactoryResourceLoader, ServiceBusResourceLoader, SpringBeanFactoryResourceLoader, SpringResourceLoader

public class BaseResourceLoader
extends ResourceLoaderContainer
implements ResourceLoader

A simple ResourceLoader implementation which will load objects from the specified classloader and also locate services in an optional ServiceLocator.

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

Field Summary
protected static org.apache.log4j.Logger 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
BaseResourceLoader(QName name)
           
BaseResourceLoader(QName name, ClassLoader classLoader)
           
BaseResourceLoader(QName name, ClassLoader classLoader, ServiceLocator serviceLocator)
           
BaseResourceLoader(QName name, ServiceLocator serviceLocator)
           
 
Method Summary
 ClassLoader getClassLoader()
           
 String getContents(String indent, boolean servicePerLine)
           
 Object getObject(ObjectDefinition objectDefinition)
          Constructs an instance of the Object using the given ObjectDefinition classname.
 Object getService(QName serviceName)
          Fetches the service with the given name.
 ServiceLocator getServiceLocator()
           
 boolean isPostProcessContainer()
           
protected  Object postProcessObject(ObjectDefinition definition, Object object)
           
protected  Object postProcessService(QName serviceName, Object service)
           
 void setClassLoader(ClassLoader classLoader)
           
 void setPostProcessContainer(boolean postProcessContainer)
           
 void start()
           
 void stop()
           
 
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
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG
Constructor Detail

BaseResourceLoader

public BaseResourceLoader(QName name,
                          ClassLoader classLoader)

BaseResourceLoader

public BaseResourceLoader(QName name)

BaseResourceLoader

public BaseResourceLoader(QName name,
                          ServiceLocator serviceLocator)

BaseResourceLoader

public BaseResourceLoader(QName name,
                          ClassLoader classLoader,
                          ServiceLocator serviceLocator)
Method Detail

getObject

public Object getObject(ObjectDefinition objectDefinition)
Description copied from interface: ObjectLoader
Constructs an instance of the Object using the given ObjectDefinition classname.

Specified by:
getObject in interface ObjectLoader
Overrides:
getObject in class ResourceLoaderContainer

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 ResourceLoaderContainer

start

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

stop

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

getClassLoader

public ClassLoader getClassLoader()

setClassLoader

public void setClassLoader(ClassLoader classLoader)

postProcessObject

protected Object postProcessObject(ObjectDefinition definition,
                                   Object object)

postProcessService

protected Object postProcessService(QName serviceName,
                                    Object service)

isPostProcessContainer

public boolean isPostProcessContainer()

setPostProcessContainer

public void setPostProcessContainer(boolean postProcessContainer)

getContents

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

getServiceLocator

public ServiceLocator getServiceLocator()


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.