Java Doc for FormBeanConfig.java in  » Web-Framework » struts-1.3.8 » org » apache » struts » config » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Framework » struts 1.3.8 » org.apache.struts.config 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.struts.config.BaseConfig
      org.apache.struts.config.FormBeanConfig

All known Subclasses:   org.apache.struts.webapp.examples.CustomFormBean,  org.apache.struts.action.ActionFormBean,
FormBeanConfig
public class FormBeanConfig extends BaseConfig (Code)

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


version:
   $Rev: 472728 $ $Date: 2006-01-17 07:26:20 -0500 (Tue, 17 Jan 2006)
version:
   $
since:
   Struts 1.1



Field Summary
protected transient  DynaActionFormClassdynaActionFormClass
     The DynaActionFormClass associated with a DynaActionForm.
protected  booleandynamic
    
protected  booleanextensionProcessed
    
protected  HashMapformProperties
     The set of FormProperty elements defining dynamic form properties for this form bean, keyed by property name.
protected  Stringinherit
     The name of the FormBeanConfig that this config inherits configuration information from.
protected  Stringlock
    
protected  Stringname
     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  booleanrestricted
     Is this DynaClass currently restricted (for DynaBeans with a MutableDynaClass).
protected  Stringtype
     The fully qualified Java class name of the implementation class to be used or generated.


Method Summary
public  voidaddFormPropertyConfig(FormPropertyConfig config)
     Add a new FormPropertyConfig instance to the set associated with this module.
public  booleancanReuse(ActionForm form)
    

Checks if the given ActionForm instance is suitable for use as an alternative to calling this FormBeanConfig instance's createActionForm method.


Parameters:
  form - an existing form instance that may be reused.
protected  booleancheckCircularInheritance(ModuleConfig moduleConfig)
    

Traces the hierarchy of this object to check if any of the ancestors is extending this instance.


Parameters:
  moduleConfig - The configuration for the module being configured.
public  ActionFormcreateActionForm(ActionServlet servlet)
    

Create and return an ActionForm instance appropriate to the information in this FormBeanConfig.

Although this method is not formally deprecated yet, where possible, the form which accepts an ActionContext as an argument is preferred, to help sever direct dependencies on the Servlet API.

public  ActionFormcreateActionForm(ActionContext context)
    

Create and return an ActionForm instance appropriate to the information in this FormBeanConfig.

NOTE: If the given ActionContext is not of type ServletActionContext (or a subclass), then the form which is returned will have a null servlet property.

public  FormPropertyConfigfindFormPropertyConfig(String name)
     Return the form property configuration for the specified property name, if any; otherwise return null.
public  FormPropertyConfig[]findFormPropertyConfigs()
     Return the form property configurations for this module.
protected  ClassformBeanClass()
     Return the Class instance for the form bean implementation configured by this FormBeanConfig instance.
public  voidfreeze()
     Freeze the configuration of this component.
public  DynaActionFormClassgetDynaActionFormClass()
    
public  booleangetDynamic()
    
public  StringgetExtends()
    
public  StringgetName()
    
public  StringgetType()
    
protected  voidinheritFormProperties(FormBeanConfig config)
    
public  voidinheritFrom(FormBeanConfig config)
    

Inherit values that have not been overridden from the provided config object.

public  booleanisExtensionProcessed()
    
public  booleanisRestricted()
    
public  voidprocessExtends(ModuleConfig moduleConfig)
    

Inherit configuration information from the FormBeanConfig that this instance is extending.

public  voidremoveFormPropertyConfig(FormPropertyConfig config)
     Remove the specified form property configuration instance.
public  voidsetExtends(String extend)
    
public  voidsetName(String name)
    
public  voidsetRestricted(boolean restricted)
    
public  voidsetType(String type)
    
public  StringtoString()
     Return a String representation of this object.

Field Detail
dynaActionFormClass
protected transient DynaActionFormClass dynaActionFormClass(Code)
The DynaActionFormClass associated with a DynaActionForm.



dynamic
protected boolean dynamic(Code)
Is the form bean class an instance of DynaActionForm with dynamic properties?



extensionProcessed
protected boolean extensionProcessed(Code)
Have the inheritance values for this class been applied?



formProperties
protected HashMap formProperties(Code)
The set of FormProperty elements defining dynamic form properties for this form bean, keyed by property name.



inherit
protected String inherit(Code)
The name of the FormBeanConfig that this config inherits configuration information from.



lock
protected String lock(Code)

The lockable object we can synchronize on when creating DynaActionFormClass.




name
protected String name(Code)
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.



restricted
protected boolean restricted(Code)
Is this DynaClass currently restricted (for DynaBeans with a MutableDynaClass).



type
protected String type(Code)
The fully qualified Java class name of the implementation class to be used or generated.





Method Detail
addFormPropertyConfig
public void addFormPropertyConfig(FormPropertyConfig config)(Code)
Add a new FormPropertyConfig instance to the set associated with this module.
Parameters:
  config - The new configuration instance to be added
throws:
  IllegalArgumentException - if this property name has already beendefined



canReuse
public boolean canReuse(ActionForm form)(Code)

Checks if the given ActionForm instance is suitable for use as an alternative to calling this FormBeanConfig instance's createActionForm method.


Parameters:
  form - an existing form instance that may be reused. true if the given form can be reused as the form for thisconfig.



checkCircularInheritance
protected boolean checkCircularInheritance(ModuleConfig moduleConfig)(Code)

Traces the hierarchy of this object to check if any of the ancestors is extending this instance.


Parameters:
  moduleConfig - The configuration for the module being configured. true if circular inheritance was detected.



createActionForm
public ActionForm createActionForm(ActionServlet servlet) throws IllegalAccessException, InstantiationException(Code)

Create and return an ActionForm instance appropriate to the information in this FormBeanConfig.

Although this method is not formally deprecated yet, where possible, the form which accepts an ActionContext as an argument is preferred, to help sever direct dependencies on the Servlet API. As the ActionContext becomes more familiar in Struts, this method will almost certainly be deprecated.


Parameters:
  servlet - The action servlet ActionForm instance
throws:
  IllegalAccessException - if the Class or the appropriateconstructor is not accessible
throws:
  InstantiationException - if this Class represents an abstractclass, an array class, a primitive type,or void; or if instantiation fails forsome other reason



createActionForm
public ActionForm createActionForm(ActionContext context) throws IllegalAccessException, InstantiationException(Code)

Create and return an ActionForm instance appropriate to the information in this FormBeanConfig.

NOTE: If the given ActionContext is not of type ServletActionContext (or a subclass), then the form which is returned will have a null servlet property. Some of the subclasses of ActionForm included in Struts will later throw a NullPointerException in this case.

TODO: Find a way to control this direct dependency on the Servlet API.


Parameters:
  context - The ActionContext. ActionForm instance
throws:
  IllegalAccessException - if the Class or the appropriateconstructor is not accessible
throws:
  InstantiationException - if this Class represents an abstractclass, an array class, a primitive type,or void; or if instantiation fails forsome other reason



findFormPropertyConfig
public FormPropertyConfig findFormPropertyConfig(String name)(Code)
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()(Code)
Return the form property configurations for this module. If there are none, a zero-length array is returned.



formBeanClass
protected Class formBeanClass()(Code)
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()(Code)
Freeze the configuration of this component.



getDynaActionFormClass
public DynaActionFormClass getDynaActionFormClass()(Code)

Return the DynaActionFormClass associated with a DynaActionForm.


throws:
  IllegalArgumentException - if the ActionForm is not dynamic



getDynamic
public boolean getDynamic()(Code)



getExtends
public String getExtends()(Code)



getName
public String getName()(Code)



getType
public String getType()(Code)



inheritFormProperties
protected void inheritFormProperties(FormBeanConfig config) throws ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException(Code)

Compare the form properties of this bean with that of the given and copy those that are not present.


Parameters:
  config - The form bean config to copy properties from.
See Also:   FormBeanConfig.inheritFrom(FormBeanConfig)



inheritFrom
public void inheritFrom(FormBeanConfig config) throws ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException(Code)

Inherit values that have not been overridden from the provided config object. Subclasses overriding this method should verify that the given parameter is of a class that contains a property it is trying to inherit:

 if (config instanceof MyCustomConfig) {
 MyCustomConfig myConfig =
 (MyCustomConfig) config;
 if (getMyCustomProp() == null) {
 setMyCustomProp(myConfig.getMyCustomProp());
 }
 }
 

If the given config is extending another object, those extensions should be resolved before it's used as a parameter to this method.


Parameters:
  config - The object that this instance will be inheriting itsvalues from.
See Also:   FormBeanConfig.processExtends(ModuleConfig)



isExtensionProcessed
public boolean isExtensionProcessed()(Code)



isRestricted
public boolean isRestricted()(Code)

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.




processExtends
public void processExtends(ModuleConfig moduleConfig) throws ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException(Code)

Inherit configuration information from the FormBeanConfig that this instance is extending. This method verifies that any form bean config object that it inherits from has also had its processExtends() method called.


Parameters:
  moduleConfig - The ModuleConfig that this bean is from.
See Also:   FormBeanConfig.inheritFrom(FormBeanConfig)



removeFormPropertyConfig
public void removeFormPropertyConfig(FormPropertyConfig config)(Code)
Remove the specified form property configuration instance.
Parameters:
  config - FormPropertyConfig instance to be removed



setExtends
public void setExtends(String extend)(Code)



setName
public void setName(String name)(Code)



setRestricted
public void setRestricted(boolean restricted)(Code)

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.




setType
public void setType(String type)(Code)



toString
public String toString()(Code)
Return a String representation of this object.



Fields inherited from org.apache.struts.config.BaseConfig
protected boolean configured(Code)(Java Doc)

Methods inherited from org.apache.struts.config.BaseConfig
protected Properties copyProperties()(Code)(Java Doc)
public void freeze()(Code)(Java Doc)
protected Properties getProperties()(Code)(Java Doc)
public String getProperty(String key)(Code)(Java Doc)
protected void inheritProperties(BaseConfig baseConfig)(Code)(Java Doc)
protected void setProperties(Properties properties)(Code)(Java Doc)
public void setProperty(String key, String value)(Code)(Java Doc)
public void throwIfConfigured()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.