org.codehaus.cargo.module.webapp.tomcat
Class TomcatContextXml

java.lang.Object
  extended by org.codehaus.cargo.module.AbstractDescriptor
      extended by org.codehaus.cargo.module.webapp.tomcat.TomcatContextXml
All Implemented Interfaces:
Descriptor

public class TomcatContextXml
extends AbstractDescriptor

Encapsulates the DOM representation of a web deployment descriptor META-INF/context.xml to provide convenience methods for easy access and manipulation.

Version:
$Id: TomcatContextXml.java 1396 2007-02-20 21:08:29Z david $

Constructor Summary
TomcatContextXml(org.w3c.dom.Document document)
          Constructor.
 
Method Summary
 java.lang.String getFileName()
          Returns the file name of this descriptor.
 java.util.Map getParameters()
          Gets all the parameters that match XPath "Context/Parameter".
 java.lang.String getPath()
           
 
Methods inherited from class org.codehaus.cargo.module.AbstractDescriptor
addElement, checkElement, createNestedText, getChildText, getDocument, getElements, getImmediateChild, getInsertionPointFor, getNestedElements, getNestedText, getRootElement, getText, replaceElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TomcatContextXml

public TomcatContextXml(org.w3c.dom.Document document)
Constructor.

Parameters:
document - The DOM document representing the parsed deployment descriptor
Method Detail

getPath

public java.lang.String getPath()
Returns:
the context path element found in the context.xml file (available in the path attribute) or null if not defined

getParameters

public java.util.Map getParameters()
Gets all the parameters that match XPath "Context/Parameter".

Returns:
Always non-null (but possibly empty) map keyed by Context/Parameter/@name and value is Context/Parameter/@value

getFileName

public final java.lang.String getFileName()
Returns the file name of this descriptor. For example "web.xml", "weblogic.xml", etc.

Returns:
the file name
See Also:
Descriptor.getFileName()


Copyright © 2004-2011 Codehaus. All Rights Reserved.