|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjfun.yan.spring.SpringAdapter
public class SpringAdapter
The main adapter class to between Yan and Spring.
| Constructor Summary | |
|---|---|
SpringAdapter()
|
|
| Method Summary | |
|---|---|
static Component |
adapt(Component c,
SpringContext ctxt,
Component transaction_manager,
Component transaction_attributes,
java.lang.String[] interfaces)
Decorate a Component with spring context so that dependencies can be injected automatically, and FactoryBean can be automatically instantiated. |
static org.springframework.beans.factory.FactoryBean |
getFactoryBean(Container yan,
java.lang.Object key)
Get FactoryBean instance from a Spring integrated Container object. |
static java.lang.Object |
injectBean(java.lang.Object obj,
SpringContext ctxt,
org.springframework.transaction.PlatformTransactionManager transaction_manager,
java.util.Properties transaction_attributes,
java.lang.String[] interfaces)
Inject spring dependencies into an object when it is of any Spring marker interface. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpringAdapter()
| Method Detail |
|---|
public static java.lang.Object injectBean(java.lang.Object obj,
SpringContext ctxt,
org.springframework.transaction.PlatformTransactionManager transaction_manager,
java.util.Properties transaction_attributes,
java.lang.String[] interfaces)
throws java.lang.Exception
obj - the object to inject dependencies.ctxt - the SpringContext object hosting all pertinent
runtime information.transaction_manager - the Component that instantiates the transaction manager.
Can be null if transaction_attributes is null.transaction_attributes - the Component that instantiates a Properties object
that contains transaction attributes.
This is the indicator parameter. When it is null, no transaction proxying is done.
And when it is not null, the transaction_manager cannot be null.interfaces - the interface names to proxy on.
Can be null.
java.lang.Exception
public static Component adapt(Component c,
SpringContext ctxt,
Component transaction_manager,
Component transaction_attributes,
java.lang.String[] interfaces)
c - the Component object.ctxt - the SpringContext object.transaction_manager - the Component that instantiates the transaction manager.
Can be null if transaction_attributes is null.transaction_attributes - the Component that instantiates a Properties object
that contains transaction attributes.
This is the indicator parameter. When it is null, no transaction proxying is done.
And when it is not null, the transaction_manager cannot be null.interfaces - the interface names to proxy on.
Can be null.
public static org.springframework.beans.factory.FactoryBean getFactoryBean(Container yan,
java.lang.Object key)
yan - the Container object.key - the key of the FactoryBean component. The key doesn't need to be
prefixed with a '&' as one has to do in Spring.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||