org.jboss.web
Class WebApplication

java.lang.Object
  extended by org.jboss.web.WebApplication

public class WebApplication
extends Object

A WebApplication represents the information for a war deployment.

Version:
$Revision: 83775 $
Author:
Scott.Stark@jboss.org, adrian@jboss.org
See Also:
AbstractWebContainer

Field Summary
protected  String canonicalName
           
protected  ClassLoader classLoader
          Class loader of this application
protected  Object data
          Arbitary data object for storing application specific data
protected  String defaultSecurityDomain
          The default security-domain name to use
protected  Object deployerConfig
          Deployer config bean
protected  String domain
          The jmx domain of the web container
protected  boolean java2ClassLoadingCompliance
          The parent class loader first model flag
protected  boolean lenientEjbLink
          If true, ejb-links that don't resolve don't cause an error (fallback to jndi-name)
protected  org.jboss.metadata.web.jboss.JBossWebMetaData metaData
          The web app metadata from the web.xml and jboss-web.xml descriptors
protected  String name
          name of this application
protected  boolean unpackWars
          A flag indicating if war archives should be unpacked
protected  URL url
          URL where this application was deployed from
protected  HashMap vhostToHostNames
           
 
Constructor Summary
WebApplication()
          Create an empty WebApplication instance
WebApplication(org.jboss.metadata.web.jboss.JBossWebMetaData metaData)
          Create a WebApplication instance with with given web-app metadata.
WebApplication(String name, URL url, ClassLoader classLoader)
          Create a WebApplication instance with with given name, url and class loader.
 
Method Summary
 Object getAppData()
           
 String getCanonicalName()
           
 ClassLoader getClassLoader()
          Get the class loader of this WebApplication.
 String getDefaultSecurityDomain()
          Get the default security domain implementation to use if a war does not declare a security-domain.
 Object getDeployerConfig()
           
 org.jboss.deployers.structure.spi.DeploymentUnit getDeploymentUnit()
           
 String getDomain()
           
 boolean getJava2ClassLoadingCompliance()
          Get the flag indicating if the normal Java2 parent first class loading model should be used over the servlet 2.3 web container first model.
 boolean getLenientEjbLink()
          Get the flag indicating if ejb-link errors should be ignored in favour of trying the jndi-name in jboss-web.xml
 org.jboss.metadata.web.jboss.JBossWebMetaData getMetaData()
          Getter for property metaData.
 String getName()
          Get the name of this WebApplication.
 boolean getUnpackWars()
          Get the flag indicating if war archives should be unpacked.
 URL getURL()
          Get the URL from which this WebApplication was deployed
 Map getVhostToHostNames()
           
 void setAppData(Object data)
           
 void setCanonicalName(String canonicalName)
           
 void setClassLoader(ClassLoader classLoader)
          Set the class loader of this WebApplication.
 void setDefaultSecurityDomain(String defaultSecurityDomain)
          Set the default security domain implementation to use if a war does not declare a security-domain.
 void setDeployerConfig(Object config)
           
 void setDeploymentUnit(org.jboss.deployers.structure.spi.DeploymentUnit unit)
           
 void setDomain(String domain)
           
 void setJava2ClassLoadingCompliance(boolean flag)
          Set the flag indicating if the normal Java2 parent first class loading model should be used over the servlet 2.3 web container first model.
 void setLenientEjbLink(boolean flag)
          Set the flag indicating if ejb-link errors should be ignored in favour of trying the jndi-name in jboss-web.xml
 void setMetaData(org.jboss.metadata.web.jboss.JBossWebMetaData metaData)
          Setter for property metaData.
 void setName(String name)
          Set the name of this WebApplication.
 void setUnpackWars(boolean flag)
          Get the flag indicating if war archives should be unpacked.
 void setURL(URL url)
          Set the URL from which this WebApplication was deployed
 void setVhostToHostNames(Map map)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

classLoader

protected ClassLoader classLoader
Class loader of this application


name

protected String name
name of this application


canonicalName

protected String canonicalName

url

protected URL url
URL where this application was deployed from


metaData

protected org.jboss.metadata.web.jboss.JBossWebMetaData metaData
The web app metadata from the web.xml and jboss-web.xml descriptors


data

protected Object data
Arbitary data object for storing application specific data


domain

protected String domain
The jmx domain of the web container


java2ClassLoadingCompliance

protected boolean java2ClassLoadingCompliance
The parent class loader first model flag


unpackWars

protected boolean unpackWars
A flag indicating if war archives should be unpacked


lenientEjbLink

protected boolean lenientEjbLink
If true, ejb-links that don't resolve don't cause an error (fallback to jndi-name)


defaultSecurityDomain

protected String defaultSecurityDomain
The default security-domain name to use


vhostToHostNames

protected HashMap vhostToHostNames

deployerConfig

protected Object deployerConfig
Deployer config bean

Constructor Detail

WebApplication

public WebApplication()
Create an empty WebApplication instance


WebApplication

public WebApplication(org.jboss.metadata.web.jboss.JBossWebMetaData metaData)
Create a WebApplication instance with with given web-app metadata.

Parameters:
metaData - the web-app metadata containing the web.xml and jboss-web.xml descriptor metadata.

WebApplication

public WebApplication(String name,
                      URL url,
                      ClassLoader classLoader)
Create a WebApplication instance with with given name, url and class loader.

Parameters:
name - name of this application
url - url where this application was deployed from
classLoader - Class loader of this application
Method Detail

getDeploymentUnit

public org.jboss.deployers.structure.spi.DeploymentUnit getDeploymentUnit()

setDeploymentUnit

public void setDeploymentUnit(org.jboss.deployers.structure.spi.DeploymentUnit unit)

getClassLoader

public ClassLoader getClassLoader()
Get the class loader of this WebApplication.

Returns:
The ClassLoader instance of the web application

setClassLoader

public void setClassLoader(ClassLoader classLoader)
Set the class loader of this WebApplication.

Parameters:
classLoader - The ClassLoader instance for the web application

getName

public String getName()
Get the name of this WebApplication.

Returns:
String name of the web application

setName

public void setName(String name)
Set the name of this WebApplication.

Parameters:
name - of the web application

getCanonicalName

public String getCanonicalName()

setCanonicalName

public void setCanonicalName(String canonicalName)

getURL

public URL getURL()
Get the URL from which this WebApplication was deployed

Returns:
URL where this application was deployed from

setURL

public void setURL(URL url)
Set the URL from which this WebApplication was deployed

Parameters:
url - URL where this application was deployed from

getMetaData

public org.jboss.metadata.web.jboss.JBossWebMetaData getMetaData()
Getter for property metaData.

Returns:
Value of property metaData.

setMetaData

public void setMetaData(org.jboss.metadata.web.jboss.JBossWebMetaData metaData)
Setter for property metaData.

Parameters:
metaData - New value of property metaData.

getAppData

public Object getAppData()

setAppData

public void setAppData(Object data)

getDomain

public String getDomain()

setDomain

public void setDomain(String domain)

getJava2ClassLoadingCompliance

public boolean getJava2ClassLoadingCompliance()
Get the flag indicating if the normal Java2 parent first class loading model should be used over the servlet 2.3 web container first model.

Returns:
true for parent first, false for the servlet 2.3 model

setJava2ClassLoadingCompliance

public void setJava2ClassLoadingCompliance(boolean flag)
Set the flag indicating if the normal Java2 parent first class loading model should be used over the servlet 2.3 web container first model.

Parameters:
flag - true for parent first, false for the servlet 2.3 model

getUnpackWars

public boolean getUnpackWars()
Get the flag indicating if war archives should be unpacked. This may need to be set to false as long extraction paths under deploy can show up as deployment failures on some platforms.

Returns:
true is war archives should be unpacked

setUnpackWars

public void setUnpackWars(boolean flag)
Get the flag indicating if war archives should be unpacked. This may need to be set to false as long extraction paths under deploy can show up as deployment failures on some platforms.

Parameters:
flag - , true is war archives should be unpacked

getLenientEjbLink

public boolean getLenientEjbLink()
Get the flag indicating if ejb-link errors should be ignored in favour of trying the jndi-name in jboss-web.xml

Returns:
a boolean value

setLenientEjbLink

public void setLenientEjbLink(boolean flag)
Set the flag indicating if ejb-link errors should be ignored in favour of trying the jndi-name in jboss-web.xml


getDefaultSecurityDomain

public String getDefaultSecurityDomain()
Get the default security domain implementation to use if a war does not declare a security-domain.

Returns:
jndi name of the security domain binding to use.

setDefaultSecurityDomain

public void setDefaultSecurityDomain(String defaultSecurityDomain)
Set the default security domain implementation to use if a war does not declare a security-domain.

Parameters:
defaultSecurityDomain - - jndi name of the security domain binding to use.

getVhostToHostNames

public Map getVhostToHostNames()

setVhostToHostNames

public void setVhostToHostNames(Map map)

getDeployerConfig

public Object getDeployerConfig()

setDeployerConfig

public void setDeployerConfig(Object config)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.