Class AbstractBundleNode<T extends RootDeploymentDescriptor>
- java.lang.Object
-
- com.sun.enterprise.deployment.node.DeploymentDescriptorNode<T>
-
- com.sun.enterprise.deployment.node.DisplayableComponentNode<T>
-
- com.sun.enterprise.deployment.node.AbstractBundleNode<T>
-
- All Implemented Interfaces:
BundleNode,RootXMLNode<T>,XMLNode<T>
- Direct Known Subclasses:
AppClientNode,ApplicationNode,ConnectorNode,EjbBundleNode,JaxrpcMappingDescriptorNode,PermissionsNode,PersistenceNode,WebCommonNode,WebServicesDescriptorNode,WLWebServicesDescriptorNode
public abstract class AbstractBundleNode<T extends RootDeploymentDescriptor> extends DisplayableComponentNode<T> implements BundleNode, RootXMLNode<T>
This class defines all the common behaviour among nodes responsibles for handling bundles- Author:
- Jerome Dochez
-
-
Field Summary
Fields Modifier and Type Field Description protected StringdocTypeprotected static StringSCHEMA_LOCATION_TAGstatic StringW3C_XML_SCHEMAstatic StringW3C_XML_SCHEMA_INSTANCE-
Fields inherited from class com.sun.enterprise.deployment.node.DeploymentDescriptorNode
abstractDescriptor, handlers, localStrings, parentNode, rootNode, serviceLocator
-
-
Constructor Summary
Constructors Constructor Description AbstractBundleNode()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddBundleNodeAttributes(Element bundleNode, RootDeploymentDescriptor descriptor)write the necessary attributes for the root node of this DDs documentvoidaddPrefixMapping(String prefix, String uri)notify of a new prefix mapping used in this documentstatic ElementappendChildNS(Node parent, String elementName, String nameSpace)Collection<String>elementsAllowingEmptyValue()Returns the element names related to the standard or related runtime nodes for which the parser should allow empty values.Collection<String>elementsPreservingWhiteSpace()Returns the element names related to the standard or related runtime nodes for which the parser should preserve whitespace.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.protected StringgetSchemaURL()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 StringtopLevelTagName()Gives the element (tag) name to be used for the top-level element of descriptors corresponding to this bundle node type.protected StringtopLevelTagValue(T descriptor)Gives the text value to be used for the top-level element in the descriptor corresponding to this bundle node type.NodewriteDescriptor(Node parent, T descriptor)write the descriptor class to a DOM tree and return itprotected voidwriteMessageDestinations(Node parentNode, 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, createDescriptor, endElement, forceAppendTextChild, getDescriptor, getHandlerFor, getLocalPartFromQName, getOwnerDocument, getParentNode, getPrefixFromQName, getRootNode, getXMLPath, getXMLRootTag, handlesElement, postParsing, registerElementHandler, registerElementHandler, resolvePrefix, setAttribute, setAttributeNS, setAttributeValue, setDescriptorInfo, setParentNode, setXMLRootTag, startElement, 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.BundleNode
registerBundle, registerRuntimeBundle
-
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, getRootNode, getXMLPath, handlesElement, resolvePrefix, startElement
-
-
-
-
Field Detail
-
W3C_XML_SCHEMA
public static final String W3C_XML_SCHEMA
- See Also:
- Constant Field Values
-
W3C_XML_SCHEMA_INSTANCE
public static final String W3C_XML_SCHEMA_INSTANCE
- See Also:
- Constant Field Values
-
SCHEMA_LOCATION_TAG
protected static final String SCHEMA_LOCATION_TAG
- See Also:
- Constant Field Values
-
docType
protected String docType
-
-
Method Detail
-
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- for the xml
-
appendChildNS
public static Element appendChildNS(Node parent, String elementName, String nameSpace)
-
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
-
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
-
writeDescriptor
public Node writeDescriptor(Node parent, T descriptor)
write the descriptor class to a DOM tree and return it- Specified by:
writeDescriptorin interfaceXMLNode<T extends RootDeploymentDescriptor>- Overrides:
writeDescriptorin classDisplayableComponentNode<T extends RootDeploymentDescriptor>- Parameters:
parent- node for the DOM treedescriptor- the descriptor to write- Returns:
- the DOM tree top node
-
topLevelTagName
protected String topLevelTagName()
Gives the element (tag) name to be used for the top-level element of descriptors corresponding to this bundle node type.- Returns:
- top-level element name for the descriptor
-
topLevelTagValue
protected String topLevelTagValue(T descriptor)
Gives the text value to be used for the top-level element in the descriptor corresponding to this bundle node type.- Parameters:
descriptor- descriptor data structure for the current node- Returns:
-
elementsAllowingEmptyValue
public Collection<String> elementsAllowingEmptyValue()
Description copied from interface:BundleNodeReturns the element names related to the standard or related runtime nodes for which the parser should allow empty values.- Specified by:
elementsAllowingEmptyValuein interfaceBundleNode
-
elementsPreservingWhiteSpace
public Collection<String> elementsPreservingWhiteSpace()
Description copied from interface:BundleNodeReturns the element names related to the standard or related runtime nodes for which the parser should preserve whitespace.- Specified by:
elementsPreservingWhiteSpacein interfaceBundleNode
-
writeMessageDestinations
protected void writeMessageDestinations(Node parentNode, Iterator msgDestinations)
-
addBundleNodeAttributes
protected void addBundleNodeAttributes(Element bundleNode, RootDeploymentDescriptor descriptor)
write the necessary attributes for the root node of this DDs document
-
addPrefixMapping
public void addPrefixMapping(String prefix, String uri)
notify of a new prefix mapping used in this document- Specified by:
addPrefixMappingin interfaceXMLNode<T extends RootDeploymentDescriptor>- Overrides:
addPrefixMappingin classDeploymentDescriptorNode<T extends RootDeploymentDescriptor>
-
getSchemaURL
protected String getSchemaURL()
- Returns:
- the complete URL for JAKARTAEE schemas
-
setSpecVersion
protected void setSpecVersion()
Sets the specVersion for this descriptor depending on the docType
-
-