站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 server API Documentation 英文版文档

WebMetaData (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


org.jboss.metadata
Class WebMetaData

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

public class WebMetaData
extends MetaData

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

Version:
$Revision: 1.34.2.2.2.1 $
Author:
Scott.Stark@jboss.org
See Also:
XmlLoadable, AbstractWebContainer

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
TX_MANDATORY, TX_NEVER, TX_NOT_SUPPORTED, TX_REQUIRED, TX_REQUIRES_NEW, TX_SUPPORTS, TX_UNKNOWN
 
Constructor Summary
WebMetaData()
           
 
Method Summary
 ClassLoader getContextLoader()
           
 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.
 Collection getDepends()
          Access the web application depends
 boolean getDistributable()
          The distributable flag.
 Iterator getEjbLocalReferences()
          Return an iterator of the ejb-local-ref mappings.
 Iterator getEjbReferences()
          Return an iterator of the ejb-ref mappings.
 ClassLoader getENCLoader()
           
 Iterator getEnvironmentEntries()
          Return an iterator of the env-entry mappings.
 int getInvalidateSessionPolicy()
           
 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.
 org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig getLoaderConfig()
           
 MessageDestinationMetaData getMessageDestination(String name)
          Get a message destination metadata
 Iterator getMessageDestinationReferences()
          Return an iterator of message-destination-refs.
 int getReplicationGranularity()
           
 int getReplicationType()
           
 Iterator getResourceEnvReferences()
          Return an iterator of the resource-ref mappings.
 Iterator getResourceReferences()
          Return an iterator of the resource-ref mappings.
 RunAsIdentity getRunAsIdentity(String servletName)
          Access the RunAsIdentity associated with the given servlet
 Iterator getSecurityContraints()
          Get the security-constraint settings
 String getSecurityDomain()
          Return the optional security-domain jboss-web.xml element.
 Set getSecurityRoleNames()
          Get the security-role names from the web.xml descriptor
 Set getSecurityRoleNamesByPrincipal(String userName)
           
 Map getSecurityRoleRefs()
           
 Map getSecurityRoles()
          Get the optional map of security role/user mapping.
 Iterator getServiceReferences()
          Return an iterator of the service-ref mappings.
 HashMap getServletMappings()
          Get the servlet-name values from the web.xml descriptor
 Set getServletNames()
          Get the servlet-name values from the web.xml descriptor
 int getSessionCookies()
           
 Iterator getVirtualHosts()
          The servlet container virtual host the war should be deployed into.
 String getWsdlPublishLocationByName(String name)
          Get the optional wsdl publish location from jboss-web.xml.
protected  void importJBossWebXml(Element jbossWeb)
          Parse the elements of the jboss-web element used by the integration layer.
protected  void importWebXml(Element webApp)
          Parse the elements of the web-app element used by the integration layer.
 void importXml(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.
 void mergeSecurityRoles(Map applRoles)
          Merge the security role/principal mapping defined in jboss-web.xml with the one defined at jboss-app.xml.
 void setContextLoader(ClassLoader cxtLoader)
          Make sure this is called during performDeploy
 void setContextRoot(String contextRoot)
           
 void setENCLoader(ClassLoader encLoader)
           
 void setFlushOnSessionInvalidation(boolean flag)
          The flag indicating whether the associated security domain cache should be flushed when the session is invalidated.
 void setJaccContextID(String jaccContextID)
           
 void setJava2ClassLoadingCompliance(boolean flag)
           
 void setLoaderConfig(org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig loaderConfig)
           
 void setResourceClassLoader(URLClassLoader resourceCl)
          Set the ClassLoader to load additional resources
 void setSecurityDomain(String securityDomain)
          Set the security domain for this web application
 
Methods inherited from class org.jboss.metadata.MetaData
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

SESSION_INVALIDATE_SET_AND_GET

public static final int SESSION_INVALIDATE_SET_AND_GET
See Also:
Constant Field Values

SESSION_INVALIDATE_SET_AND_NON_PRIMITIVE_GET

public static final int SESSION_INVALIDATE_SET_AND_NON_PRIMITIVE_GET
See Also:
Constant Field Values

SESSION_INVALIDATE_SET

public static final int SESSION_INVALIDATE_SET
See Also:
Constant Field Values

REPLICATION_TYPE_SYNC

public static final int REPLICATION_TYPE_SYNC
See Also:
Constant Field Values

REPLICATION_TYPE_ASYNC

public static final int REPLICATION_TYPE_ASYNC
See Also:
Constant Field Values

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

REPLICATION_GRANULARITY_ATTRIBUTE

public static final int REPLICATION_GRANULARITY_ATTRIBUTE
See Also:
Constant Field Values

REPLICATION_GRANULARITY_FIELD

public static final int REPLICATION_GRANULARITY_FIELD
See Also:
Constant Field Values

SESSION_COOKIES_DEFAULT

public static final int SESSION_COOKIES_DEFAULT
See Also:
Constant Field Values

SESSION_COOKIES_ENABLED

public static final int SESSION_COOKIES_ENABLED
See Also:
Constant Field Values

SESSION_COOKIES_DISABLED

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

WebMetaData

public WebMetaData()
Method Detail

setResourceClassLoader

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


getEnvironmentEntries

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

Returns:
Iterator of EnvEntryMetaData objects.

getEjbReferences

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

Returns:
Iterator of EjbRefMetaData objects.

getEjbLocalReferences

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

Returns:
Iterator of EjbLocalRefMetaData objects.

getResourceReferences

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

Returns:
Iterator of ResourceRefMetaData objects.

getResourceEnvReferences

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

Returns:
Iterator of ResourceEnvRefMetaData objects.

getMessageDestinationReferences

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

Returns:
Iterator of MessageDestinationRefMetaData objects.

getMessageDestination

public MessageDestinationMetaData getMessageDestination(String name)
Get a message destination metadata

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

getServiceReferences

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

Returns:
Iterator of ServiceRefMetaData objects

getContextRoot

public 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(String contextRoot)

getWsdlPublishLocationByName

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


getJaccContextID

public String getJaccContextID()

setJaccContextID

public void setJaccContextID(String jaccContextID)

getSecurityDomain

public 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(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 Iterator getSecurityContraints()
Get the security-constraint settings


getSecurityRoleRefs

public Map getSecurityRoleRefs()

getSecurityRoles

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

Returns:
Map

getSecurityRoleNamesByPrincipal

public Set getSecurityRoleNamesByPrincipal(String userName)
Parameters:
userName -
Returns:
Set

getRunAsIdentity

public RunAsIdentity getRunAsIdentity(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

getSecurityRoleNames

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

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

getServletMappings

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

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

getServletNames

public 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(Map applRoles)
Merge the security role/principal mapping defined in jboss-web.xml with the one defined at jboss-app.xml.


getVirtualHosts

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


getDistributable

public boolean getDistributable()
The distributable flag.

Returns:
true if the web-app is marked distributable

getDepends

public Collection getDepends()
Access the web application depends

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

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 org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig getLoaderConfig()

setLoaderConfig

public void setLoaderConfig(org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig loaderConfig)

getENCLoader

public ClassLoader getENCLoader()

setENCLoader

public void setENCLoader(ClassLoader encLoader)

getContextLoader

public ClassLoader getContextLoader()

setContextLoader

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


getSessionCookies

public int getSessionCookies()

getInvalidateSessionPolicy

public int getInvalidateSessionPolicy()

getReplicationType

public int getReplicationType()

getReplicationGranularity

public int getReplicationGranularity()

importXml

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

Specified by:
importXml in interface XmlLoadable
Overrides:
importXml in class MetaData
Parameters:
element - The element to import.
Throws:
org.jboss.deployment.DeploymentException - Unrecognized root tag.

importWebXml

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

Throws:
org.jboss.deployment.DeploymentException

importJBossWebXml

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

Throws:
org.jboss.deployment.DeploymentException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.