Class RuntimeBundleNode<T extends RootDeploymentDescriptor>
- java.lang.Object
-
- com.sun.enterprise.deployment.node.DeploymentDescriptorNode<T>
-
- com.sun.enterprise.deployment.node.runtime.RuntimeBundleNode<T>
-
- All Implemented Interfaces:
RootXMLNode<T>
,XMLNode<T>
- Direct Known Subclasses:
AppClientRuntimeNode
,ApplicationRuntimeNode
,ConnectorNode
,EjbBundleRuntimeNode
,WebBundleRuntimeNode
,WeblogicApplicationNode
public abstract class RuntimeBundleNode<T extends RootDeploymentDescriptor> extends DeploymentDescriptorNode<T> implements RootXMLNode<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected T
descriptor
protected HashMap<String,LinkedHashMap<String,Class>>
elementToNodeMappings
-
Fields inherited from class com.sun.enterprise.deployment.node.DeploymentDescriptorNode
abstractDescriptor, handlers, localStrings, parentNode, rootNode, serviceLocator
-
-
Constructor Summary
Constructors Constructor Description RuntimeBundleNode()
RuntimeBundleNode(T descriptor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDescriptor(Object descriptor)
Adds a new DOL descriptor instance to the descriptor instance associated with this XMLNodestatic Element
appendChildNS(Node parent, String elementName, String nameSpace)
T
getDescriptor()
protected Map<String,String>
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.LinkedHashMap<String,Class>
getNodeMappings(String currentElementName)
String
getSpecVersion()
protected void
init()
Initializes the child handler;void
recordNodeMapping(String currentElementName, String subElementName, Class subElementHandler)
record mapping of sub element to node class for the current elementprotected static boolean
restrictDTDDeclarations()
void
setDocType(String docType)
set the DOCTYPE as read in the input XML Filevoid
setElementValue(XMLElement element, String value)
receives notiification of the value for a particular tagprotected void
setSpecVersion()
Sets the specVersion for this descriptor depending on the docTypeprotected void
writeMessageDestinationInfo(Node parent, BundleDescriptor descriptor)
writes the message destination references runtime information-
Methods inherited from class com.sun.enterprise.deployment.node.DeploymentDescriptorNode
addNamespaceDeclaration, addNodeDescriptor, addPrefixMapping, appendChild, appendQNameChild, appendTextChild, appendTextChild, composeQNameValue, createDescriptor, endElement, forceAppendTextChild, getHandlerFor, getLocalPartFromQName, getOwnerDocument, getParentNode, getPrefixFromQName, getRootNode, getXMLPath, getXMLRootTag, handlesElement, postParsing, registerElementHandler, registerElementHandler, resolvePrefix, setAttribute, setAttributeNS, setAttributeValue, setDescriptorInfo, setParentNode, setXMLRootTag, startElement, writeDescriptor, writeDescriptor, writeDescriptors, writeEjbReferenceDescriptors, writeEntityManagerFactoryReferenceDescriptors, writeEntityManagerReferenceDescriptors, writeEnvEntryDescriptors, writeJNDIEnvironmentRefs, writeLifeCycleCallbackDescriptors, writeLocalizedDescriptions, writeMessageDestinationRefDescriptors, writeResourceDescriptors, writeResourceEnvRefDescriptors, writeResourceRefDescriptors, writeServiceReferenceDescriptors, writeSimpleTextDescriptor, writeSubDescriptors
-
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, getSystemID, getSystemIDs
-
Methods inherited from interface com.sun.enterprise.deployment.node.XMLNode
addPrefixMapping, endElement, getHandlerFor, getParentNode, getRootNode, getXMLPath, handlesElement, resolvePrefix, startElement, writeDescriptor
-
-
-
-
Field Detail
-
descriptor
protected T extends RootDeploymentDescriptor descriptor
-
elementToNodeMappings
protected HashMap<String,LinkedHashMap<String,Class>> elementToNodeMappings
-
-
Constructor Detail
-
RuntimeBundleNode
public RuntimeBundleNode(T descriptor)
-
RuntimeBundleNode
public RuntimeBundleNode()
-
-
Method Detail
-
init
protected void init()
Initializes the child handler;
-
addDescriptor
public void addDescriptor(Object descriptor)
Adds a new DOL descriptor instance to the descriptor instance associated with this XMLNode- Specified by:
addDescriptor
in interfaceXMLNode<T extends RootDeploymentDescriptor>
- Overrides:
addDescriptor
in classDeploymentDescriptorNode<T extends RootDeploymentDescriptor>
- Parameters:
descriptor
- the new descriptor
-
getDescriptor
public T getDescriptor()
- Specified by:
getDescriptor
in interfaceXMLNode<T extends RootDeploymentDescriptor>
- Overrides:
getDescriptor
in classDeploymentDescriptorNode<T extends RootDeploymentDescriptor>
- Returns:
- the descriptor instance to associate with this XMLNode
-
getSpecVersion
public String getSpecVersion()
- Specified by:
getSpecVersion
in interfaceRootXMLNode<T extends RootDeploymentDescriptor>
- Returns:
- the default spec version level this node complies to
-
setDocType
public void setDocType(String docType)
set the DOCTYPE as read in the input XML File- Specified by:
setDocType
in interfaceRootXMLNode<T extends RootDeploymentDescriptor>
- Parameters:
docType
-
-
setSpecVersion
protected void setSpecVersion()
Sets the specVersion for this descriptor depending on the docType
-
writeMessageDestinationInfo
protected void writeMessageDestinationInfo(Node parent, BundleDescriptor descriptor)
writes the message destination references runtime information- Parameters:
parent
-descriptor
-
-
restrictDTDDeclarations
protected static final boolean restrictDTDDeclarations()
- Returns:
- true if the runtime bundle node should only process the product FCS DTD declarations
-
appendChildNS
public static Element appendChildNS(Node parent, String elementName, String nameSpace)
-
recordNodeMapping
public void recordNodeMapping(String currentElementName, String subElementName, Class subElementHandler)
record mapping of sub element to node class for the current element- Parameters:
currentElementName
-subElementName
-subElementHandler
-
-
getNodeMappings
public LinkedHashMap<String,Class> getNodeMappings(String currentElementName)
-
setElementValue
public void setElementValue(XMLElement element, String value)
receives notiification of the value for a particular tag- Specified by:
setElementValue
in interfaceXMLNode<T extends RootDeploymentDescriptor>
- Overrides:
setElementValue
in classDeploymentDescriptorNode<T extends RootDeploymentDescriptor>
- Parameters:
element
- the xml elementvalue
- it's associated value
-
getDispatchTable
protected Map<String,String> 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 classDeploymentDescriptorNode<T extends RootDeploymentDescriptor>
- Returns:
- the map with the element name as a key, the setter method as a value
-
-