Package org.codehaus.cargo.module
Interface Descriptor
-
- All Superinterfaces:
Cloneable
,org.jdom2.NamespaceAware
,org.jdom2.Parent
,Serializable
- All Known Subinterfaces:
J2eeDescriptor
,VendorDescriptor
,VendorEjbDescriptor
,VendorWebAppDescriptor
- All Known Implementing Classes:
AbstractDescriptor
,ApplicationXml
,EjbJarXml
,IbmEjbJarBndXmi
,IbmWebBndXmi
,JBossWebXml
,JBossXml
,OrionEjbJarXml
,OrionWebXml
,ResinWebXml
,TomcatContextXml
,WeblogicEjbJarXml
,WeblogicXml
,WebXml
public interface Descriptor extends org.jdom2.Parent
Common interface for Deployment Descriptors.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.jdom2.Element
addElement(DescriptorTag tag, org.jdom2.Element right, org.jdom2.Element rootElement)
Add an element into the descriptor.DescriptorType
getDescriptorType()
Get the descriptor type for this descriptor.org.jdom2.Document
getDocument()
String
getFileName()
Returns the file name of this descriptor.org.jdom2.Element
getRootElement()
org.jdom2.Element
getTagByIdentifier(String tagName, String value)
Get elements of a particular descriptor tag whose identifier matches the passed parameter.org.jdom2.Element
getTagByIdentifier(DescriptorTag tag, String value)
Get elements of a particular descriptor tag whose identifier matches the passed parameter.List<org.jdom2.Element>
getTags(String tagName)
Get tags of a particular type.List<org.jdom2.Element>
getTags(DescriptorTag tag)
Get tags of a particular type.-
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
-
-
-
-
Method Detail
-
getFileName
String getFileName()
Returns the file name of this descriptor. For example "web.xml", "weblogic.xml", etc.- Returns:
- the file name
-
getDocument
org.jdom2.Document getDocument()
- Specified by:
getDocument
in interfaceorg.jdom2.Parent
- Returns:
- this descriptor as a document
-
getRootElement
org.jdom2.Element getRootElement()
- Returns:
- Root element.
-
addElement
org.jdom2.Element addElement(DescriptorTag tag, org.jdom2.Element right, org.jdom2.Element rootElement)
Add an element into the descriptor.- Parameters:
tag
- Descriptor Tagright
- Element insert beforerootElement
- Parent element- Returns:
- The added element
-
getTagByIdentifier
org.jdom2.Element getTagByIdentifier(DescriptorTag tag, String value)
Get elements of a particular descriptor tag whose identifier matches the passed parameter.- Parameters:
tag
- tag to search forvalue
- value for the identifier to match- Returns:
- the element that matches
-
getTagByIdentifier
org.jdom2.Element getTagByIdentifier(String tagName, String value)
Get elements of a particular descriptor tag whose identifier matches the passed parameter.- Parameters:
tagName
- Name of the tag to search forvalue
- value for the identifier to match- Returns:
- the element that matches
-
getTags
List<org.jdom2.Element> getTags(DescriptorTag tag)
Get tags of a particular type.- Parameters:
tag
- type of elements to find- Returns:
- list of tags
-
getTags
List<org.jdom2.Element> getTags(String tagName)
Get tags of a particular type.- Parameters:
tagName
- type of elements to find- Returns:
- list of tags
-
getDescriptorType
DescriptorType getDescriptorType()
Get the descriptor type for this descriptor.- Returns:
- descriptor type.
-
-