org.ow2.jonas.generators.wsgen.ddmodifier
Class DeploymentDescModifier

java.lang.Object
  extended by org.ow2.jonas.generators.wsgen.ddmodifier.DeploymentDescModifier
Direct Known Subclasses:
ContextDDModifier, WebJettyDDModifier, WebServicesDDModifier, WsClientDDModifier, WsEndpointDDModifier

public class DeploymentDescModifier
extends Object

Modify an Element from a Deployment Descriptor. Contains XML commons utilities.

Author:
Guillaume Sauthier

Field Summary
protected static String J2EE_NS
          J2EE Default XML namespace
protected static String JONAS_NS
          JOnAS Default XML namespace
 
Constructor Summary
DeploymentDescModifier(Element element, Document doc)
          Create a new DeploymentDescModifier to update the given Element.
DeploymentDescModifier(Element element, Document doc, Element parent)
          Create a new DeploymentDescModifier to update the given Element.
 
Method Summary
 Document getDocument()
           
 Element getElement()
           
static org.objectweb.util.monolog.api.Logger getLogger()
           
 Element getParent()
           
protected  Element newElement(String name)
          Create a new Element with given name
protected  Element newElement(String name, String text)
          Create a new Element with an inner Text Node.
protected  Element newJ2EEElement(String name)
          Create a new Element with given name in J2EE XML namespace.
protected  Element newJ2EEElement(String name, String text)
          Create a new Element with given name in J2EE XML namespace with an inner Text Node.
protected  Element newJOnASElement(String name)
          Create a new Element with given name in JOnAS XML namespace.
protected  Element newJOnASElement(String name, String text)
          Create a new Element with given name in JOnAS XML namespace, with an inner Text Node.
 void setDocument(Document doc)
          Set the new document to use
 void setElement(Element e)
          Set the new base Element to use
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

J2EE_NS

protected static final String J2EE_NS
J2EE Default XML namespace

See Also:
Constant Field Values

JONAS_NS

protected static final String JONAS_NS
JOnAS Default XML namespace

See Also:
Constant Field Values
Constructor Detail

DeploymentDescModifier

public DeploymentDescModifier(Element element,
                              Document doc)
Create a new DeploymentDescModifier to update the given Element.

Parameters:
element - XML element to be modified.
doc - base document for Element creation.

DeploymentDescModifier

public DeploymentDescModifier(Element element,
                              Document doc,
                              Element parent)
Create a new DeploymentDescModifier to update the given Element.

Parameters:
element - XML element to be modified.
doc - base document for Element creation.
parent - parent Element, used if element is null
Method Detail

newJ2EEElement

protected Element newJ2EEElement(String name)
Create a new Element with given name in J2EE XML namespace.

Parameters:
name - Element name
Returns:
the created Element

newJ2EEElement

protected Element newJ2EEElement(String name,
                                 String text)
Create a new Element with given name in J2EE XML namespace with an inner Text Node.

Parameters:
name - Element name
text - Element content
Returns:
the created Element

newJOnASElement

protected Element newJOnASElement(String name)
Create a new Element with given name in JOnAS XML namespace.

Parameters:
name - Element name
Returns:
the created Element

newJOnASElement

protected Element newJOnASElement(String name,
                                  String text)
Create a new Element with given name in JOnAS XML namespace, with an inner Text Node.

Parameters:
name - Element name
text - node's text
Returns:
the created Element

newElement

protected Element newElement(String name)
Create a new Element with given name

Parameters:
name - Element name
Returns:
the created Element

newElement

protected Element newElement(String name,
                             String text)
Create a new Element with an inner Text Node.

Parameters:
name - Element name
text - node's text
Returns:
the created Element

getLogger

public static org.objectweb.util.monolog.api.Logger getLogger()
Returns:
Returns the logger.

getParent

public Element getParent()
Returns:
Returns the parent (can be null).

getElement

public Element getElement()
Returns:
Returns the element.

getDocument

public Document getDocument()
Returns:
Returns the document.

setDocument

public void setDocument(Document doc)
Set the new document to use

Parameters:
doc - the new document to use

setElement

public void setElement(Element e)
Set the new base Element to use

Parameters:
e - the new base Element to use


Copyright © 2010 OW2 Consortium. All Rights Reserved.