org.sandev.generator
Class WebShellGeneratorBase

java.lang.Object
  extended byorg.sandev.generator.GeneratorCommon
      extended byorg.sandev.generator.WebShellGeneratorBase
Direct Known Subclasses:
WebAppShellGenerator, WebServiceShellGenerator

public class WebShellGeneratorBase
extends org.sandev.generator.GeneratorCommon

Common methods used for all web shell generators.


Field Summary
 
Fields inherited from class org.sandev.generator.GeneratorCommon
CONTEXT_CONFIGURATION, CONTEXT_CONTROL, CONTEXT_FRAMEWORK, CONTEXT_MESSAGING, CONTEXT_PERSISTENCE, CONTEXT_UI, DEFAULT_LINE_LENGTH, MESSAGE_INTERFACES
 
Constructor Summary
WebShellGeneratorBase()
           
 
Method Summary
protected  boolean buildFileChanged(java.io.File projDir, java.io.File srcfile)
          Return true if the buildfile for the given project directory is newer than the given source file.
protected  void removeWebInf(org.sandev.sandbuild.SandUIDeployment uideploy, java.io.File projDir, java.lang.String projName)
          Remove the web.xml file from the WEB-INF directory.
protected  void removeWebShellSrc(org.sandev.sandbuild.SandUIDeployment uideploy, java.io.File projDir, java.lang.String projName)
          Remove the generated shell servlet.
protected  void verifySubProjectDir(java.io.File projDir, java.lang.String projName)
          Verify that the webapp subdir exists for this project.
protected  void verifyWebInf(org.sandev.sandbuild.SandUIDeployment uideploy, java.io.File projDir, java.lang.String projName, boolean changed)
          Make sure the WEB-INF directory exists and write the web.xml
protected  void verifyWebShellSrc(org.sandev.sandbuild.SandUIDeployment uideploy, java.io.File projDir, java.lang.String projName, boolean changed)
          Make sure we have a src directory, and write the source for the shell servlet if it is older than the defining build file.
 
Methods inherited from class org.sandev.generator.GeneratorCommon
capitalize, copyfile, deletefile, filterHTMLLine, getDeclaredFields, getFields, getInheritanceHierarchy, getLastAppProject, getLastUtilDir, getLongInstanceName, getPrintStream, getSandProject, getShortInstanceName, getUtilPackage, getVisibleFields, isBasic, isLongReferenceArray, isMessageInterface, isParentAbstract, isPrimitive, isRootStruct, isVowel, log, nextToken, pluralize, rangeEscape, removePlatformDecls, trackFileDelete, trackFileWrite, uncapitalize, writeDefaultCtor, writeDescription, writeHTMLContents, writeMessageImports, writeSectionName, writeStandardCommentID, writeXHTMLFooter, writeXHTMLFooter, writeXHTMLHeader, writeXHTMLHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebShellGeneratorBase

public WebShellGeneratorBase()
Method Detail

verifyWebShellSrc

protected void verifyWebShellSrc(org.sandev.sandbuild.SandUIDeployment uideploy,
                                 java.io.File projDir,
                                 java.lang.String projName,
                                 boolean changed)
                          throws org.sandev.sandbuild.SandGeneratorException
Make sure we have a src directory, and write the source for the shell servlet if it is older than the defining build file.

Throws:
org.sandev.sandbuild.SandGeneratorException

verifyWebInf

protected void verifyWebInf(org.sandev.sandbuild.SandUIDeployment uideploy,
                            java.io.File projDir,
                            java.lang.String projName,
                            boolean changed)
                     throws org.sandev.sandbuild.SandGeneratorException
Make sure the WEB-INF directory exists and write the web.xml

Throws:
org.sandev.sandbuild.SandGeneratorException

removeWebShellSrc

protected void removeWebShellSrc(org.sandev.sandbuild.SandUIDeployment uideploy,
                                 java.io.File projDir,
                                 java.lang.String projName)
                          throws org.sandev.sandbuild.SandGeneratorException
Remove the generated shell servlet. Leave the directories intact.

Throws:
org.sandev.sandbuild.SandGeneratorException

removeWebInf

protected void removeWebInf(org.sandev.sandbuild.SandUIDeployment uideploy,
                            java.io.File projDir,
                            java.lang.String projName)
                     throws org.sandev.sandbuild.SandGeneratorException
Remove the web.xml file from the WEB-INF directory.

Throws:
org.sandev.sandbuild.SandGeneratorException

verifySubProjectDir

protected void verifySubProjectDir(java.io.File projDir,
                                   java.lang.String projName)
Verify that the webapp subdir exists for this project.


buildFileChanged

protected boolean buildFileChanged(java.io.File projDir,
                                   java.io.File srcfile)
                            throws org.sandev.sandbuild.SandGeneratorException
Return true if the buildfile for the given project directory is newer than the given source file.

Throws:
org.sandev.sandbuild.SandGeneratorException