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.apache.struts.config
Class FormBeanConfig

    java.lang.Object
      |
      +--org.apache.struts.config.FormBeanConfig

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  ActionFormBean

public class FormBeanConfig
extends java.lang.Object
implements java.io.Serializable

A JavaBean representing the configuration information of a `<form-bean>` element in a Struts configuration file.

Since:
  Struts 1.1
Version:
  $Revision: 1.1 $ $Date: 2003-08-22 09:14:33 +0100 (Fri, 22 Aug 2003) $
Author:
  Craig R. McClanahan
See Also:
  Serialized Form

Field Summary
`protected boolean` | `configured` Has this component been completely configured?
`protected boolean` | `dynamic` Is the form bean class an instance of DynaActionForm with dynamic properties?
`protected java.util.HashMap` | `formProperties` The set of FormProperty elements defining dynamic form properties for this form bean, keyed by property name.
`protected ModuleConfig` | `moduleConfig` The `ModuleConfig` with which this form bean definition is associated.
`protected java.lang.String` | `name` The unique identifier of this form bean, which is used to reference this bean in `ActionMapping` instances as well as for the name of the request or session attribute under which the corresponding form bean instance is created or accessed.
`protected java.lang.String` | `type` The fully qualified Java class name of the implementation class to be used or generated.

Constructor Summary
`FormBeanConfig()`

Method Summary
`void` | `addFormPropertyConfig(FormPropertyConfig config)` Add a new `FormPropertyConfig` instance to the set associated with this module.
`FormPropertyConfig` | `findFormPropertyConfig(java.lang.String name)` Return the form property configuration for the specified property name, if any; otherwise return `null`.
`FormPropertyConfig[]` | `findFormPropertyConfigs()` Return the form property configurations for this module.
`protected java.lang.Class` | `formBeanClass()` Return the `Class` instance for the form bean implementation configured by this `FormBeanConfig` instance.
`void` | `freeze()` Freeze the configuration of this component.
`boolean` | `getDynamic()`
`ModuleConfig` | `getModuleConfig()` Return the `ModuleConfig` with which this form bean definition is associated.
`java.lang.String` | `getName()`
`java.lang.String` | `getType()`
`void` | `removeFormPropertyConfig(FormPropertyConfig config)` Remove the specified form property configuration instance.
`void` | `setDynamic(boolean dynamic)` Deprecated. The value to be returned by `getDynamic()` is now computed automatically in `setType()`
`void` | `setModuleConfig(ModuleConfig moduleConfig)` Set the `ModuleConfig` with which this form bean definition is associated.
`void` | `setName(java.lang.String name)`
`void` | `setType(java.lang.String type)`
`java.lang.String` | `toString()` Return a String representation of this object.

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

Field Detail

### configured

    protected boolean configured

  Has this component been completely configured?

### formProperties

    protected java.util.HashMap formProperties

  The set of FormProperty elements defining dynamic form properties for this form bean, keyed by property name.

### dynamic

    protected boolean dynamic

  Is the form bean class an instance of DynaActionForm with dynamic properties?

### moduleConfig

    protected ModuleConfig moduleConfig

  The `ModuleConfig` with which this form bean definition is associated.

### name

    protected java.lang.String name

  The unique identifier of this form bean, which is used to reference this bean in `ActionMapping` instances as well as for the name of the request or session attribute under which the corresponding form bean instance is created or accessed.

### type

    protected java.lang.String type

  The fully qualified Java class name of the implementation class to be used or generated.

Constructor Detail

### FormBeanConfig

    public FormBeanConfig()

Method Detail

### getDynamic

    public boolean getDynamic()

### setDynamic

    public void setDynamic(boolean dynamic)

  Deprecated. The value to be returned by `getDynamic()` is now computed automatically in `setType()`

### getModuleConfig

    public ModuleConfig getModuleConfig()

  Return the `ModuleConfig` with which this form bean definition is associated.

### setModuleConfig

    public void setModuleConfig(ModuleConfig moduleConfig)

  Set the `ModuleConfig` with which this form bean definition is associated.

  Parameters:
    `moduleConfig` - The new `ModuleConfig` or `null` to disassociate this form bean configuration from any module

### getName

    public java.lang.String getName()

### setName

    public void setName(java.lang.String name)

### getType

    public java.lang.String getType()

### setType

    public void setType(java.lang.String type)

### addFormPropertyConfig

    public void addFormPropertyConfig(FormPropertyConfig config)

  Add a new `FormPropertyConfig` instance to the set associated with this module.

  Parameters:
    `config` - The new configuration instance to be added
  Throws:
    `java.lang.IllegalArgumentException` - if this property name has already been defined

### findFormPropertyConfig

    public FormPropertyConfig findFormPropertyConfig(java.lang.String name)

  Return the form property configuration for the specified property name, if any; otherwise return `null`.

  Parameters:
    `name` - Form property name to find a configuration for

### findFormPropertyConfigs

    public FormPropertyConfig[] findFormPropertyConfigs()

  Return the form property configurations for this module. If there are none, a zero-length array is returned.

### freeze

    public void freeze()

  Freeze the configuration of this component.

### removeFormPropertyConfig

    public void removeFormPropertyConfig(FormPropertyConfig config)

  Remove the specified form property configuration instance.

  Parameters:
    `config` - FormPropertyConfig instance to be removed

### toString

    public java.lang.String toString()

  Return a String representation of this object.

  Overrides:
    `toString` in class `java.lang.Object`

### formBeanClass

    protected java.lang.Class formBeanClass()

  Return the `Class` instance for the form bean implementation configured by this `FormBeanConfig` instance. This method uses the same algorithm as `RequestUtils.applicationClass()` but is reproduced to avoid a runtime dependence.

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

Copyright © 2000-2003 - Apache Software Foundation