Class ApplicationNode
- java.lang.Object
-
- com.sun.enterprise.deployment.node.DeploymentDescriptorNode<T>
-
- com.sun.enterprise.deployment.node.DisplayableComponentNode<T>
-
- com.sun.enterprise.deployment.node.AbstractBundleNode<Application>
-
- com.sun.enterprise.deployment.node.ApplicationNode
-
- All Implemented Interfaces:
BundleNode,RootXMLNode<Application>,XMLNode<Application>
@Service public class ApplicationNode extends AbstractBundleNode<Application>
This class is responsible for loading and saving XML elements- Version:
- Author:
- Jerome Dochez
-
-
Field Summary
Fields Modifier and Type Field Description static StringPUBLIC_DTD_IDThe public ID.static StringPUBLIC_DTD_ID_12static StringSCHEMA_IDstatic StringSCHEMA_ID_14static StringSCHEMA_ID_15static StringSCHEMA_ID_16static StringSCHEMA_ID_17static StringSCHEMA_ID_18static StringSCHEMA_ID_19static StringSPEC_VERSIONstatic StringSYSTEM_IDThe system ID.static StringSYSTEM_ID_12static XMLElementtag-
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 ApplicationNode()Creates new ApplicationNode
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDescriptor(Object newDescriptor)Adds a new DOL descriptor instance to the descriptor instance associated with this XMLNodeCollection<String>elementsAllowingEmptyValue()Returns the element names related to the standard or related runtime nodes for which the parser should allow empty values.ApplicationgetDescriptor()StringgetDocType()StringgetSpecVersion()StringgetSystemID()List<String>getSystemIDs()protected XMLElementgetXMLRootTag()StringregisterBundle(Map 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.voidsetElementValue(XMLElement element, String value)receives notiification of the value for a particular tagprotected StringtopLevelTagName()Gives the element (tag) name to be used for the top-level element of descriptors corresponding to this bundle node type.protected StringtopLevelTagValue(Application 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, Application application)write the descriptor class to a DOM tree and return it-
Methods inherited from class com.sun.enterprise.deployment.node.AbstractBundleNode
addBundleNodeAttributes, addPrefixMapping, appendChildNS, elementsPreservingWhiteSpace, getDispatchTable, getSchemaURL, setDocType, setSpecVersion, 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, endElement, 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
endElement, getHandlerFor, getParentNode, getRootNode, getXMLPath, handlesElement, resolvePrefix, startElement
-
-
-
-
Field Detail
-
PUBLIC_DTD_ID
public static final String PUBLIC_DTD_ID
The public ID.- 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.- See Also:
- Constant Field Values
-
SYSTEM_ID_12
public static final String SYSTEM_ID_12
- See Also:
- Constant Field Values
-
SCHEMA_ID_14
public static final String SCHEMA_ID_14
- See Also:
- Constant Field Values
-
SCHEMA_ID_15
public static final String SCHEMA_ID_15
- See Also:
- Constant Field Values
-
SCHEMA_ID_16
public static final String SCHEMA_ID_16
- See Also:
- Constant Field Values
-
SCHEMA_ID_17
public static final String SCHEMA_ID_17
- See Also:
- Constant Field Values
-
SCHEMA_ID_18
public static final String SCHEMA_ID_18
- See Also:
- Constant Field Values
-
SCHEMA_ID_19
public static final String SCHEMA_ID_19
- See Also:
- Constant Field Values
-
SCHEMA_ID
public static final String SCHEMA_ID
- See Also:
- Constant Field Values
-
SPEC_VERSION
public static final String SPEC_VERSION
- See Also:
- Constant Field Values
-
tag
public static final XMLElement tag
-
-
Method Detail
-
registerBundle
public String registerBundle(Map 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:BundleNodeRegisters 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:BundleNodeReturns the element names related to the standard or related runtime nodes for which the parser should allow empty values.- Specified by:
elementsAllowingEmptyValuein interfaceBundleNode- Overrides:
elementsAllowingEmptyValuein classAbstractBundleNode<Application>
-
topLevelTagName
protected String topLevelTagName()
Description copied from class:AbstractBundleNodeGives the element (tag) name to be used for the top-level element of descriptors corresponding to this bundle node type.- Overrides:
topLevelTagNamein classAbstractBundleNode<Application>- Returns:
- top-level element name for the descriptor
-
topLevelTagValue
protected String topLevelTagValue(Application descriptor)
Description copied from class:AbstractBundleNodeGives the text value to be used for the top-level element in the descriptor corresponding to this bundle node type.- Overrides:
topLevelTagValuein classAbstractBundleNode<Application>- Parameters:
descriptor- descriptor data structure for the current node- Returns:
-
getXMLRootTag
protected XMLElement getXMLRootTag()
- Overrides:
getXMLRootTagin classDeploymentDescriptorNode<Application>- Returns:
- the XML tag associated with this XMLNode
-
setElementValue
public void setElementValue(XMLElement element, String value)
receives notiification of the value for a particular tag- Specified by:
setElementValuein interfaceXMLNode<Application>- Overrides:
setElementValuein classAbstractBundleNode<Application>- Parameters:
element- the xml elementvalue- it's associated value
-
addDescriptor
public void addDescriptor(Object newDescriptor)
Adds a new DOL descriptor instance to the descriptor instance associated with this XMLNode- Specified by:
addDescriptorin interfaceXMLNode<Application>- Overrides:
addDescriptorin classDeploymentDescriptorNode<Application>- Parameters:
newDescriptor- the new descriptor
-
getDescriptor
public Application getDescriptor()
- Specified by:
getDescriptorin interfaceXMLNode<Application>- Overrides:
getDescriptorin classDeploymentDescriptorNode<Application>- Returns:
- the descriptor instance to associate 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, Application application)
write the descriptor class to a DOM tree and return it- Specified by:
writeDescriptorin interfaceXMLNode<Application>- Overrides:
writeDescriptorin classAbstractBundleNode<Application>- Parameters:
parent- parent nodeapplication- to write- Returns:
- the DOM tree top node
-
getSpecVersion
public String getSpecVersion()
- Returns:
- the default spec version level this node complies to
-
-