Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.directwebremoting.spring
Class BeanCreator

    java.lang.Object
      org.directwebremoting.create.AbstractCreator
          org.directwebremoting.spring.BeanCreator

All Implemented Interfaces:
  Creator, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

    public class BeanCreator

extends AbstractCreator
implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean

A creator that proxies to the specified bean.
Note that it can be configured with additional include rules, exclude rules, filters and authentication rules using the specified creator configuration.

Author:
  Bram Smeets
See Also:
  `CreatorConfig`

Field Summary

Fields inherited from interface org.directwebremoting.extend.Creator
`APPLICATION, PAGE, REQUEST, SCRIPT, SESSION`

Constructor Summary
`BeanCreator()`

Method Summary
`void` | `afterPropertiesSet()` Is called by the Spring container after all properties have been set.
`CreatorConfig` | `getConfig()` Gets the configuration for this creator.
`java.lang.Object` | `getInstance()` Accessor for the instance of this creator.
`java.lang.Class` | `getType()` Accessor for the class that this creator allows access to.
`void` | `setApplicationContext(org.springframework.context.ApplicationContext applicationContext)` Sets the application context.
`void` | `setBean(java.lang.Object bean)` Sets the bean for this bean creator.
`void` | `setBeanClass(java.lang.Class beanClass)` Sets the bean class for this creator.
`void` | `setBeanId(java.lang.String beanId)` Sets the id of the bean to remote using DWR.
`void` | `setConfig(CreatorConfig config)` Sets the configuration for this creator.

Methods inherited from class org.directwebremoting.create.AbstractCreator
`getJavascript, getScope, isCacheable, setCacheable, setJavascript, setProperties, setScope, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BeanCreator

    public BeanCreator()

Method Detail

### afterPropertiesSet

    public void afterPropertiesSet()

  Is called by the Spring container after all properties have been set.
  It is implemented in order to initialize the beanClass field correctly and to make sure that either the bean id or the bean itself have been set on this creator.

  Specified by:
    `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`
  See Also:
    `InitializingBean`

### getType

    public java.lang.Class getType()

  Accessor for the class that this creator allows access to.
  It returns the class specified by the `beanClass` property. In case no class name has been set, it returns the class of the specified bean.

  Specified by:
    `getType` in interface `Creator`
  Returns:
    the type of this allowed class

### getInstance

    public java.lang.Object getInstance()

  Accessor for the instance of this creator.
  It returns the specified bean property.

  Specified by:
    `getInstance` in interface `Creator`
  Returns:
    the bean instance of this creator

### setBean

    public void setBean(java.lang.Object bean)

  Sets the bean for this bean creator.

  Parameters:
    `bean` - the bean for this creator

### setBeanClass

    public void setBeanClass(java.lang.Class beanClass)

  Sets the bean class for this creator.
  Use this property to specify a different class or interface for instance in case the specified bean is a proxy or implementation and we want to expose the interface.

  Parameters:
    `beanClass` - the class of the bean to remote

### setApplicationContext

    public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)

  Sets the application context.
  This method is called by the Spring bean container to set a reference to the application context.

  Specified by:
    `setApplicationContext` in interface `org.springframework.context.ApplicationContextAware`
  Parameters:
    `applicationContext` - the application context

### setBeanId

    public void setBeanId(java.lang.String beanId)

  Sets the id of the bean to remote using DWR.
  Either set this property on the creator, or set the bean to be remoted directly on this creator.

  Parameters:
    `beanId` - the id of the bean to remote

### setConfig

    public void setConfig(CreatorConfig config)

  Sets the configuration for this creator.
  Use the configuration to specify include and exclude rules, filters and/or authentication rules.

  Parameters:
    `config` - the configuration for this creator
  See Also:
    `CreatorConfig`

### getConfig

    public CreatorConfig getConfig()

  Gets the configuration for this creator.

  Returns:
    the configuration for this creator

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¬ 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD