Class WebBundleNode
- java.lang.Object
-
- com.sun.enterprise.deployment.node.DeploymentDescriptorNode<T>
-
- com.sun.enterprise.deployment.node.DisplayableComponentNode<T>
-
- com.sun.enterprise.deployment.node.AbstractBundleNode<T>
-
- org.glassfish.web.deployment.node.WebCommonNode<WebBundleDescriptorImpl>
-
- org.glassfish.web.deployment.node.WebBundleNode
-
- All Implemented Interfaces:
BundleNode
,RootXMLNode<WebBundleDescriptorImpl>
,XMLNode<WebBundleDescriptorImpl>
public class WebBundleNode extends WebCommonNode<WebBundleDescriptorImpl>
This node is responsible for handling the web-app xml tree- Version:
- Author:
- Jerome Dochez
-
-
Field Summary
Fields Modifier and Type Field Description static String
PUBLIC_DTD_ID
The public ID for my documents.static String
PUBLIC_DTD_ID_12
static String
SCHEMA_ID
static String
SCHEMA_ID_24
static String
SCHEMA_ID_25
static String
SCHEMA_ID_30
static String
SCHEMA_ID_31
static String
SCHEMA_ID_40
static String
SYSTEM_ID
The system ID of my documents.static String
SYSTEM_ID_12
static XMLElement
tag
-
Fields inherited from class org.glassfish.web.deployment.node.WebCommonNode
descriptor, SPEC_VERSION
-
Fields inherited from class com.sun.enterprise.deployment.node.AbstractBundleNode
docType, SCHEMA_LOCATION_TAG, W3C_XML_SCHEMA, W3C_XML_SCHEMA_INSTANCE
-
Fields inherited from class com.sun.enterprise.deployment.node.DeploymentDescriptorNode
abstractDescriptor, handlers, localStrings, parentNode, rootNode, serviceLocator
-
-
Constructor Summary
Constructors Constructor Description WebBundleNode()
Creates new WebBundleNode
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.boolean
endElement(XMLElement element)
receives notification of the end of an XML element by the ParserWebBundleDescriptorImpl
getDescriptor()
String
getDocType()
String
getSystemID()
List<String>
getSystemIDs()
protected XMLElement
getXMLRootTag()
String
registerBundle(Map<String,String> publicIDToDTD)
register this node as a root node capable of loading entire DD filesMap<String,Class<?>>
registerRuntimeBundle(Map<String,String> publicIDToDTD, Map<String,List<Class<?>>> versionUpgrades)
Registers all appropriate runtime bundle nodes for this standard node into the map.void
setElementValue(XMLElement element, String value)
receives notiification of the value for a particular tagNode
writeDescriptor(Node parent, WebBundleDescriptorImpl webBundleDesc)
write the descriptor class to a DOM tree and return it-
Methods inherited from class org.glassfish.web.deployment.node.WebCommonNode
addDescriptor, getSpecVersion
-
Methods inherited from class com.sun.enterprise.deployment.node.AbstractBundleNode
addBundleNodeAttributes, addPrefixMapping, appendChildNS, getDispatchTable, getSchemaURL, setDocType, setSpecVersion, topLevelTagName, topLevelTagValue, writeMessageDestinations
-
Methods inherited from class com.sun.enterprise.deployment.node.DisplayableComponentNode
writeDisplayableComponentInfo
-
Methods inherited from class com.sun.enterprise.deployment.node.DeploymentDescriptorNode
addNamespaceDeclaration, addNodeDescriptor, appendChild, appendQNameChild, appendTextChild, appendTextChild, composeQNameValue, createDescriptor, forceAppendTextChild, getHandlerFor, getLocalPartFromQName, getOwnerDocument, getParentNode, getPrefixFromQName, getRootNode, getXMLPath, 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.XMLNode
getHandlerFor, getParentNode, getRootNode, getXMLPath, handlesElement, resolvePrefix, startElement
-
-
-
-
Field Detail
-
tag
public static final XMLElement tag
-
PUBLIC_DTD_ID
public static final String PUBLIC_DTD_ID
The public ID for my documents.- See Also:
- Constant Field Values
-
PUBLIC_DTD_ID_12
public static final String PUBLIC_DTD_ID_12
- See Also:
- Constant Field Values
-
SYSTEM_ID
public static final String SYSTEM_ID
The system ID of my documents.- See Also:
- Constant Field Values
-
SYSTEM_ID_12
public static final String SYSTEM_ID_12
- See Also:
- Constant Field Values
-
SCHEMA_ID_24
public static final String SCHEMA_ID_24
- See Also:
- Constant Field Values
-
SCHEMA_ID_25
public static final String SCHEMA_ID_25
- See Also:
- Constant Field Values
-
SCHEMA_ID_30
public static final String SCHEMA_ID_30
- See Also:
- Constant Field Values
-
SCHEMA_ID_31
public static final String SCHEMA_ID_31
- See Also:
- Constant Field Values
-
SCHEMA_ID_40
public static final String SCHEMA_ID_40
- See Also:
- Constant Field Values
-
SCHEMA_ID
public static final String SCHEMA_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
registerBundle
public String registerBundle(Map<String,String> publicIDToDTD)
register this node as a root node capable of loading entire DD files- Parameters:
publicIDToDTD
- is a mapping between xml Public-ID to DTD- Returns:
- the doctype tag name
-
registerRuntimeBundle
public Map<String,Class<?>> registerRuntimeBundle(Map<String,String> publicIDToDTD, Map<String,List<Class<?>>> versionUpgrades)
Description copied from interface:BundleNode
Registers all appropriate runtime bundle nodes for this standard node into the map.The implementation class must add to the map one entry for each associated runtime descriptor node, with the entry key equal to the public ID of the runtime DTD and the value the system ID of the runtime DTD. The implementation must also return a map containing one entry for each associated runtime node, with the entry key equal to the top-level element name for the runtime descriptor and the entry value equal to the class of the runtime node.
versionUpgrades
- The list of upgrades from older versions to the latest schema- Returns:
- map from top-level runtime descriptor element name to the corresponding runtime node class
-
elementsAllowingEmptyValue
public Collection<String> elementsAllowingEmptyValue()
Description copied from interface:BundleNode
Returns the element names related to the standard or related runtime nodes for which the parser should allow empty values.- Specified by:
elementsAllowingEmptyValue
in interfaceBundleNode
- Overrides:
elementsAllowingEmptyValue
in classAbstractBundleNode<WebBundleDescriptorImpl>
-
elementsPreservingWhiteSpace
public Collection<String> elementsPreservingWhiteSpace()
Description copied from interface:BundleNode
Returns the element names related to the standard or related runtime nodes for which the parser should preserve whitespace.- Specified by:
elementsPreservingWhiteSpace
in interfaceBundleNode
- Overrides:
elementsPreservingWhiteSpace
in classAbstractBundleNode<WebBundleDescriptorImpl>
-
setElementValue
public void setElementValue(XMLElement element, String value)
Description copied from class:WebCommonNode
receives notiification of the value for a particular tag- Specified by:
setElementValue
in interfaceXMLNode<WebBundleDescriptorImpl>
- Overrides:
setElementValue
in classWebCommonNode<WebBundleDescriptorImpl>
- Parameters:
element
- the xml elementvalue
- it's associated value
-
endElement
public boolean endElement(XMLElement element)
Description copied from class:WebCommonNode
receives notification of the end of an XML element by the Parser- Specified by:
endElement
in interfaceXMLNode<WebBundleDescriptorImpl>
- Overrides:
endElement
in classWebCommonNode<WebBundleDescriptorImpl>
- Parameters:
element
- the xml tag identification- Returns:
- true if this node is done processing the XML sub tree
-
getDescriptor
public WebBundleDescriptorImpl getDescriptor()
- Specified by:
getDescriptor
in interfaceXMLNode<WebBundleDescriptorImpl>
- Overrides:
getDescriptor
in classDeploymentDescriptorNode<WebBundleDescriptorImpl>
- Returns:
- the descriptor instance to associate with this XMLNode
-
getXMLRootTag
protected XMLElement getXMLRootTag()
- Overrides:
getXMLRootTag
in classDeploymentDescriptorNode<WebBundleDescriptorImpl>
- Returns:
- the XML tag associated with this XMLNode
-
getDocType
public String getDocType()
- Returns:
- the DOCTYPE of the XML file
-
getSystemID
public String getSystemID()
- Returns:
- the SystemID of the XML file
-
getSystemIDs
public List<String> getSystemIDs()
- Returns:
- the list of SystemID of the XML schema supported
-
writeDescriptor
public Node writeDescriptor(Node parent, WebBundleDescriptorImpl webBundleDesc)
write the descriptor class to a DOM tree and return it- Specified by:
writeDescriptor
in interfaceXMLNode<WebBundleDescriptorImpl>
- Overrides:
writeDescriptor
in classWebCommonNode<WebBundleDescriptorImpl>
- Parameters:
parent
- node for the DOM treethe
- descriptor to write- Returns:
- the DOM tree top node
-
-