org.apache.struts.config
Class FormBeanConfig
java.lang.Object
org.apache.struts.config.FormBeanConfig
- Serializable
public class FormBeanConfig
extends java.lang.Object
implements Serializable
A JavaBean representing the configuration information of a
<form-bean>
element in a Struts
configuration file.
Version:
- Craig R. McClanahan
- Struts 1.1
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 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 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 String | type - The fully qualified Java class name of the implementation class
to be used or generated.
|
configured
protected boolean configured
Has this component been completely configured?
dynamic
protected boolean dynamic
Is the form bean class an instance of DynaActionForm with dynamic
properties?
formProperties
protected HashMap formProperties
The set of FormProperty elements defining dynamic form properties for
this form bean, keyed by property name.
name
protected 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 String type
The fully qualified Java class name of the implementation class
to be used or generated.
addFormPropertyConfig
public void addFormPropertyConfig(FormPropertyConfig config)
Add a new FormPropertyConfig
instance to the set associated
with this module.
config
- The new configuration instance to be added
findFormPropertyConfig
public FormPropertyConfig findFormPropertyConfig(String name)
Return the form property configuration for the specified property
name, if any; otherwise return null
.
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.
formBeanClass
protected 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.
freeze
public void freeze()
Freeze the configuration of this component.
getDynamic
public boolean getDynamic()
getModuleConfig
public ModuleConfig getModuleConfig()
Return the
ModuleConfig
with which this form bean definition
is associated.
getName
public String getName()
getType
public String getType()
removeFormPropertyConfig
public void removeFormPropertyConfig(FormPropertyConfig config)
Remove the specified form property configuration instance.
config
- FormPropertyConfig instance to be removed
setDynamic
public void setDynamic(boolean dynamic)
The value to be returned by getDynamic()
is now computed automatically in setType()
setModuleConfig
public void setModuleConfig(ModuleConfig moduleConfig)
Set the
ModuleConfig
with which this form bean definition
is associated.
moduleConfig
- The new ModuleConfig
or null
to disassociate this form bean configuration from any module
setName
public void setName(String name)
setType
public void setType(String type)
toString
public String toString()
Return a String representation of this object.
Copyright B) 2000-2005 - Apache Software Foundation