org.javalid.core.extlookup
Interface SpringLookupExt

All Known Implementing Classes:
SpringLookupExtImpl

public interface SpringLookupExt

This interface defines the contract that must be used for looking up Spring beans. The implementing class can be found inside the spring-dep project. As you can see we return an Object instead of a spring bean, this is to keep things independent, so that the core can be used independently if you do not use spring.

The default implementation class can be found in the spring-dep project, if you wish to provide a custom implementation, feel free and specify in the jv-config.xml file.

Since:
1.0
Version:
1.0
Author:
M.Reuvers

Method Summary
 java.lang.Object getSpringBean(java.lang.String name)
          This method locates given bean and returns it.
 void setApplicationContext(java.lang.Object context)
          Called by the jv framework when initializing the implementation class (right after jvConfiguration is set).
 void setJvConfigurationWrapper(JvConfigurationWrapper jvConfigWrapper)
          Called by the jv framework when initializing the implementation class (right after constructing an instance).
 

Method Detail

getSpringBean

java.lang.Object getSpringBean(java.lang.String name)
This method locates given bean and returns it. Raises a JvLookupException if the spring bean is not found.

Parameters:
name - The name of the spring bean
Returns:
Spring bean if found, exception raised if not (cast to spring bean yourself)

setJvConfigurationWrapper

void setJvConfigurationWrapper(JvConfigurationWrapper jvConfigWrapper)
Called by the jv framework when initializing the implementation class (right after constructing an instance).

Parameters:
jvConfigWrapper - The configuration of the framework, allowing access to the current configuration.

setApplicationContext

void setApplicationContext(java.lang.Object context)
Called by the jv framework when initializing the implementation class (right after jvConfiguration is set). Note the object passed must implement the org.springframework.context.ApplicationContext interface.

Parameters:
context - Must implement org.springframework.context.ApplicationContext