org.codehaus.cargo.module.ejb
Class EjbJarXml

java.lang.Object
  extended by org.jdom.Document
      extended by org.codehaus.cargo.module.AbstractDescriptor
          extended by org.codehaus.cargo.module.ejb.EjbJarXml
All Implemented Interfaces:
Serializable, Cloneable, Descriptor, J2eeDescriptor, org.jdom.Parent

public class EjbJarXml
extends AbstractDescriptor
implements J2eeDescriptor

Encapsulates the DOM representation of a ejb deployment descriptor ejb-jar.xml to provide convenience methods for easy access and manipulation.

Version:
$Id: EjbJarXml.java 1705 2008-09-02 13:14:55Z adriana $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jdom.Document
baseURI
 
Constructor Summary
EjbJarXml(org.jdom.Element rootElement, DescriptorType type)
          Constructor.
 
Method Summary
 void addVendorDescriptor(VendorEjbDescriptor descr)
          Associates a vendor specific descriptor with this web.xml.
 Entity getEntityEjb(String name)
          Return a specific entity definition.
 Iterator 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.
 Iterator getSessionEjbs()
          Returns all session ejbs in this descriptor.
 Iterator getVendorDescriptors()
          Returns all vendor descriptors associated with this J2EE deployment descriptor.
 
Methods inherited from class org.codehaus.cargo.module.AbstractDescriptor
addElement, checkElement, createNestedText, getChildText, getChildText, getDescriptorType, getDocument, getElements, getElements, getImmediateChild, getInsertionPointFor, getNestedElements, getNestedText, getTagByIdentifier, getTagByIdentifier, getTags, getTags, getText
 
Methods inherited from class org.jdom.Document
addContent, addContent, addContent, addContent, clone, cloneContent, detachRootElement, equals, getBaseURI, getContent, getContent, getContent, getContentSize, getDescendants, getDescendants, getDocType, 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, getTags
 
Methods inherited from interface org.jdom.Parent
clone, cloneContent, getContent, getContent, getContent, getContentSize, getDescendants, getDescendants, getParent, indexOf, removeContent, removeContent, removeContent, removeContent
 

Constructor Detail

EjbJarXml

public EjbJarXml(org.jdom.Element rootElement,
                 DescriptorType type)
Constructor.

Parameters:
rootElement - the root element of the document
type - 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 interface Descriptor
Returns:
the file name
See Also:
Descriptor.getFileName()

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 Iterator getVendorDescriptors()
Returns all vendor descriptors associated with this J2EE deployment descriptor. For example for JBoss the vendor descriptor associated with web.xml is jboss-web.xml.

Specified by:
getVendorDescriptors in interface J2eeDescriptor
Returns:
Iterator containing Descriptor objects
See Also:
J2eeDescriptor.getVendorDescriptors()

getSessionEjbs

public final Iterator getSessionEjbs()
Returns all session ejbs in this descriptor.

Returns:
Iterator of Ssession objects representing all session ejbs

getEntityEjbs

public final Iterator getEntityEjbs()
Returns all entity ejbs in this descriptor.

Returns:
Iterator of Entity objects representing all entity ejbs

getSessionEjb

public final Session getSessionEjb(String name)
Return a specific session definition.

Parameters:
name - the name of the ejb.
Returns:
the Session

getEntityEjb

public final Entity getEntityEjb(String name)
Return a specific entity definition.

Parameters:
name - the name of the ejb.
Returns:
the Entity


Copyright © 2004-2012 Codehaus. All Rights Reserved.