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 Tdescriptorprotected 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 voidaddDescriptor(Object descriptor)Adds a new DOL descriptor instance to the descriptor instance associated with this XMLNodestatic ElementappendChildNS(Node parent, String elementName, String nameSpace)TgetDescriptor()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)StringgetSpecVersion()protected voidinit()Initializes the child handler;voidrecordNodeMapping(String currentElementName, String subElementName, Class subElementHandler)record mapping of sub element to node class for the current elementprotected static booleanrestrictDTDDeclarations()voidsetDocType(String docType)set the DOCTYPE as read in the input XML FilevoidsetElementValue(XMLElement element, String value)receives notiification of the value for a particular tagprotected voidsetSpecVersion()Sets the specVersion for this descriptor depending on the docTypeprotected voidwriteMessageDestinationInfo(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:
addDescriptorin interfaceXMLNode<T extends RootDeploymentDescriptor>- Overrides:
addDescriptorin classDeploymentDescriptorNode<T extends RootDeploymentDescriptor>- Parameters:
descriptor- the new descriptor
-
getDescriptor
public T getDescriptor()
- Specified by:
getDescriptorin interfaceXMLNode<T extends RootDeploymentDescriptor>- Overrides:
getDescriptorin classDeploymentDescriptorNode<T extends RootDeploymentDescriptor>- Returns:
- the descriptor instance to associate with this XMLNode
-
getSpecVersion
public String getSpecVersion()
- Specified by:
getSpecVersionin 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:
setDocTypein 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:
setElementValuein interfaceXMLNode<T extends RootDeploymentDescriptor>- Overrides:
setElementValuein 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:
getDispatchTablein classDeploymentDescriptorNode<T extends RootDeploymentDescriptor>- Returns:
- the map with the element name as a key, the setter method as a value
-
-