com.sun.enterprise.deployment.node
Class BundleNode<T extends RootDeploymentDescriptor>

java.lang.Object
  extended by com.sun.enterprise.deployment.node.DeploymentDescriptorNode<T>
      extended by com.sun.enterprise.deployment.node.DisplayableComponentNode<T>
          extended by com.sun.enterprise.deployment.node.BundleNode<T>
All Implemented Interfaces:
RootXMLNode<T>, XMLNode<T>
Direct Known Subclasses:
AppClientNode, ApplicationNode, ConnectorNode, EjbBundleNode, JaxrpcMappingDescriptorNode, PersistenceNode, WebCommonNode, WebServicesDescriptorNode, WLWebServicesDescriptorNode

public abstract class BundleNode<T extends RootDeploymentDescriptor>
extends DisplayableComponentNode<T>
implements RootXMLNode<T>

This class defines all the common behaviour among nodes responsibles for handling bundles

Author:
Jerome Dochez

Field Summary
protected  java.lang.String docType
           
protected static java.lang.String SCHEMA_LOCATION_TAG
           
static java.lang.String W3C_XML_SCHEMA
           
static java.lang.String W3C_XML_SCHEMA_INSTANCE
           
 
Fields inherited from class com.sun.enterprise.deployment.node.DeploymentDescriptorNode
abstractDescriptor, handlers, localStrings, parentNode
 
Constructor Summary
BundleNode()
           
 
Method Summary
protected  void addBundleNodeAttributes(org.w3c.dom.Element bundleNode, RootDeploymentDescriptor descriptor)
          write the necessary attributes for the root node of this DDs document
 void addPrefixMapping(java.lang.String prefix, java.lang.String uri)
          notify of a new prefix mapping used in this document
static org.w3c.dom.Element appendChildNS(org.w3c.dom.Node parent, java.lang.String elementName, java.lang.String nameSpace)
           
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.
protected  java.lang.String getSchemaURL()
           
 void setDocType(java.lang.String docType)
          set the DOCTYPE as read in the input XML File
 void setElementValue(XMLElement element, java.lang.String value)
          receives notiification of the value for a particular tag
protected  void setSpecVersion()
          Sets the specVersion for this descriptor depending on the docType
 org.w3c.dom.Node writeDescriptor(org.w3c.dom.Node parent, T descriptor)
          write the descriptor class to a DOM tree and return it
protected  void writeMessageDestinations(org.w3c.dom.Node parentNode, java.util.Iterator msgDestinations)
           
 
Methods inherited from class com.sun.enterprise.deployment.node.DisplayableComponentNode
writeDisplayableComponentInfo
 
Methods inherited from class com.sun.enterprise.deployment.node.DeploymentDescriptorNode
addDescriptor, addNamespaceDeclaration, addNodeDescriptor, appendChild, appendQNameChild, appendTextChild, appendTextChild, composeQNameValue, endElement, forceAppendTextChild, getDescriptor, getHandlerFor, getLocalPartFromQName, getOwnerDocument, getParentNode, getPrefixFromQName, getXMLPath, getXMLRootTag, handlesElement, postParsing, registerElementHandler, registerElementHandler, resolvePrefix, setAttribute, setAttributeNS, setAttributeValue, setDescriptorInfo, setParentNode, setXMLRootTag, startElement, writeAroundInvokeDescriptors, writeAroundTimeoutDescriptors, writeDataSourceDefinitionDescriptors, 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
 
Methods inherited from interface com.sun.enterprise.deployment.node.RootXMLNode
getDocType, getSpecVersion, getSystemID, getSystemIDs
 
Methods inherited from interface com.sun.enterprise.deployment.node.XMLNode
addDescriptor, endElement, getDescriptor, getHandlerFor, getParentNode, getXMLPath, handlesElement, resolvePrefix, startElement
 

Field Detail

W3C_XML_SCHEMA

public static final java.lang.String W3C_XML_SCHEMA
See Also:
Constant Field Values

W3C_XML_SCHEMA_INSTANCE

public static final java.lang.String W3C_XML_SCHEMA_INSTANCE
See Also:
Constant Field Values

SCHEMA_LOCATION_TAG

protected static final java.lang.String SCHEMA_LOCATION_TAG
See Also:
Constant Field Values

docType

protected java.lang.String docType
Constructor Detail

BundleNode

public BundleNode()
Method Detail

setDocType

public void setDocType(java.lang.String docType)
set the DOCTYPE as read in the input XML File

Specified by:
setDocType in interface RootXMLNode<T extends RootDeploymentDescriptor>
Parameters:
docType - for the xml

appendChildNS

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

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<T extends RootDeploymentDescriptor>
Returns:
the map with the element name as a key, the setter method as a value

setElementValue

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

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

writeDescriptor

public org.w3c.dom.Node writeDescriptor(org.w3c.dom.Node parent,
                                        T descriptor)
write the descriptor class to a DOM tree and return it

Specified by:
writeDescriptor in interface XMLNode<T extends RootDeploymentDescriptor>
Overrides:
writeDescriptor in class DisplayableComponentNode<T extends RootDeploymentDescriptor>
Parameters:
parent - node for the DOM tree
descriptor - the descriptor to write
Returns:
the DOM tree top node

writeMessageDestinations

protected void writeMessageDestinations(org.w3c.dom.Node parentNode,
                                        java.util.Iterator msgDestinations)

addBundleNodeAttributes

protected void addBundleNodeAttributes(org.w3c.dom.Element bundleNode,
                                       RootDeploymentDescriptor descriptor)
write the necessary attributes for the root node of this DDs document


addPrefixMapping

public void addPrefixMapping(java.lang.String prefix,
                             java.lang.String uri)
notify of a new prefix mapping used in this document

Specified by:
addPrefixMapping in interface XMLNode<T extends RootDeploymentDescriptor>
Overrides:
addPrefixMapping in class DeploymentDescriptorNode<T extends RootDeploymentDescriptor>

getSchemaURL

protected java.lang.String getSchemaURL()
Returns:
the complete URL for JAVAEE schemas

setSpecVersion

protected void setSpecVersion()
Sets the specVersion for this descriptor depending on the docType



Copyright © 2012 GlassFish Community. All Rights Reserved.