org.sakaiproject.util
Class ComponentsLoader

java.lang.Object
  extended by org.sakaiproject.util.ComponentsLoader

public class ComponentsLoader
extends Object

Load the available Sakai components into the shared component manager's Spring ApplicationContext


Constructor Summary
ComponentsLoader()
           
 
Method Summary
 void load(org.springframework.context.ConfigurableApplicationContext ac, String componentsRoot)
           
protected  void loadComponentPackage(File dir, org.springframework.context.ConfigurableApplicationContext ac)
          Load one component package into the AC
protected  ClassLoader newPackageClassLoader(File dir)
          Create the class loader for this component package
protected  boolean validComponentsPackage(File dir)
          Test if this File is a valid components package directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentsLoader

public ComponentsLoader()
Method Detail

load

public void load(org.springframework.context.ConfigurableApplicationContext ac,
                 String componentsRoot)

loadComponentPackage

protected void loadComponentPackage(File dir,
                                    org.springframework.context.ConfigurableApplicationContext ac)
Load one component package into the AC

Parameters:
packageRoot - The file path to the component package
ac - The ApplicationContext to load into

validComponentsPackage

protected boolean validComponentsPackage(File dir)
Test if this File is a valid components package directory.

Parameters:
dir - The file to test
Returns:
true if it is a valid components package directory, false if not.

newPackageClassLoader

protected ClassLoader newPackageClassLoader(File dir)
Create the class loader for this component package

Parameters:
dir - The package's root directory.
Returns:
A class loader, whose parent is this class's loader, which has the classes/ and jars for this component.


Copyright © 2003-2012 The Sakai Foundation. All Rights Reserved.