org.apache.wicket.spring
Class SpringBeanLocator

java.lang.Object
  extended by org.apache.wicket.spring.SpringBeanLocator
All Implemented Interfaces:
java.io.Serializable, IClusterable, IProxyTargetLocator

public class SpringBeanLocator
extends java.lang.Object
implements IProxyTargetLocator

Implementation of IProxyTargetLocator that can locate beans within a spring application context. Beans are looked up by the combination of name and type, if name is omitted only type is used.

Author:
Igor Vaynberg (ivaynberg), Istvan Devai
See Also:
Serialized Form

Constructor Summary
SpringBeanLocator(java.lang.Class beanType, ISpringContextLocator locator)
          Constructor
SpringBeanLocator(java.lang.String beanName, java.lang.Class beanType, ISpringContextLocator locator)
          Constructor
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getBeanName()
           
 java.lang.Class getBeanType()
           
 ISpringContextLocator getSpringContextLocator()
           
 int hashCode()
           
 boolean isSingletonBean()
           
 java.lang.Object locateProxyTarget()
          Returns the object that will be used as target object for a lazy init proxy.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringBeanLocator

public SpringBeanLocator(java.lang.Class beanType,
                         ISpringContextLocator locator)
Constructor

Parameters:
beanType - bean class
locator - spring context locator

SpringBeanLocator

public SpringBeanLocator(java.lang.String beanName,
                         java.lang.Class beanType,
                         ISpringContextLocator locator)
Constructor

Parameters:
beanName - bean name
beanType - bean class
locator - spring context locator
Method Detail

isSingletonBean

public boolean isSingletonBean()
Returns:
returns whether the bean (the locator is supposed to istantiate) is a singleton or not

getBeanType

public java.lang.Class getBeanType()
Returns:
bean class this locator is configured with

locateProxyTarget

public java.lang.Object locateProxyTarget()
Description copied from interface: IProxyTargetLocator
Returns the object that will be used as target object for a lazy init proxy.

Specified by:
locateProxyTarget in interface IProxyTargetLocator
Returns:
retrieved object
See Also:
IProxyTargetLocator.locateProxyTarget()

getBeanName

public final java.lang.String getBeanName()
Returns:
bean name this locator is configured with

getSpringContextLocator

public final ISpringContextLocator getSpringContextLocator()
Returns:
context locator this locator is configured with

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.