org.kuali.rice.core.api.resourceloader
Class ResourceLoaderContainer

java.lang.Object
  extended by org.kuali.rice.core.api.lifecycle.BaseLifecycle
      extended by org.kuali.rice.core.api.resourceloader.ResourceLoaderContainer
All Implemented Interfaces:
Lifecycle, ObjectLoader, ResourceLoader, ServiceLocator
Direct Known Subclasses:
BasePluginRegistry, BaseResourceLoader

public class ResourceLoaderContainer
extends BaseLifecycle
implements ResourceLoader

A ResourceLoader which acts as a container for other ResourceLoaders. Effectively, implements a composite pattern for ResourceLoaders.

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

Field Summary
 
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
ResourceLoaderContainer(QName name)
           
 
Method Summary
 void addResourceLoader(ResourceLoader resourceLoader)
           
 void addResourceLoaderFirst(ResourceLoader resourceLoader)
           
 boolean containsResourceLoader(ResourceLoader resourceLoader)
           
 String getContents(String indent, boolean servicePerLine)
           
 QName getName()
           
 Object getObject(ObjectDefinition definition)
          Constructs an instance of the Object using the given ObjectDefinition classname.
 ResourceLoader getResourceLoader(QName name)
           
 List<QName> getResourceLoaderNames()
           
 List<ResourceLoader> getResourceLoaders()
           
 Object getService(QName qname)
          Fetches the service with the given name.
 void removeAllResourceLoaders()
           
 void removeResourceLoader(QName name)
           
 void setName(QName name)
           
 void start()
           
 void stop()
           
 String 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.lifecycle.Lifecycle
isStarted
 

Constructor Detail

ResourceLoaderContainer

public ResourceLoaderContainer(QName name)
Method Detail

start

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

stop

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

addResourceLoader

public void addResourceLoader(ResourceLoader resourceLoader)
Specified by:
addResourceLoader in interface ResourceLoader

addResourceLoaderFirst

public void addResourceLoaderFirst(ResourceLoader resourceLoader)
Specified by:
addResourceLoaderFirst in interface ResourceLoader

containsResourceLoader

public boolean containsResourceLoader(ResourceLoader resourceLoader)

getResourceLoader

public ResourceLoader getResourceLoader(QName name)
Specified by:
getResourceLoader in interface ResourceLoader

getResourceLoaderNames

public List<QName> getResourceLoaderNames()
Specified by:
getResourceLoaderNames in interface ResourceLoader

removeAllResourceLoaders

public void removeAllResourceLoaders()

removeResourceLoader

public void removeResourceLoader(QName name)
Specified by:
removeResourceLoader in interface ResourceLoader

getResourceLoaders

public List<ResourceLoader> getResourceLoaders()
Specified by:
getResourceLoaders in interface ResourceLoader

getObject

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

Specified by:
getObject in interface ObjectLoader

getService

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

Specified by:
getService in interface ServiceLocator

getContents

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

toString

public String toString()
Overrides:
toString in class Object

getName

public QName getName()
Specified by:
getName in interface ResourceLoader

setName

public void setName(QName name)
Specified by:
setName in interface ResourceLoader


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