BeanConfiguration (Grails 5.3.2)

Package: org.grails.spring

## [Java] Interface BeanConfiguration

-     public interface BeanConfiguration

  Represents a runtime bean configuration. Credit must go to Solomon Duskis and the article: http://jroller.com/page/Solomon?entry=programmatic_configuration_in_spring

  Authors:
    Graeme
  Since:
    0.3

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public BeanConfiguration` | `addProperty(java.lang.String propertyName, java.lang.Object propertyValue)` Adds a property value to this bean.
    `` | `public org.springframework.beans.factory.support.AbstractBeanDefinition` | `getBeanDefinition()` Returns: The Spring bean definition instance
    `` | `public java.lang.String` | `getName()` Returns: The name of the bean
    `` | `public java.lang.Object` | `getPropertyValue(java.lang.String name)` Returns the value of the given property or throws a MissingPropertyException.
    `` | `public boolean` | `hasProperty(java.lang.String name)` Returns true if the bean config has the name property set.
    `` | `public boolean` | `isSingleton()` Returns: true if the bean is singleton
    `` | `public BeanConfiguration` | `setAbstract(boolean isAbstract)` Sets the BeanConfiguration as an Abstract bean definition
    `` | `public BeanConfiguration` | `setAutowire(java.lang.String type)` Sets the autowire type, either "byType" or "byName"
    `` | `public void` | `setBeanDefinition(org.springframework.beans.factory.config.BeanDefinition definition)`
    `` | `public BeanConfiguration` | `setDependsOn(java.lang.String[] dependsOn)` Sets the names of the beans this bean configuration depends on
    `` | `public BeanConfiguration` | `setDestroyMethod(java.lang.String methodName)` Sets the name of the method to call when destroying the bean.
    `` | `public BeanConfiguration` | `setFactoryBean(java.lang.String beanName)` Parameters: beanName
    `` | `public BeanConfiguration` | `setFactoryMethod(java.lang.String methodName)` Parameters: methodName
    `` | `public void` | `setName(java.lang.String beanName)` Sets the name of the bean in the app ctx.
    `` | `public void` | `setParent(java.lang.Object name)` Sets the name of the parent bean.
    `` | `public void` | `setPropertyValue(java.lang.String property, java.lang.Object newValue)` Sets a property value on the bean configuration

- - ### Method Detail

    - #### public BeanConfiguration addProperty(java.lang.String propertyName, java.lang.Object propertyValue)

      Adds a property value to this bean.

      Parameters:
        `propertyName` - The name of the property
        `propertyValue` - The value of the property
      Returns:
        Returns this bean configuration

    - #### public org.springframework.beans.factory.support.AbstractBeanDefinition getBeanDefinition()

      Returns:
        The Spring bean definition instance

    - #### public java.lang.String getName()

      Returns:
        The name of the bean

    - #### public java.lang.Object getPropertyValue(java.lang.String name)

      Returns the value of the given property or throws a MissingPropertyException.

      Parameters:
        `name` - The name of the property
      Returns:
        The value of the property

    - #### public boolean hasProperty(java.lang.String name)

      Returns true if the bean config has the name property set.

      Parameters:
        `name` - The name of the property
      Returns:
        true if it does have a property with the given name

    - #### public boolean isSingleton()

      Returns:
        true if the bean is singleton

    - #### public BeanConfiguration setAbstract(boolean isAbstract)

      Sets the BeanConfiguration as an Abstract bean definition

      Parameters:
        `isAbstract` - Whether its abstract or not
      Returns:
        This BeanConfiguration object

    - #### public BeanConfiguration setAutowire(java.lang.String type)

      Sets the autowire type, either "byType" or "byName"

      Parameters:
        `type` - The type
      Returns:
        This BeanConfiguration

    - #### public void setBeanDefinition(org.springframework.beans.factory.config.BeanDefinition definition)

    - #### public BeanConfiguration setDependsOn(java.lang.String[] dependsOn)

      Sets the names of the beans this bean configuration depends on

      Parameters:
        `dependsOn` - Bean names it depends on
      Returns:
        This bean configuration

    - #### public BeanConfiguration setDestroyMethod(java.lang.String methodName)

      Sets the name of the method to call when destroying the bean.

      Parameters:
        `methodName` - The method name
      Returns:
        This bean configuration

    - #### public BeanConfiguration setFactoryBean(java.lang.String beanName)

      Parameters:
        beanName
      Returns:
        This BeanConfiguration

    - #### public BeanConfiguration setFactoryMethod(java.lang.String methodName)

      Parameters:
        methodName
      Returns:
        This BeanConfiguration

    - #### public void setName(java.lang.String beanName)

      Sets the name of the bean in the app ctx.

      Parameters:
        `beanName` - The bean name

    - #### public void setParent(java.lang.Object name)

      Sets the name of the parent bean.

      Parameters:
        `name` - Either a string which is the name of the bean, a RuntimeBeanReference or a BeanConfiguration

    - #### public void setPropertyValue(java.lang.String property, java.lang.Object newValue)

      Sets a property value on the bean configuration

      Parameters:
        `property` - The name of the property
        `newValue` - The value