xdoclet.modules.apache.struts

Class ActionFormSubTask

public class ActionFormSubTask extends TemplateSubTask

Generates a Struts ActionForm, based on a POJO. More information on Struts is available on the Struts website , or the ActionForm API .

Version: $Revision: 1.2 $

Author: Matt Raible (matt@raibledesigns.com)

UNKNOWN: April 26, 2004 display-name = "Action Form" name = "actionform" parent = "xdoclet.DocletTask"

Field Summary
protected XTagcurrentFormTag
Form tag being processed right now.
protected static StringDEFAULT_TEMPLATE_FILE
The default template file - struts_form.xdt.
protected StringformClassPattern
The pattern for the form class.
Constructor Summary
ActionFormSubTask()
Describe what the ActionFormActionFormSubTaskstructor does
Method Summary
protected voidengineStarted()
Describe what the method does
protected voidgenerateForClass(XClass clazz)
iterate through all struts:form tags,and produce separate classes
StringgetActionFormClassPattern()
Return the class pattern.
XTaggetCurrentFormTag()
Gets the CurrentFormTag attribute of the ActionFormSubTask object
protected StringgetGeneratedFileName(XClass clazz)
Gets the GeneratedFileName attribute of the ActionFormSubTask object
protected booleanmatchesGenerationRules(XClass clazz)
Returns whether struts form[s] shall be generated for this class
voidsetCurrentFormTag(XTag t)
Sets the CurrentFormTag attribute of the ActionFormSubTask object
voidsetPattern(String newPattern)
Sets the Pattern attribute of the ActionFormSubTask object
voidvalidateOptions()
Called to validate configuration parameters.

Field Detail

currentFormTag

protected XTag currentFormTag
Form tag being processed right now.

DEFAULT_TEMPLATE_FILE

protected static String DEFAULT_TEMPLATE_FILE
The default template file - struts_form.xdt.

formClassPattern

protected String formClassPattern
The pattern for the form class. Defaults to {0}{1}Form if not present.

Constructor Detail

ActionFormSubTask

public ActionFormSubTask()
Describe what the ActionFormActionFormSubTaskstructor does

Method Detail

engineStarted

protected void engineStarted()
Describe what the method does

Throws: XDocletException Describe the exception

generateForClass

protected void generateForClass(XClass clazz)
iterate through all struts:form tags,and produce separate classes

Parameters: clazz Description of Parameter

Throws: XDocletException Description of Exception

getActionFormClassPattern

public String getActionFormClassPattern()
Return the class pattern.

Returns: The ActionFormClassPattern value

getCurrentFormTag

public XTag getCurrentFormTag()
Gets the CurrentFormTag attribute of the ActionFormSubTask object

Returns: The CurrentFormTag value

getGeneratedFileName

protected String getGeneratedFileName(XClass clazz)
Gets the GeneratedFileName attribute of the ActionFormSubTask object

Parameters: clazz Describe what the parameter does

Returns: The GeneratedFileName value

Throws: XDocletException Describe the exception

matchesGenerationRules

protected boolean matchesGenerationRules(XClass clazz)
Returns whether struts form[s] shall be generated for this class

Parameters: clazz Description of Parameter

Returns: is form tag shall be generated

Throws: XDocletException Description of Exception

setCurrentFormTag

public void setCurrentFormTag(XTag t)
Sets the CurrentFormTag attribute of the ActionFormSubTask object

Parameters: t The new CurrentFormTag value

setPattern

public void setPattern(String newPattern)
Sets the Pattern attribute of the ActionFormSubTask object

Parameters: newPattern The new Pattern value

validateOptions

public void validateOptions()
Called to validate configuration parameters.

Throws: XDocletException Description of Exception