Package org.codehaus.cargo.module.ejb
Class EjbJarXml
- java.lang.Object
-
- org.jdom2.Document
-
- org.codehaus.cargo.module.AbstractDescriptor
-
- org.codehaus.cargo.module.ejb.EjbJarXml
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Descriptor
,J2eeDescriptor
,org.jdom2.NamespaceAware
,org.jdom2.Parent
public class EjbJarXml extends AbstractDescriptor implements J2eeDescriptor
Encapsulates the DOM representation of a ejb deployment descriptorejb-jar.xml
to provide convenience methods for easy access and manipulation.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EjbJarXml(org.jdom2.Element rootElement, DescriptorType type)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addVendorDescriptor(VendorEjbDescriptor descr)
Associates a vendor specific descriptor with this web.xml.Entity
getEntityEjb(String name)
Return a specific entity definition.List<Entity>
getEntityEjbs()
Returns all entity ejbs in this descriptor.String
getFileName()
Returns the file name of this descriptor.Session
getSessionEjb(String name)
Return a specific session definition.List<Session>
getSessionEjbs()
Returns all session ejbs in this descriptor.List<Descriptor>
getVendorDescriptors()
Returns all vendor descriptors associated with this J2EE deployment descriptor.-
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
addElement, getDescriptorType, getDocument, getRootElement, getTagByIdentifier, getTagByIdentifier, getTags, getTags
-
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
-
EjbJarXml
public EjbJarXml(org.jdom2.Element rootElement, DescriptorType type)
Constructor.- Parameters:
rootElement
- the root element of the documenttype
- the document descriptor type
-
-
Method Detail
-
getFileName
public String getFileName()
Returns the file name of this descriptor. For example "web.xml", "weblogic.xml", etc.- Specified by:
getFileName
in interfaceDescriptor
- Returns:
- the file name
-
addVendorDescriptor
public void addVendorDescriptor(VendorEjbDescriptor descr)
Associates a vendor specific descriptor with this web.xml.- Parameters:
descr
- the vendor specific dexcriptor to associate
-
getVendorDescriptors
public List<Descriptor> getVendorDescriptors()
Returns all vendor descriptors associated with this J2EE deployment descriptor. For example for JBoss the vendor descriptor associated withweb.xml
isjboss-web.xml
.- Specified by:
getVendorDescriptors
in interfaceJ2eeDescriptor
- Returns:
- List of Descriptor objects
-
getSessionEjbs
public List<Session> getSessionEjbs()
Returns all session ejbs in this descriptor.- Returns:
- List of Session objects representing all session ejbs
-
getEntityEjbs
public List<Entity> getEntityEjbs()
Returns all entity ejbs in this descriptor.- Returns:
- List of Entity objects representing all entity ejbs
-
getSessionEjb
public Session getSessionEjb(String name)
Return a specific session definition.- Parameters:
name
- the name of the ejb.- Returns:
- the Session
-
-