org.jboss.metadata
Class WebMetaData

java.lang.Object
  extended byorg.jboss.metadata.MetaData (src) 
      extended byorg.jboss.metadata.WebMetaData
All Implemented Interfaces:
java.lang.Cloneable, XmlLoadable (src)

public class WebMetaData
extends MetaData (src)

A representation of the web.xml and jboss-web.xml deployment descriptors as used by the AbstractWebContainer web container integration support class.

See Also:
XmlLoadable (src) , AbstractWebContainer (src)

Field Summary
static int REPLICATION_GRANULARITY_ATTRIBUTE
           
static int REPLICATION_GRANULARITY_FIELD
           
static int REPLICATION_GRANULARITY_SESSION
          Specify the session replication granularity level: session --- whole session level, attribute --- per attribute change, field --- fine grained user object level.
static int REPLICATION_TYPE_ASYNC
           
static int REPLICATION_TYPE_SYNC
           
static int SESSION_COOKIES_DEFAULT
           
static int SESSION_COOKIES_DISABLED
           
static int SESSION_COOKIES_ENABLED
           
static int SESSION_INVALIDATE_ACCESS
           
static int SESSION_INVALIDATE_SET
           
static int SESSION_INVALIDATE_SET_AND_GET
           
static int SESSION_INVALIDATE_SET_AND_NON_PRIMITIVE_GET
           
 
Fields inherited from class org.jboss.metadata.MetaData (src)
TX_MANDATORY, TX_NEVER, TX_NOT_SUPPORTED, TX_REQUIRED, TX_REQUIRES_NEW, TX_SUPPORTS, TX_UNKNOWN
 
Constructor Summary
WebMetaData()
           
 
Method Summary
 java.lang.ClassLoader getContextLoader()
           
 java.lang.String getContextRoot()
          This the the jboss-web.xml descriptor context-root and it is only meaningful if a war is deployed outside of an ear.
 java.util.Collection getDepends()
          Access the web application depends
 boolean getDistributable()
          The distributable flag.
 java.util.Iterator getEjbLocalReferences()
          Return an iterator of the ejb-local-ref mappings.
 java.util.Iterator getEjbReferences()
          Return an iterator of the ejb-ref mappings.
 java.lang.ClassLoader getENCLoader()
           
 java.util.Iterator getEnvironmentEntries()
          Return an iterator of the env-entry mappings.
 int getInvalidateSessionPolicy()
           
 java.lang.String getJaccContextID()
           
 boolean getJava2ClassLoadingCompliance()
          A flag indicating if the normal Java2 parent first class loading model should be used over the servlet 2.3 web container first model.
 LoaderRepositoryFactory.LoaderRepositoryConfig (src) getLoaderConfig()
           
 MessageDestinationMetaData (src) getMessageDestination(java.lang.String name)
          Get a message destination metadata
 java.util.Iterator getMessageDestinationReferences()
          Return an iterator of message-destination-refs.
 int getReplicationGranularity()
           
 int getReplicationType()
           
 java.util.Iterator getResourceEnvReferences()
          Return an iterator of the resource-ref mappings.
 java.util.Iterator getResourceReferences()
          Return an iterator of the resource-ref mappings.
 java.util.Map getRunAsIdentity()
           
 RunAsIdentity (src) getRunAsIdentity(java.lang.String servletName)
          Access the RunAsIdentity associated with the given servlet
 java.util.Iterator getSecurityContraints()
          Get the security-constraint settings
 java.lang.String getSecurityDomain()
          Return the optional security-domain jboss-web.xml element.
 java.util.Set getSecurityRoleNames()
          Get the security-role names from the web.xml descriptor
 java.util.Set getSecurityRoleNamesByPrincipal(java.lang.String userName)
           
 java.util.Map getSecurityRoleRefs()
           
 java.util.Map getSecurityRoles()
          Get the optional map of security role/user mapping.
 java.util.Iterator getServiceReferences()
          Return an iterator of the service-ref mappings.
 java.util.HashMap getServletMappings()
          Get the servlet-name values from the web.xml descriptor
 java.util.Set getServletNames()
          Get the servlet-name values from the web.xml descriptor
 int getSessionCookies()
           
 java.util.Iterator getVirtualHosts()
          The servlet container virtual host the war should be deployed into.
 java.lang.String getWsdlPublishLocationByName(java.lang.String name)
          Get the optional wsdl publish location from jboss-web.xml.
protected  void importJBossWebXml(org.w3c.dom.Element jbossWeb)
          Parse the elements of the jboss-web element used by the integration layer.
protected  void importWebXml(org.w3c.dom.Element webApp)
          Parse the elements of the web-app element used by the integration layer.
 void importXml(org.w3c.dom.Element element)
          Imports either the jboss or ejb-jar from the given element.
 boolean isFlushOnSessionInvalidation()
          The flag indicating whether the associated security domain cache should be flushed when the session is invalidated.
 boolean isWebServiceDeployment()
           
 void mergeSecurityRoles(java.util.Map applRoles)
          Merge the security role/principal mapping defined in jboss-web.xml with the one defined at jboss-app.xml.
 void setContextLoader(java.lang.ClassLoader cxtLoader)
          Make sure this is called during performDeploy
 void setContextRoot(java.lang.String contextRoot)
           
 void setDepends(java.util.Collection depends)
           
 void setDistributable(boolean distributable)
          Mark the web-app as distributable
 void setEjbLocalReferences(java.util.Map ejbReferences)
           
 void setEjbReferences(java.util.Map ejbReferences)
           
 void setENCLoader(java.lang.ClassLoader encLoader)
           
 void setEnvironmentEntries(java.util.Collection environmentEntries)
           
 void setFlushOnSessionInvalidation(boolean flag)
          The flag indicating whether the associated security domain cache should be flushed when the session is invalidated.
 void setInvalidateSessionPolicy(int invalidateSessionPolicy)
           
 void setJaccContextID(java.lang.String jaccContextID)
           
 void setJava2ClassLoadingCompliance(boolean flag)
           
 void setLoaderConfig(LoaderRepositoryFactory.LoaderRepositoryConfig (src)  loaderConfig)
           
 void setMessageDestination(java.util.Map messageDestinations)
           
 void setMessageDestinationReferences(java.util.Map messageDestinationReferences)
           
 void setReplicationGranularity(int replicationGranularity)
           
 void setResourceClassLoader(java.net.URLClassLoader resourceCl)
          Set the ClassLoader to load additional resources
 void setResourceEnvReferences(java.util.Map resourceReferences)
           
 void setResourceReferences(java.util.Map resourceReferences)
           
 void setRunAsIdentity(java.util.Map runAsIdentity)
          The jboss-web.xml servlet/run-as
 void setSecurityConstraints(java.util.Collection securityContraints)
           
 void setSecurityDomain(java.lang.String securityDomain)
          Set the security domain for this web application
 void setSecurityRoleReferences(java.util.Map securityRoleReferences)
           
 void setSecurityRoles(java.util.Map securityRoles)
           
 void setServiceReferences(java.util.Map serviceReferences)
           
 void setServletMappings(java.util.Map servletMappings)
          servlet-mapping/serlvet-name to url-pattern mapping
 void setSessionCookies(int sessionCookies)
           
 void setVirtualHosts(java.util.Collection virtualHosts)
           
 void setWebServiceDeployment(boolean webServiceDeployment)
           
 void setWsdlPublishLocationMap(java.util.Map wsdlPublishLocationMap)
           
 
Methods inherited from class org.jboss.metadata.MetaData (src)
clone, getChildrenByTagName, getElementAttribute, getElementContent, getElementContent, getFirstElementContent, getOptionalChild, getOptionalChild, getOptionalChildBooleanContent, getOptionalChildBooleanContent, getOptionalChildContent, getOptionalChildContent, getUniqueChild, getUniqueChildContent, importEjbJarXml, importJbossXml, jdk13Enabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_INVALIDATE_ACCESS

public static final int SESSION_INVALIDATE_ACCESS
See Also:
Constant Field Values (src)

SESSION_INVALIDATE_SET_AND_GET

public static final int SESSION_INVALIDATE_SET_AND_GET
See Also:
Constant Field Values (src)

SESSION_INVALIDATE_SET_AND_NON_PRIMITIVE_GET

public static final int SESSION_INVALIDATE_SET_AND_NON_PRIMITIVE_GET
See Also:
Constant Field Values (src)

SESSION_INVALIDATE_SET

public static final int SESSION_INVALIDATE_SET
See Also:
Constant Field Values (src)

REPLICATION_TYPE_SYNC

public static final int REPLICATION_TYPE_SYNC
See Also:
Constant Field Values (src)

REPLICATION_TYPE_ASYNC

public static final int REPLICATION_TYPE_ASYNC
See Also:
Constant Field Values (src)

REPLICATION_GRANULARITY_SESSION

public static final int REPLICATION_GRANULARITY_SESSION
Specify the session replication granularity level: session --- whole session level, attribute --- per attribute change, field --- fine grained user object level.

See Also:
Constant Field Values (src)

REPLICATION_GRANULARITY_ATTRIBUTE

public static final int REPLICATION_GRANULARITY_ATTRIBUTE
See Also:
Constant Field Values (src)

REPLICATION_GRANULARITY_FIELD

public static final int REPLICATION_GRANULARITY_FIELD
See Also:
Constant Field Values (src)

SESSION_COOKIES_DEFAULT

public static final int SESSION_COOKIES_DEFAULT
See Also:
Constant Field Values (src)

SESSION_COOKIES_ENABLED

public static final int SESSION_COOKIES_ENABLED
See Also:
Constant Field Values (src)

SESSION_COOKIES_DISABLED

public static final int SESSION_COOKIES_DISABLED
See Also:
Constant Field Values (src)
Constructor Detail

WebMetaData

public WebMetaData()
Method Detail

setResourceClassLoader

public void setResourceClassLoader(java.net.URLClassLoader resourceCl)
Set the ClassLoader to load additional resources


getEnvironmentEntries

public java.util.Iterator getEnvironmentEntries()
Return an iterator of the env-entry mappings.

Returns:
Iterator of EnvEntryMetaData objects.

setEnvironmentEntries

public void setEnvironmentEntries(java.util.Collection environmentEntries)
Parameters:
environmentEntries - - Collection

getEjbReferences

public java.util.Iterator getEjbReferences()
Return an iterator of the ejb-ref mappings.

Returns:
Iterator of EjbRefMetaData objects.

setEjbReferences

public void setEjbReferences(java.util.Map ejbReferences)
Parameters:
ejbReferences - - Map

getEjbLocalReferences

public java.util.Iterator getEjbLocalReferences()
Return an iterator of the ejb-local-ref mappings.

Returns:
Iterator of EjbLocalRefMetaData objects.

setEjbLocalReferences

public void setEjbLocalReferences(java.util.Map ejbReferences)
Parameters:
ejbReferences - - Map

getResourceReferences

public java.util.Iterator getResourceReferences()
Return an iterator of the resource-ref mappings.

Returns:
Iterator of ResourceRefMetaData objects.

setResourceReferences

public void setResourceReferences(java.util.Map resourceReferences)
Parameters:
resourceReferences - - Map

getResourceEnvReferences

public java.util.Iterator getResourceEnvReferences()
Return an iterator of the resource-ref mappings.

Returns:
Iterator of ResourceEnvRefMetaData objects.

setResourceEnvReferences

public void setResourceEnvReferences(java.util.Map resourceReferences)
Parameters:
resourceReferences - - Map

getMessageDestinationReferences

public java.util.Iterator getMessageDestinationReferences()
Return an iterator of message-destination-refs.

Returns:
Iterator of MessageDestinationRefMetaData objects.

setMessageDestinationReferences

public void setMessageDestinationReferences(java.util.Map messageDestinationReferences)
Parameters:
messageDestinationReferences - - Map

getMessageDestination

public MessageDestinationMetaData (src)  getMessageDestination(java.lang.String name)
Get a message destination metadata

Parameters:
name - the name of the message destination
Returns:
the message destination metadata

setMessageDestination

public void setMessageDestination(java.util.Map messageDestinations)
Parameters:
messageDestinations - - Map

getServiceReferences

public java.util.Iterator getServiceReferences()
Return an iterator of the service-ref mappings.

Returns:
Iterator of ServiceRefMetaData objects

setServiceReferences

public void setServiceReferences(java.util.Map serviceReferences)
Parameters:
serviceReferences - - Map

getContextRoot

public java.lang.String getContextRoot()
This the the jboss-web.xml descriptor context-root and it is only meaningful if a war is deployed outside of an ear.


setContextRoot

public void setContextRoot(java.lang.String contextRoot)

getWsdlPublishLocationByName

public java.lang.String getWsdlPublishLocationByName(java.lang.String name)
Get the optional wsdl publish location from jboss-web.xml.


setWsdlPublishLocationMap

public void setWsdlPublishLocationMap(java.util.Map wsdlPublishLocationMap)
Parameters:
wsdlPublishLocationMap - - Map

isWebServiceDeployment

public boolean isWebServiceDeployment()

setWebServiceDeployment

public void setWebServiceDeployment(boolean webServiceDeployment)

getJaccContextID

public java.lang.String getJaccContextID()

setJaccContextID

public void setJaccContextID(java.lang.String jaccContextID)

getSecurityDomain

public java.lang.String getSecurityDomain()
Return the optional security-domain jboss-web.xml element.

Returns:
The jndiName of the security manager implementation that is responsible for security of the web application. May be null if there was no security-domain specified in the jboss-web.xml descriptor.

setSecurityDomain

public void setSecurityDomain(java.lang.String securityDomain)
Set the security domain for this web application


isFlushOnSessionInvalidation

public boolean isFlushOnSessionInvalidation()
The flag indicating whether the associated security domain cache should be flushed when the session is invalidated.

Returns:
true if the flush should occur, false otherwise.

setFlushOnSessionInvalidation

public void setFlushOnSessionInvalidation(boolean flag)
The flag indicating whether the associated security domain cache should be flushed when the session is invalidated.

Parameters:
flag - - true if the flush should occur, false otherwise.

getSecurityContraints

public java.util.Iterator getSecurityContraints()
Get the security-constraint settings


setSecurityConstraints

public void setSecurityConstraints(java.util.Collection securityContraints)
Parameters:
securityContraints - - Collection

getSecurityRoleRefs

public java.util.Map getSecurityRoleRefs()
Returns:
>

setSecurityRoleReferences

public void setSecurityRoleReferences(java.util.Map securityRoleReferences)
Parameters:
securityRoleReferences - - >

getSecurityRoleNames

public java.util.Set getSecurityRoleNames()
Get the security-role names from the web.xml descriptor

Returns:
Set of the security-role names from the web.xml

getSecurityRoles

public java.util.Map getSecurityRoles()
Get the optional map of security role/user mapping.

Returns:
Map

setSecurityRoles

public void setSecurityRoles(java.util.Map securityRoles)
Parameters:
securityRoles - - Map

getSecurityRoleNamesByPrincipal

public java.util.Set getSecurityRoleNamesByPrincipal(java.lang.String userName)
Parameters:
userName -
Returns:
Set

getRunAsIdentity

public RunAsIdentity (src)  getRunAsIdentity(java.lang.String servletName)
Access the RunAsIdentity associated with the given servlet

Parameters:
servletName - - the servlet-name from the web.xml
Returns:
RunAsIdentity for the servet if one exists, null otherwise

getRunAsIdentity

public java.util.Map getRunAsIdentity()
Returns:
servlet/run-as

setRunAsIdentity

public void setRunAsIdentity(java.util.Map runAsIdentity)
The jboss-web.xml servlet/run-as


getServletMappings

public java.util.HashMap getServletMappings()
Get the servlet-name values from the web.xml descriptor

Returns:
Set of the servlet-names from the servlet-mappings

setServletMappings

public void setServletMappings(java.util.Map servletMappings)
servlet-mapping/serlvet-name to url-pattern mapping

Parameters:
servletMappings - - Map

getServletNames

public java.util.Set getServletNames()
Get the servlet-name values from the web.xml descriptor

Returns:
Set of the servlet-names from the servlet-mappings

mergeSecurityRoles

public void mergeSecurityRoles(java.util.Map applRoles)
Merge the security role/principal mapping defined in jboss-web.xml with the one defined at jboss-app.xml.


getVirtualHosts

public java.util.Iterator getVirtualHosts()
The servlet container virtual host the war should be deployed into. If null then the servlet container default host should be used.


setVirtualHosts

public void setVirtualHosts(java.util.Collection virtualHosts)
Parameters:
virtualHosts - - Collection

getDistributable

public boolean getDistributable()
The distributable flag.

Returns:
true if the web-app is marked distributable

setDistributable

public void setDistributable(boolean distributable)
Mark the web-app as distributable

Parameters:
distributable - - true for distributable

getDepends

public java.util.Collection getDepends()
Access the web application depends

Returns:
Iterator of JMX ObjectNames the web app depends on.

setDepends

public void setDepends(java.util.Collection depends)
Parameters:
depends - - Collection of the web app dependencies

getJava2ClassLoadingCompliance

public boolean getJava2ClassLoadingCompliance()
A 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)

getLoaderConfig

public LoaderRepositoryFactory.LoaderRepositoryConfig (src)  getLoaderConfig()

setLoaderConfig

public void setLoaderConfig(LoaderRepositoryFactory.LoaderRepositoryConfig (src)  loaderConfig)

getENCLoader

public java.lang.ClassLoader getENCLoader()

setENCLoader

public void setENCLoader(java.lang.ClassLoader encLoader)

getContextLoader

public java.lang.ClassLoader getContextLoader()

setContextLoader

public void setContextLoader(java.lang.ClassLoader cxtLoader)
Make sure this is called during performDeploy


getSessionCookies

public int getSessionCookies()

setSessionCookies

public void setSessionCookies(int sessionCookies)

getInvalidateSessionPolicy

public int getInvalidateSessionPolicy()

setInvalidateSessionPolicy

public void setInvalidateSessionPolicy(int invalidateSessionPolicy)

getReplicationType

public int getReplicationType()

getReplicationGranularity

public int getReplicationGranularity()

setReplicationGranularity

public void setReplicationGranularity(int replicationGranularity)

importXml

public void importXml(org.w3c.dom.Element element)
               throws DeploymentException (src) 
Description copied from class: MetaData (src)
Imports either the jboss or ejb-jar from the given element.

Specified by:
importXml in interface XmlLoadable (src)
Overrides:
importXml in class MetaData (src)
Parameters:
element - The element to import.
Throws:
DeploymentException (src) - Unrecognized root tag.

importWebXml

protected void importWebXml(org.w3c.dom.Element webApp)
                     throws DeploymentException (src) 
Parse the elements of the web-app element used by the integration layer.

Throws:
DeploymentException (src)

importJBossWebXml

protected void importJBossWebXml(org.w3c.dom.Element jbossWeb)
                          throws DeploymentException (src) 
Parse the elements of the jboss-web element used by the integration layer.

Throws:
DeploymentException (src)