org.oddjob.spring
Class SpringBeans

java.lang.Object
  extended by org.oddjob.spring.SpringBeans
All Implemented Interfaces:
Runnable, ArooaSessionAware, BeanDirectoryOwner

public class SpringBeans
extends Object
implements Runnable, BeanDirectoryOwner, ArooaSessionAware

Description

An Oddjob job that will load a Spring application. The Spring XML configuration may be specified either as files or classpath resources.

Beans within Spring may be accessed from other Oddjob components using the notation ${id-of-this/name-of-bean}.

Oddjob beans are made available via a parent BeanFactory so can be accessed by reference.

Oddjobs beans and there properties can also be accessed using the ${id.property} notation within Spring configuration files.

Example

See the examples in the examples/config directory. To run the examples copy the examples/classes directory to it's parent directory so that Oddjob recognises them as part of the Oddball.

Author:
rob

Constructor Summary
SpringBeans()
           
 
Method Summary
 ClassLoader getClassLoader()
           
 String[] getFiles()
          Getter.
 String getName()
           
 String[] getResources()
          Getter.
 BeanDirectory provideBeanDirectory()
          Get the BeanDirectory.
 void run()
           
 void setArooaSession(ArooaSession session)
           
 void setClassLoader(ClassLoader classLoader)
          Set the class loader to load resource with.
 void setFiles(String[] files)
          Setter
 void setName(String name)
           
 void setResources(String[] resources)
          Setter.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpringBeans

public SpringBeans()
Method Detail

getName

public String getName()

setName

public void setName(String name)

getFiles

public String[] getFiles()
Getter.

Returns:

setFiles

public void setFiles(String[] files)
Setter

Parameters:
files -

getResources

public String[] getResources()
Getter.

Returns:

setResources

public void setResources(String[] resources)
Setter.

Parameters:
resources -

getClassLoader

public ClassLoader getClassLoader()

setClassLoader

public void setClassLoader(ClassLoader classLoader)
Set the class loader to load resource with.

Parameters:
classLoader -

setArooaSession

public void setArooaSession(ArooaSession session)
Specified by:
setArooaSession in interface ArooaSessionAware

run

public void run()
Specified by:
run in interface Runnable

provideBeanDirectory

public BeanDirectory provideBeanDirectory()
Description copied from interface: BeanDirectoryOwner
Get the BeanDirectory. This method may return null if the BeanDirectory isn't available.

Specified by:
provideBeanDirectory in interface BeanDirectoryOwner
See Also:
BeanDirectoryOwner
Returns:
The BeanDirectory or null.

toString

public String toString()
Overrides:
toString in class Object