org.objectweb.jonas_web.deployment.api
Class WebContainerDeploymentDesc

java.lang.Object
  extended by org.objectweb.jonas_lib.deployment.api.DescriptionGroupDesc
      extended by org.objectweb.jonas_lib.deployment.api.JndiEnvRefsGroupDesc
          extended by org.objectweb.jonas_web.deployment.api.WebContainerDeploymentDesc
All Implemented Interfaces:
DescriptionGroup, JndiEnvRefsGroup

public class WebContainerDeploymentDesc
extends JndiEnvRefsGroupDesc

This class do the parsing of the web.xml file and jonas-web.xml files and contruct a data structure associated to these two files. 03/03 : Can read web.xml and jonas-web.xml if the url of the war is a directory.

Author:
Ludovic Bert, Florent Benoit, Philippe Coq

Field Summary
 
Fields inherited from class org.objectweb.jonas_lib.deployment.api.DescriptionGroupDesc
description, displayName, largeIcon, smallIcon
 
Constructor Summary
WebContainerDeploymentDesc(java.lang.String fileName, java.lang.ClassLoader classLoader, WebApp webApp, JonasWebApp jonasWebApp)
          Construct an instance of a WebContainerDeploymentDesc.
Constructor is private, call one of the static getInstance method instead.
 
Method Summary
 java.lang.String getContextRoot()
          Get the context root of this web application.
 java.lang.String getHost()
          Get the host on which the web application must be deployed.
 boolean getJava2DelegationModel()
          Context classloader must follow the java2 delegation model ?
 java.lang.String getJOnASXmlContent()
          Return the content of the jonas-web.xml file
 java.lang.String getPort()
          Get the prefered port of the connector used to access the web application.
 SecurityConstraintListDesc getSecurityConstraintListDesc()
          Gets the constraint list
 java.util.List getSecurityRoleList()
          Gets the list of security roles
 java.lang.String getServletClassname(java.lang.String servName)
          Return the classname of the given servlet
 java.util.Collection getServletDescList()
          Gets the list of Servlets
 java.util.List getServletMappings(java.lang.String servName)
          Return the list of urlMapping of the given servlet
 java.lang.String[] getServletsName()
          Return a list of all servlets name available
 java.lang.String getXmlContent()
          Return the content of the web.xml file
 void setJOnASXmlContent(java.lang.String jXml)
          Set the content of the jonas-web.xml file
 void setXmlContent(java.lang.String xml)
          Set the content of the web.xml file
 java.lang.String toString()
          Return a String representation of the WebContainerDeploymentDesc.
 
Methods inherited from class org.objectweb.jonas_lib.deployment.api.JndiEnvRefsGroupDesc
getEjbLocalRefDesc, getEjbRefDesc, getEnvEntryDesc, getMessageDestinationRefDesc, getResourceEnvRefDesc, getResourceRefDesc, getServiceRefDesc
 
Methods inherited from class org.objectweb.jonas_lib.deployment.api.DescriptionGroupDesc
getDescription, getDisplayName, getLargeIcon, getSAXMsg, getSmallIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebContainerDeploymentDesc

public WebContainerDeploymentDesc(java.lang.String fileName,
                                  java.lang.ClassLoader classLoader,
                                  WebApp webApp,
                                  JonasWebApp jonasWebApp)
                           throws DeploymentDescException
Construct an instance of a WebContainerDeploymentDesc.
Constructor is private, call one of the static getInstance method instead.

Parameters:
fileName - the name of the warFile
classLoader - the classloader for the classes.
webApp - the data structure of the web-app (web.xml)
jonasWebApp - the data structure of the jonas-web-app (jonas-web.xml)
Throws:
DeploymentDescException - if the deployment descriptors are corrupted.
Method Detail

getXmlContent

public java.lang.String getXmlContent()
Return the content of the web.xml file

Returns:
the content of the web.xml file

getJOnASXmlContent

public java.lang.String getJOnASXmlContent()
Return the content of the jonas-web.xml file

Returns:
the content of the jonas-web.xml file

setXmlContent

public void setXmlContent(java.lang.String xml)
Set the content of the web.xml file

Parameters:
xml - the content of the file

setJOnASXmlContent

public void setJOnASXmlContent(java.lang.String jXml)
Set the content of the jonas-web.xml file

Parameters:
jXml - the content of the file

getContextRoot

public java.lang.String getContextRoot()
Get the context root of this web application.

Returns:
the context root of this web application.

getJava2DelegationModel

public boolean getJava2DelegationModel()
Context classloader must follow the java2 delegation model ?

Returns:
true if the context's classloader must follow the java 2 delegation model.

getHost

public java.lang.String getHost()
Get the host on which the web application must be deployed.

Returns:
the host on which the web application must be deployed.

getPort

public java.lang.String getPort()
Get the prefered port of the connector used to access the web application.

Returns:
the prefered port of the connector used to access the web application.

toString

public java.lang.String toString()
Return a String representation of the WebContainerDeploymentDesc.

Specified by:
toString in interface DescriptionGroup
Specified by:
toString in class DescriptionGroupDesc
Returns:
a String representation of the WebContainerDeploymentDesc.

getServletDescList

public java.util.Collection getServletDescList()
Gets the list of Servlets

Returns:
list of Servlets

getServletsName

public java.lang.String[] getServletsName()
Return a list of all servlets name available

Returns:
a list of all servlets name available

getServletClassname

public java.lang.String getServletClassname(java.lang.String servName)
Return the classname of the given servlet

Parameters:
servName - name of the given servlet
Returns:
the classname of the given servlet

getSecurityConstraintListDesc

public SecurityConstraintListDesc getSecurityConstraintListDesc()
Gets the constraint list

Returns:
the constraint list

getSecurityRoleList

public java.util.List getSecurityRoleList()
Gets the list of security roles

Returns:
the list of security roles

getServletMappings

public java.util.List getServletMappings(java.lang.String servName)
Return the list of urlMapping of the given servlet

Parameters:
servName - name of the given servlet
Returns:
the list of urlMapping of the given servlet