Package org.sakaiproject.util
Class ComponentsLoader
- java.lang.Object
-
- org.sakaiproject.util.ComponentsLoader
-
public class ComponentsLoader extends Object
Load the available Sakai components into the shared component manager's Spring ApplicationContext
-
-
Constructor Summary
Constructors Constructor Description ComponentsLoader()ComponentsLoader(File overridesFolder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidload(org.springframework.context.ConfigurableApplicationContext ac, String componentsRoot)protected voidloadComponentPackage(File dir, org.springframework.context.ConfigurableApplicationContext ac)Load one component package into the ACprotected ClassLoadernewPackageClassLoader(File dir)Create the class loader for this component packageprotected booleanvalidComponentsPackage(File dir)Test if this File is a valid components package directory.
-
-
-
Constructor Detail
-
ComponentsLoader
public ComponentsLoader()
-
ComponentsLoader
public ComponentsLoader(File overridesFolder)
-
-
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:
dir- The file path to the component packageac- 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.
-
-