org.codehaus.cargo.module.ejb.weblogic
Class WeblogicEjbJarXml

java.lang.Object
  extended by org.jdom.Document
      extended by org.codehaus.cargo.module.AbstractDescriptor
          extended by org.codehaus.cargo.module.ejb.weblogic.WeblogicEjbJarXml
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Descriptor, VendorEjbDescriptor, VendorDescriptor, org.jdom.Parent

public class WeblogicEjbJarXml
extends AbstractDescriptor
implements VendorEjbDescriptor

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

Version:
$Id: WeblogicEjbJarXml.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
WeblogicEjbJarXml(org.jdom.Element rootElement, DescriptorType type)
          Constructor.
 
Method Summary
 void addDispatchPolicy(EjbDef ejb, java.lang.String policy)
          Adds a dispatch policy to a ejb definition.
 java.lang.String getDispatchPolicy(EjbDef ejb)
          Returns the dispatch policy for a given ejb.
 java.lang.String getFileName()
          Returns the file name of this descriptor.
 java.lang.String getJndiName(EjbDef ejb)
          Returns the jndi name for an EJB.
 
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

WeblogicEjbJarXml

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

Parameters:
rootElement - The root of the DOM document representing the parsed deployment descriptor
type - The descriptor type
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()

getJndiName

public java.lang.String getJndiName(EjbDef ejb)
Returns the jndi name for an EJB.

Specified by:
getJndiName in interface VendorEjbDescriptor
Parameters:
ejb - The EjbDef to get the jndi for
Returns:
the jndi name of the ejb
See Also:
VendorEjbDescriptor.getJndiName(EjbDef)

addDispatchPolicy

public void addDispatchPolicy(EjbDef ejb,
                              java.lang.String policy)
Adds a dispatch policy to a ejb definition.

Parameters:
ejb - The ejb to be modified
policy - The policy to add
Throws:
java.lang.IllegalArgumentException - if the given ejb does not exist in the descriptor

getDispatchPolicy

public java.lang.String getDispatchPolicy(EjbDef ejb)
Returns the dispatch policy for a given ejb.

Parameters:
ejb - The ejb to get the dispatch policy for
Returns:
the dispatch policy or null if no one is specified
Throws:
java.lang.IllegalArgumentException - if the given ejb does not exist in the descriptor


Copyright © 2004-2011 Codehaus. All Rights Reserved.