|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.struts.config.FormBeanConfig
A JavaBean representing the configuration information of a
<form-bean>
element in a Struts
configuration file.
Field Summary | |
protected boolean |
configured
Has this component been completely configured? |
protected DynaActionFormClass |
dynaActionFormClass
The DynaActionFormClass associated with a DynaActionForm. |
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 java.lang.String |
lock
The lockable object we can synchronize on when creating DynaActionFormClass. |
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 boolean |
restricted
Is this DynaClass currently restricted (for DynaBeans with a MutableDynaClass). |
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. |
ActionForm |
createActionForm(ActionServlet servlet)
Create and return an ActionForm instance appropriate
to the information in this FormBeanConfig . |
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. |
DynaActionFormClass |
getDynaActionFormClass()
Return the DynaActionFormClass associated with a DynaActionForm. |
boolean |
getDynamic()
|
java.lang.String |
getName()
|
java.lang.String |
getType()
|
boolean |
isRestricted()
Indicates whether a MutableDynaClass is currently restricted. |
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 |
setName(java.lang.String name)
|
void |
setRestricted(boolean restricted)
Set whether a MutableDynaClass is currently restricted. |
void |
setType(java.lang.String type)
|
java.lang.String |
toString()
Return a String representation of this object. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected boolean configured
protected java.util.HashMap formProperties
protected java.lang.String lock
The lockable object we can synchronize on when creating DynaActionFormClass.
protected transient DynaActionFormClass dynaActionFormClass
protected boolean dynamic
protected java.lang.String name
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
protected boolean restricted
Constructor Detail |
public FormBeanConfig()
Method Detail |
public DynaActionFormClass getDynaActionFormClass()
Return the DynaActionFormClass associated with a DynaActionForm.
java.lang.IllegalArgumentException
- if the ActionForm is not dynamicpublic boolean getDynamic()
public void setDynamic(boolean dynamic)
getDynamic()
is now computed automatically in setType()
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getType()
public void setType(java.lang.String type)
public boolean isRestricted()
Indicates whether a MutableDynaClass is currently restricted.
If so, no changes to the existing registration of property names, data types, readability, or writeability are allowed.
public void setRestricted(boolean restricted)
Set whether a MutableDynaClass is currently restricted.
If so, no changes to the existing registration of property names, data types, readability, or writeability are allowed.
public ActionForm createActionForm(ActionServlet servlet) throws java.lang.IllegalAccessException, java.lang.InstantiationException
Create and return an ActionForm
instance appropriate
to the information in this FormBeanConfig
.
servlet
- The action servletjava.lang.IllegalAccessException
- if the Class or the appropriate
constructor is not accessiblejava.lang.InstantiationException
- if this Class represents an abstract
class, an array class, a primitive type, or void; or if instantiation
fails for some other reasonpublic void addFormPropertyConfig(FormPropertyConfig config)
FormPropertyConfig
instance to the set associated
with this module.config
- The new configuration instance to be addedjava.lang.IllegalArgumentException
- if this property name has already
been definedpublic FormPropertyConfig findFormPropertyConfig(java.lang.String name)
null
.name
- Form property name to find a configuration forpublic FormPropertyConfig[] findFormPropertyConfigs()
public void freeze()
public void removeFormPropertyConfig(FormPropertyConfig config)
config
- FormPropertyConfig instance to be removedpublic java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.Class formBeanClass()
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |