com.sun.enterprise.deployment.node
Class ExtensionElementNode

java.lang.Object
  extended by com.sun.enterprise.deployment.node.DeploymentDescriptorNode
      extended by com.sun.enterprise.deployment.node.ExtensionElementNode
All Implemented Interfaces:
XMLNode

public class ExtensionElementNode
extends DeploymentDescriptorNode

This node is responsible for loading and saving any type of xml node and store them in a DeploymentExtensionElement

Author:
Jerome Dochez

Field Summary
 
Fields inherited from class com.sun.enterprise.deployment.node.DeploymentDescriptorNode
abstractDescriptor, handlers, localStrings, parentNode
 
Constructor Summary
ExtensionElementNode()
          Creates a new instance of DynamicDescriptorNode
 
Method Summary
protected  void addNodeDescriptor(DeploymentDescriptorNode node)
          Adds a new DOL descriptor instance to the descriptor associated with this XMLNode
 org.w3c.dom.Element appendChildNS(org.w3c.dom.Node parent, java.lang.String elementName, Descriptor descriptor)
           Append a new element child to the current node
 org.w3c.dom.Node appendTextChildNS(org.w3c.dom.Node parent, java.lang.String elementName, java.lang.String text, Descriptor descriptor)
           Append a new text child
 boolean endElement(XMLElement element)
          receives notification of the end of an XML element by the Parser
 java.lang.Object getDescriptor()
           
protected  java.util.Map getDispatchTable()
          all sub-implementation of this class can use a dispatch table to map xml element to method name on the descriptor class for setting the element value.
 XMLNode getHandlerFor(XMLElement element)
          Return the XMLNode implementation respionsible for handling the sub-element of the current node
 boolean handlesElement(XMLElement element)
          Return true if the XMLNode is responisble for handling the XML element
 void setElementValue(XMLElement element, java.lang.String value)
          receives notification of the value for a particular tag
 void startElement(XMLElement element, org.xml.sax.Attributes attributes)
          SAX Parser API implementation, we don't really care for now.
protected  void writeDescriptor(org.w3c.dom.Node parentNode, java.lang.String tagName, ExtensionElementDescriptor descriptor)
          write the deployment extensions nodes associated with this node
 
Methods inherited from class com.sun.enterprise.deployment.node.DeploymentDescriptorNode
addDescriptor, addNamespaceDeclaration, addPrefixMapping, appendChild, appendQNameChild, appendTextChild, appendTextChild, composeQNameValue, forceAppendTextChild, getLocalPartFromQName, getOwnerDocument, getParentNode, getPrefixFromQName, getXMLPath, getXMLRootTag, postParsing, registerElementHandler, registerElementHandler, resolvePrefix, setAttribute, setAttributeNS, setAttributeValue, setDescriptorInfo, setParentNode, setXMLRootTag, writeAroundInvokeDescriptors, writeAroundTimeoutDescriptors, writeDataSourceDefinitionDescriptors, writeDescriptor, writeDescriptor, writeEjbReferenceDescriptors, writeEntityManagerFactoryReferenceDescriptors, writeEntityManagerReferenceDescriptors, writeEnvEntryDescriptors, writeJNDIEnvironmentRefs, writeLocalizedDescriptions, writeMessageDestinationRefDescriptors, writePostActivateDescriptors, writePostConstructDescriptors, writePreDestroyDescriptors, writePrePassivateDescriptors, writeResourceEnvRefDescriptors, writeResourceRefDescriptors, writeServiceReferenceDescriptors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensionElementNode

public ExtensionElementNode()
Creates a new instance of DynamicDescriptorNode

Method Detail

getDispatchTable

protected java.util.Map getDispatchTable()
all sub-implementation of this class can use a dispatch table to map xml element to method name on the descriptor class for setting the element value.

Overrides:
getDispatchTable in class DeploymentDescriptorNode
Returns:
the map with the element name as a key, the setter method as a value

addNodeDescriptor

protected void addNodeDescriptor(DeploymentDescriptorNode node)
Adds a new DOL descriptor instance to the descriptor associated with this XMLNode

Overrides:
addNodeDescriptor in class DeploymentDescriptorNode
Parameters:
XMLNode - the sub-node adding the descriptor;
descriptor - the new descriptor

getDescriptor

public java.lang.Object getDescriptor()
Specified by:
getDescriptor in interface XMLNode
Overrides:
getDescriptor in class DeploymentDescriptorNode
Returns:
the descriptor instance to associate with this XMLNode

handlesElement

public boolean handlesElement(XMLElement element)
Description copied from interface: XMLNode
Return true if the XMLNode is responisble for handling the XML element

Specified by:
handlesElement in interface XMLNode
Overrides:
handlesElement in class DeploymentDescriptorNode
Parameters:
element - the XML element type name
Returns:
true if the element tag can be handled by any registered sub nodes of the current XMLNode

getHandlerFor

public XMLNode getHandlerFor(XMLElement element)
Description copied from interface: XMLNode
Return the XMLNode implementation respionsible for handling the sub-element of the current node

Specified by:
getHandlerFor in interface XMLNode
Overrides:
getHandlerFor in class DeploymentDescriptorNode
Parameters:
element - the XML element type name
Returns:
the handler registered for the subtag element of the curent XMLNode

startElement

public void startElement(XMLElement element,
                         org.xml.sax.Attributes attributes)
SAX Parser API implementation, we don't really care for now.

Specified by:
startElement in interface XMLNode
Overrides:
startElement in class DeploymentDescriptorNode
Parameters:
element - the XML element type name
attributes - the specified or defaultted attritutes

setElementValue

public void setElementValue(XMLElement element,
                            java.lang.String value)
receives notification of the value for a particular tag

Specified by:
setElementValue in interface XMLNode
Overrides:
setElementValue in class DeploymentDescriptorNode
Parameters:
element - the xml element
value - it's associated value

endElement

public boolean endElement(XMLElement element)
receives notification of the end of an XML element by the Parser

Specified by:
endElement in interface XMLNode
Overrides:
endElement in class DeploymentDescriptorNode
Parameters:
element - the xml tag identification
Returns:
true if this node is done processing the XML sub tree

writeDescriptor

protected void writeDescriptor(org.w3c.dom.Node parentNode,
                               java.lang.String tagName,
                               ExtensionElementDescriptor descriptor)
write the deployment extensions nodes associated with this node

Parameters:
parent - node for the DOM tree
deployment - extension element

appendChildNS

public org.w3c.dom.Element appendChildNS(org.w3c.dom.Node parent,
                                         java.lang.String elementName,
                                         Descriptor descriptor)

Append a new element child to the current node

Parameters:
parentNode - is the parent node for the new child element
elementName - is new element tag name
Returns:
the newly created child node

appendTextChildNS

public org.w3c.dom.Node appendTextChildNS(org.w3c.dom.Node parent,
                                          java.lang.String elementName,
                                          java.lang.String text,
                                          Descriptor descriptor)

Append a new text child

Parameters:
parent - for the new child element
elementName - is the new element tag name
text - the text for the new element


Copyright © 2012 GlassFish Community. All Rights Reserved.