|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgroovy.lang.GroovyObjectSupport
org.codehaus.groovy.grails.commons.spring.DefaultBeanConfiguration
public class DefaultBeanConfiguration
Default implementation of the BeanConfiguration interface Credit must go to Solomon Duskis and the article: http://jroller.com/page/Solomon?entry=programmatic_configuration_in_spring
| Field Summary |
|---|
| Fields inherited from interface org.codehaus.groovy.grails.commons.spring.BeanConfiguration |
|---|
AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE |
| Constructor Summary | |
|---|---|
DefaultBeanConfiguration(Class clazz2)
|
|
DefaultBeanConfiguration(Class clazz2,
Collection constructorArguments)
|
|
DefaultBeanConfiguration(String name)
|
|
DefaultBeanConfiguration(String name2,
boolean prototype)
|
|
DefaultBeanConfiguration(String name,
Class clazz)
|
|
DefaultBeanConfiguration(String name,
Class clazz,
boolean prototype)
|
|
DefaultBeanConfiguration(String name2,
Class clazz2,
Collection args)
|
|
| Method Summary | |
|---|---|
BeanConfiguration |
addProperty(String propertyName,
Object propertyValue)
Adds a property value to this bean |
protected AbstractBeanDefinition |
createBeanDefinition()
|
AbstractBeanDefinition |
getBeanDefinition()
|
String |
getName()
|
Object |
getProperty(String property)
|
Object |
getPropertyValue(String name)
Returns the value of the given property or throws a MissingPropertyException |
boolean |
hasProperty(String name)
Returns true if the bean config has the name property set |
boolean |
isSingleton()
|
BeanConfiguration |
setAbstract(boolean isAbstract)
Sets the BeanConfiguration as an Abstract bean definition |
BeanConfiguration |
setAutowire(String type)
Sets the autowire type, either "byType" or "byName" |
BeanConfiguration |
setDependsOn(String[] dependsOn)
Sets the names of the beans this bean configuration depends on |
BeanConfiguration |
setDestroyMethod(String methodName)
Sets the name of the method to call when destroying the bean |
BeanConfiguration |
setFactoryBean(String beanName)
|
BeanConfiguration |
setFactoryMethod(String methodName)
|
void |
setName(String beanName)
Sets the name of the bean in the app ctx |
void |
setParent(Object obj)
Sets the name of the parent bean |
void |
setProperty(String property,
Object newValue)
|
void |
setPropertyValue(String property,
Object newValue)
Sets a property value on the bean configuration |
| Methods inherited from class groovy.lang.GroovyObjectSupport |
|---|
getMetaClass, invokeMethod, setMetaClass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultBeanConfiguration(String name,
Class clazz)
public DefaultBeanConfiguration(String name,
Class clazz,
boolean prototype)
public DefaultBeanConfiguration(String name)
public DefaultBeanConfiguration(Class clazz2)
public DefaultBeanConfiguration(String name2,
Class clazz2,
Collection args)
public DefaultBeanConfiguration(String name2,
boolean prototype)
public DefaultBeanConfiguration(Class clazz2,
Collection constructorArguments)
| Method Detail |
|---|
public Object getProperty(String property)
getProperty in interface groovy.lang.GroovyObjectgetProperty in class groovy.lang.GroovyObjectSupport
public void setProperty(String property,
Object newValue)
setProperty in interface groovy.lang.GroovyObjectsetProperty in class groovy.lang.GroovyObjectSupportpublic String getName()
getName in interface BeanConfigurationpublic boolean isSingleton()
isSingleton in interface BeanConfigurationpublic AbstractBeanDefinition getBeanDefinition()
getBeanDefinition in interface BeanConfigurationprotected AbstractBeanDefinition createBeanDefinition()
public BeanConfiguration addProperty(String propertyName,
Object propertyValue)
BeanConfiguration
addProperty in interface BeanConfigurationpropertyName - The name of the propertypropertyValue - The value of the property
public BeanConfiguration setDestroyMethod(String methodName)
BeanConfiguration
setDestroyMethod in interface BeanConfigurationmethodName - The method name
public BeanConfiguration setDependsOn(String[] dependsOn)
BeanConfiguration
setDependsOn in interface BeanConfigurationdependsOn - Bean names it depends on
public BeanConfiguration setFactoryBean(String beanName)
setFactoryBean in interface BeanConfigurationpublic BeanConfiguration setFactoryMethod(String methodName)
setFactoryMethod in interface BeanConfigurationpublic BeanConfiguration setAutowire(String type)
BeanConfiguration
setAutowire in interface BeanConfigurationtype - The type
public void setName(String beanName)
BeanConfiguration
setName in interface BeanConfigurationbeanName - The bean namepublic Object getPropertyValue(String name)
BeanConfiguration
getPropertyValue in interface BeanConfigurationname - The name of the property
public boolean hasProperty(String name)
BeanConfiguration
hasProperty in interface BeanConfigurationname - The name of the property
public void setPropertyValue(String property,
Object newValue)
BeanConfiguration
setPropertyValue in interface BeanConfigurationproperty - The name of the propertynewValue - The valuepublic BeanConfiguration setAbstract(boolean isAbstract)
BeanConfiguration
setAbstract in interface BeanConfigurationisAbstract - Whether its abstract or not
public void setParent(Object obj)
BeanConfiguration
setParent in interface BeanConfigurationobj - Either a string which is the name of the bean, a RuntimeBeanReference or a BeanConfiguration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||