org.codehaus.enunciate.config.war
Class WebAppConfig

java.lang.Object
  extended by org.codehaus.enunciate.config.war.WebAppConfig

public class WebAppConfig
extends java.lang.Object

Configuration for the web app.

Author:
Ryan Heaton

Constructor Summary
WebAppConfig()
           
 
Method Summary
 void addCopyResources(CopyResources copyResources)
          Add a copy resources.
 void addEnvEntry(WebAppResource resource)
           
 void addExcludeLibs(IncludeExcludeLibs excludeLibs)
          Add a exclude jars.
 void addGlobalServletFilter(WebAppComponent filterConfig)
          Add a global servlet filter to be applied to all web service requests.
 void addIncludeLibs(IncludeExcludeLibs includeLibs)
          Add a include jars.
 void addManifestAttribute(java.lang.String section, java.lang.String name, java.lang.String value)
          Adds a manifest entry to this war's manifest.
 void addResourceEnvRef(WebAppResource resource)
           
 void addResourceRef(WebAppResource resource)
           
 void addWebXmlAttribute(java.lang.String name, java.lang.String value)
           
 java.util.List<CopyResources> getCopyResources()
          The resources to copy for this application.
static java.util.jar.Manifest getDefaultManifest()
          Get the default manifest for a war file.
 java.lang.String getDir()
          The directory where to build the (expanded) app.
 java.util.List<WebAppResource> getEnvEntries()
          Web app env entries.
 java.util.List<IncludeExcludeLibs> getExcludeLibs()
          Get the list of exclude jars.
 java.util.List<WebAppComponent> getGlobalServletFilters()
          The global servlet filters for this application.
 java.util.List<IncludeExcludeLibs> getIncludeLibs()
          Get the list of include jars.
 java.util.jar.Manifest getManifest()
          The manifest for this war.
 java.lang.String getMergeWebXML()
          The web xml file to merge.
 java.net.URL getMergeWebXMLURL()
          The web xml file to merge.
 java.lang.String getPostBase()
          The base of the war directory after copying enunciate-specific files.
 java.lang.String getPreBase()
          The base of the war directory before copying enunciate-specific files.
 java.util.List<WebAppResource> getResourceEnvRefs()
          Web app resource env entries.
 java.util.List<WebAppResource> getResourceRefs()
          Web app resource entries.
 java.lang.String getWar()
          The war file.
 java.util.Map<java.lang.String,java.lang.String> getWebXmlAttributes()
           
 java.lang.String getWebXMLTransform()
          The (optional) stylesheet transformation through which to pass the generated web.xml file.
 java.net.URL getWebXMLTransformURL()
          The (optional) stylesheet transformation through which to pass the generated web.xml file.
 boolean isDisabled()
          Whether the application assembly is disabled.
 boolean isDoCompile()
          whether this module should take on the responsibility of compiling the server-side classes.
 boolean isDoLibCopy()
          whether this module should take on the responsibility of copying libraries to WEB-INF/lib.
 boolean isDoPackage()
          whether this module should take on the responsibility of packaging (zipping) up the war
 boolean isExcludeDefaultLibs()
          Whether to exclude the default libs.
 boolean isIncludeClasspathLibs()
          Whether to include the default libs.
 void setDir(java.lang.String dir)
          The directory where to build the (expanded) app.
 void setDisabled(boolean disabled)
          Whether the application assembly is disabled.
 void setDoCompile(boolean doCompile)
          whether this module should take on the responsibility of compiling the server-side classes
 void setDoLibCopy(boolean doLibCopy)
          whether this module should take on the responsibility of copying libraries to WEB-INF/lib
 void setDoPackage(boolean doPackage)
          whether this module should take on the responsibility of packaging (zipping) up the war
 void setExcludeDefaultLibs(boolean excludeDefaultLibs)
          Whether to exclude the default libs.
 void setExludeDefaultLibs(boolean excludeDefaultLibs)
          Whether to exclude the default libs.
 void setIncludeClasspathLibs(boolean includeClasspathLibs)
          Whether to include the default libs.
 void setMergeWebXML(java.lang.String mergeWebXML)
          The web xml file to merge.
 void setMergeWebXMLURL(java.net.URL mergeWebXMLURL)
          The web xml file to merge.
 void setPostBase(java.lang.String postBase)
          The base of the war directory after copying enunciate-specific files.
 void setPreBase(java.lang.String preBase)
          The base of the war directory before copying enunciate-specific files.
 void setWar(java.lang.String war)
          The war file.
 void setWebXMLTransform(java.lang.String stylesheet)
          The (optional) stylesheet transformation through which to pass the generated web.xml file.
 void setWebXMLTransformURL(java.net.URL stylesheet)
          The (optional) stylesheet transformation through which to pass the generated web.xml file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebAppConfig

public WebAppConfig()
Method Detail

isDisabled

public boolean isDisabled()
Whether the application assembly is disabled.

Returns:
Whether the application assembly is disabled.

setDisabled

public void setDisabled(boolean disabled)
Whether the application assembly is disabled.

Parameters:
disabled - Whether the application assembly is disabled.

getDir

public java.lang.String getDir()
The directory where to build the (expanded) app.

Returns:
The directory where to build the (expanded) app.

setDir

public void setDir(java.lang.String dir)
The directory where to build the (expanded) app.

Parameters:
dir - The directory where to build the (expanded) app.

getWar

public java.lang.String getWar()
The war file.

Returns:
The war file.

setWar

public void setWar(java.lang.String war)
The war file.

Parameters:
war - The war file.

isIncludeClasspathLibs

public boolean isIncludeClasspathLibs()
Whether to include the default libs.

Returns:
Whether to include the default libs.

setIncludeClasspathLibs

public void setIncludeClasspathLibs(boolean includeClasspathLibs)
Whether to include the default libs.

Parameters:
includeClasspathLibs - Whether to include the default libs.

isExcludeDefaultLibs

public boolean isExcludeDefaultLibs()
Whether to exclude the default libs.

Returns:
Whether to exclude the default libs.

isDoCompile

public boolean isDoCompile()
whether this module should take on the responsibility of compiling the server-side classes.

Returns:
whether this module should take on the responsibility of compiling the server-side classes

setDoCompile

public void setDoCompile(boolean doCompile)
whether this module should take on the responsibility of compiling the server-side classes

Parameters:
doCompile - whether this module should take on the responsibility of compiling the server-side classes

isDoLibCopy

public boolean isDoLibCopy()
whether this module should take on the responsibility of copying libraries to WEB-INF/lib.

Returns:
whether this module should take on the responsibility of copying libraries to WEB-INF/lib

setDoLibCopy

public void setDoLibCopy(boolean doLibCopy)
whether this module should take on the responsibility of copying libraries to WEB-INF/lib

Parameters:
doLibCopy - whether this module should take on the responsibility of copying libraries to WEB-INF/lib

isDoPackage

public boolean isDoPackage()
whether this module should take on the responsibility of packaging (zipping) up the war

Returns:
whether this module should take on the responsibility of packaging (zipping) up the war

setDoPackage

public void setDoPackage(boolean doPackage)
whether this module should take on the responsibility of packaging (zipping) up the war

Parameters:
doPackage - whether this module should take on the responsibility of packaging (zipping) up the war

setExcludeDefaultLibs

public void setExcludeDefaultLibs(boolean excludeDefaultLibs)
Whether to exclude the default libs.

Parameters:
excludeDefaultLibs - Whether to exclude the default libs.

setExludeDefaultLibs

public void setExludeDefaultLibs(boolean excludeDefaultLibs)
Whether to exclude the default libs. (Support for backwards-compatability to account for a typo).

Parameters:
excludeDefaultLibs - Whether to exclude the default libs.

addExcludeLibs

public void addExcludeLibs(IncludeExcludeLibs excludeLibs)
Add a exclude jars.

Parameters:
excludeLibs - The exclude jars to add.

getExcludeLibs

public java.util.List<IncludeExcludeLibs> getExcludeLibs()
Get the list of exclude jars.

Returns:
The list of exclude jars.

addIncludeLibs

public void addIncludeLibs(IncludeExcludeLibs includeLibs)
Add a include jars.

Parameters:
includeLibs - The include jars to add.

getIncludeLibs

public java.util.List<IncludeExcludeLibs> getIncludeLibs()
Get the list of include jars.

Returns:
The list of include jars.

getWebXMLTransformURL

public java.net.URL getWebXMLTransformURL()
The (optional) stylesheet transformation through which to pass the generated web.xml file.

Returns:
The stylesheet transformation through which to pass the generated web.xml file.

setWebXMLTransformURL

public void setWebXMLTransformURL(java.net.URL stylesheet)
The (optional) stylesheet transformation through which to pass the generated web.xml file.

Parameters:
stylesheet - The stylesheet transformation through which to pass the generated web.xml file.

getWebXMLTransform

public java.lang.String getWebXMLTransform()
The (optional) stylesheet transformation through which to pass the generated web.xml file.

Returns:
The (optional) stylesheet transformation through which to pass the generated web.xml file.

setWebXMLTransform

public void setWebXMLTransform(java.lang.String stylesheet)
                        throws java.net.MalformedURLException
The (optional) stylesheet transformation through which to pass the generated web.xml file.

Parameters:
stylesheet - The stylesheet transformation through which to pass the generated web.xml file.
Throws:
java.net.MalformedURLException

getMergeWebXMLURL

public java.net.URL getMergeWebXMLURL()
The web xml file to merge.

Returns:
The web xml file to merge.

setMergeWebXMLURL

public void setMergeWebXMLURL(java.net.URL mergeWebXMLURL)
The web xml file to merge.

Parameters:
mergeWebXMLURL - The web xml file to merge.

getMergeWebXML

public java.lang.String getMergeWebXML()
The web xml file to merge.

Returns:
The web xml file to merge.

setMergeWebXML

public void setMergeWebXML(java.lang.String mergeWebXML)
                    throws java.net.MalformedURLException
The web xml file to merge.

Parameters:
mergeWebXML - The web xml file to merge.
Throws:
java.net.MalformedURLException

getPreBase

public java.lang.String getPreBase()
The base of the war directory before copying enunciate-specific files.

Returns:
The base of the war directory before copying enunciate-specific files.

setPreBase

public void setPreBase(java.lang.String preBase)
The base of the war directory before copying enunciate-specific files.

Parameters:
preBase - The base of the war directory before copying enunciate-specific files.

getPostBase

public java.lang.String getPostBase()
The base of the war directory after copying enunciate-specific files.

Returns:
The base of the war directory after copying enunciate-specific files.

setPostBase

public void setPostBase(java.lang.String postBase)
The base of the war directory after copying enunciate-specific files.

Parameters:
postBase - The base of the war directory after copying enunciate-specific files.

getManifest

public java.util.jar.Manifest getManifest()
The manifest for this war.

Returns:
The manifest for this war.

addManifestAttribute

public void addManifestAttribute(java.lang.String section,
                                 java.lang.String name,
                                 java.lang.String value)
Adds a manifest entry to this war's manifest.

Parameters:
section - The section. If null, the main section is assumed.
name - The name of the attribute.
value - The value of the attribute.

getDefaultManifest

public static java.util.jar.Manifest getDefaultManifest()
Get the default manifest for a war file.

Returns:
The default manifest for a war file.

getCopyResources

public java.util.List<CopyResources> getCopyResources()
The resources to copy for this application.

Returns:
The resources to copy for this application.

addCopyResources

public void addCopyResources(CopyResources copyResources)
Add a copy resources.

Parameters:
copyResources - The copy resources to add.

getGlobalServletFilters

public java.util.List<WebAppComponent> getGlobalServletFilters()
The global servlet filters for this application.

Returns:
The global servlet filters for this application.

addGlobalServletFilter

public void addGlobalServletFilter(WebAppComponent filterConfig)
Add a global servlet filter to be applied to all web service requests.

Parameters:
filterConfig - The filter configuration.

getEnvEntries

public java.util.List<WebAppResource> getEnvEntries()
Web app env entries.

Returns:
Web app env entries.

addEnvEntry

public void addEnvEntry(WebAppResource resource)

getResourceEnvRefs

public java.util.List<WebAppResource> getResourceEnvRefs()
Web app resource env entries.

Returns:
Web app resource env entries.

addResourceEnvRef

public void addResourceEnvRef(WebAppResource resource)

getResourceRefs

public java.util.List<WebAppResource> getResourceRefs()
Web app resource entries.

Returns:
Web app resource entries.

addResourceRef

public void addResourceRef(WebAppResource resource)

getWebXmlAttributes

public java.util.Map<java.lang.String,java.lang.String> getWebXmlAttributes()

addWebXmlAttribute

public void addWebXmlAttribute(java.lang.String name,
                               java.lang.String value)