org.apache.beehive.netui.compiler.genmodel
Class GenStrutsApp
Object
StrutsElementSupport
StrutsApp
GenStrutsApp
- All Implemented Interfaces:
- ExceptionContainer, ForwardContainer
- Direct Known Subclasses:
- GenSharedFlowStrutsApp
public class GenStrutsApp
- extends StrutsApp
Fields inherited from class StrutsApp |
DUPLICATE_ACTION_COMMENT, NETUI_VALIDATOR_RULES_URI, PAGEFLOW_CONTROLLER_CONFIG_CLASSNAME, PAGEFLOW_REQUESTPROCESSOR_CLASSNAME, STRUTS_CONFIG_EXTENSION, STRUTS_CONFIG_PREFIX, STRUTS_CONFIG_SEPARATOR, STRUTS_VALIDATOR_RULES_URI, STRUTSCONFIG_OUTPUT_DIR, TILES_DEFINITIONS_CONFIG_PROPERTY, TILES_MODULE_AWARE_PROPERTY, TILES_PLUG_IN_CLASSNAME, VALIDATOR_PATHNAMES_PROPERTY, VALIDATOR_PLUG_IN_CLASSNAME, WEBINF_DIR_NAME |
Constructor Summary |
GenStrutsApp(File sourceFile,
ClassDeclaration jclass,
AnnotationProcessorEnvironment env,
FlowControllerInfo fcInfo,
boolean checkOnly)
|
Methods inherited from class StrutsApp |
addActionMapping, addException, addFormBean, addMessageResources, addNewForward, addSetProperty, deleteFormBean, getBeanType, getDefaultMessageResources, getExceptionCatchesList, getFormBean, getFormBeanByActualType, getFormBeans, getFormBeansAsList, getFormBeansMap, getFormNameForType, getFormQualifiedActionPath, getMessageResourcesList, getMultipartHandlerClassName, getOutputFileURI, getSortedActionMappings, getStrutsConfigURI, getWebappRootFromJpf, isReturnToActionDisabled, isReturnToPageDisabled, isSharedFlow, makeFullyQualifiedBeanName, setAdditionalValidatorConfigs, setLongLivedPageFlow, setMultipartHandlerClassName, setNestedPageFlow, setReturnToActionDisabled, setReturnToPageDisabled, setSharedFlow, setSharedFlows, setTilesDefinitionsConfigs, setValidationModel, writeControllerElement, writeTilesInit, writeValidatorInit, writeXml |
Methods inherited from class StrutsElementSupport |
addComment, getAttr, getAttrBool, getClassName, getComment, getDescription, getDisplayName, getIcon, getParentApp, getProperty, setClassName, setComment, setDescription, setDisplayName, setIcon, setParentApp, setProperty |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenStrutsApp
public GenStrutsApp(File sourceFile,
ClassDeclaration jclass,
AnnotationProcessorEnvironment env,
FlowControllerInfo fcInfo,
boolean checkOnly)
throws NoWebInfDirectoryException,
XmlException,
IOException
- Throws:
NoWebInfDirectoryException
XmlException
IOException
recalculateStrutsConfigFile
protected void recalculateStrutsConfigFile()
throws XmlException,
IOException
- Throws:
XmlException
IOException
getMergeFileName
protected String getMergeFileName()
writeToFile
public void writeToFile()
throws NoWebInfDirectoryException,
FileNotFoundException,
IOException,
XmlException
- Throws:
NoWebInfDirectoryException
FileNotFoundException
IOException
XmlException
isStale
public boolean isStale()
throws NoWebInfDirectoryException
- Throws:
NoWebInfDirectoryException
isModuleDeclaredInWebXml
protected boolean isModuleDeclaredInWebXml()
getContainingPackage
protected String getContainingPackage()
isStale
public boolean isStale(File mergeFile)
throws NoWebInfDirectoryException
- Tell whether the struts output file (jpf-struts-config-*.xml) is out of date, based on the
file times of the source file and the (optional) struts-merge file.
- Throws:
NoWebInfDirectoryException
canWrite
public boolean canWrite()
- In some cases, canWrite() does not guarantee that a FileNotFoundException will not
be thrown when trying to write to a file. This method actually tries to overwrite
the file as a test to see whether it's possible.
writeToFile
public void writeToFile(File strutsMergeFile)
throws FileNotFoundException,
IOException,
XmlException,
NoWebInfDirectoryException
- Throws:
FileNotFoundException
IOException
XmlException
NoWebInfDirectoryException
getStrutsConfigFile
public File getStrutsConfigFile()
getMergeFile
public File getMergeFile(String mergeFileName)
throws NoWebInfDirectoryException
- Throws:
NoWebInfDirectoryException
getHeaderComment
protected String getHeaderComment(File mergeFile)
- Overrides:
getHeaderComment
in class StrutsApp
getWebappRoot
public File getWebappRoot()
addForward
public void addForward(ForwardModel newActionForward)
- Implemented for
ForwardContainer
.
- Specified by:
addForward
in interface ForwardContainer
findForward
public ForwardModel findForward(String forwardName)
- Specified by:
findForward
in interface ForwardContainer
writeForwards
public void writeForwards(ForwardDocument.Forward[] existingForwards,
XmlObject xmlForwardContainer)
getForwards
public ForwardModel[] getForwards()
getForwardsAsList
public List getForwardsAsList()
deleteForward
public void deleteForward(ForwardModel forward)