org.codehaus.cargo.module.ejb
Class EjbJarXml

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

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 1283 2007-02-01 12:05:49Z grimsell $

Constructor Summary
EjbJarXml(org.w3c.dom.Document theDocument)
          Constructor.
 
Method Summary
 void addVendorDescriptor(VendorEjbDescriptor descr)
          Associates a vendor specific descriptor with this web.xml.
 Entity getEntityEjb(java.lang.String name)
          Return a specific entity definition.
 java.util.Iterator getEntityEjbs()
          Returns all entity ejbs in this descriptor.
 java.lang.String getFileName()
          Returns the file name of this descriptor.
 Session getSessionEjb(java.lang.String name)
          Return a specific session definition.
 java.util.Iterator getSessionEjbs()
          Returns all session ejbs in this descriptor.
 java.util.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, 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
 
Methods inherited from interface org.codehaus.cargo.module.Descriptor
getDocument
 

Constructor Detail

EjbJarXml

public EjbJarXml(org.w3c.dom.Document theDocument)
Constructor.

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

getFileName

public java.lang.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 java.util.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 java.util.Iterator getSessionEjbs()
Returns all session ejbs in this descriptor.

Returns:
Iterator of Ssession objects representing all session ejbs

getEntityEjbs

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

Returns:
Iterator of Entity objects representing all entity ejbs

getSessionEjb

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

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

getEntityEjb

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

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


Copyright © 2004-2009 Codehaus. All Rights Reserved.