Class TomcatContextXml
- java.lang.Object
-
- org.jdom2.Document
-
- org.codehaus.cargo.module.AbstractDescriptor
-
- org.codehaus.cargo.module.webapp.tomcat.TomcatContextXml
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Descriptor
,org.jdom2.NamespaceAware
,org.jdom2.Parent
public class TomcatContextXml extends AbstractDescriptor
Encapsulates the DOM representation of a web deployment descriptorMETA-INF/context.xml
to provide convenience methods for easy access and manipulation.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TomcatContextXml(org.jdom2.Element rootElement, DescriptorType type)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFileName()
Returns the file name of this descriptor.Map<org.jdom2.Attribute,org.jdom2.Attribute>
getParameters()
Gets all the parameters that match XPath "Context/Parameter
".String
getPath()
-
Methods inherited from class org.codehaus.cargo.module.AbstractDescriptor
addElement, checkElement, containsElement, createNestedText, getChildText, getChildText, getContentExceptComments, getDescriptorType, getDocument, getElements, getElements, getImmediateChild, getInsertionPointFor, getNestedElements, getNestedText, getTagByIdentifier, getTagByIdentifier, getTags, getTags, getText, sameContent, sameElement
-
Methods inherited from class org.jdom2.Document
addContent, addContent, addContent, addContent, canContainContent, clone, cloneContent, detachRootElement, equals, getBaseURI, getContent, getContent, getContent, getContentSize, getDescendants, getDescendants, getDocType, getNamespacesInherited, getNamespacesInScope, getNamespacesIntroduced, getParent, getProperty, getRootElement, hashCode, hasRootElement, indexOf, removeContent, removeContent, removeContent, removeContent, setBaseURI, setContent, setContent, setContent, setContent, setDocType, setProperty, setRootElement, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.codehaus.cargo.module.Descriptor
getRootElement
-
Methods inherited from interface org.jdom2.NamespaceAware
getNamespacesInherited, getNamespacesInScope, getNamespacesIntroduced
-
Methods inherited from interface org.jdom2.Parent
addContent, addContent, addContent, addContent, canContainContent, clone, cloneContent, getContent, getContent, getContent, getContentSize, getDescendants, getDescendants, getParent, indexOf, removeContent, removeContent, removeContent, removeContent
-
-
-
-
Constructor Detail
-
TomcatContextXml
public TomcatContextXml(org.jdom2.Element rootElement, DescriptorType type)
Constructor.- Parameters:
rootElement
- The root element of the contexttype
- the document descriptor type
-
-
Method Detail
-
getPath
public String getPath()
- Returns:
- the context path element found in the
context.xml
file (available in thepath
attribute) or null if not defined
-
getParameters
public Map<org.jdom2.Attribute,org.jdom2.Attribute> 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 isContext/Parameter/@value
-
getFileName
public String getFileName()
Returns the file name of this descriptor. For example "web.xml", "weblogic.xml", etc.- Returns:
- the file name
-
-