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 String
PUBLIC_DTD_ID
The public ID.static String
PUBLIC_DTD_ID_12
static String
SCHEMA_ID
static String
SCHEMA_ID_14
static String
SCHEMA_ID_15
static String
SCHEMA_ID_16
static String
SCHEMA_ID_17
static String
SCHEMA_ID_18
static String
SCHEMA_ID_19
static String
SPEC_VERSION
static String
SYSTEM_ID
The system ID.static String
SYSTEM_ID_12
static XMLElement
tag
-
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 void
addDescriptor(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.Application
getDescriptor()
String
getDocType()
String
getSpecVersion()
String
getSystemID()
List<String>
getSystemIDs()
protected XMLElement
getXMLRootTag()
String
registerBundle(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.void
setElementValue(XMLElement element, String value)
receives notiification of the value for a particular tagprotected String
topLevelTagName()
Gives the element (tag) name to be used for the top-level element of descriptors corresponding to this bundle node type.protected String
topLevelTagValue(Application descriptor)
Gives the text value to be used for the top-level element in the descriptor corresponding to this bundle node type.Node
writeDescriptor(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: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<Application>
-
topLevelTagName
protected String topLevelTagName()
Description copied from class:AbstractBundleNode
Gives the element (tag) name to be used for the top-level element of descriptors corresponding to this bundle node type.- Overrides:
topLevelTagName
in classAbstractBundleNode<Application>
- Returns:
- top-level element name for the descriptor
-
topLevelTagValue
protected String topLevelTagValue(Application descriptor)
Description copied from class:AbstractBundleNode
Gives the text value to be used for the top-level element in the descriptor corresponding to this bundle node type.- Overrides:
topLevelTagValue
in classAbstractBundleNode<Application>
- Parameters:
descriptor
- descriptor data structure for the current node- Returns:
-
getXMLRootTag
protected XMLElement getXMLRootTag()
- Overrides:
getXMLRootTag
in 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:
setElementValue
in interfaceXMLNode<Application>
- Overrides:
setElementValue
in 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:
addDescriptor
in interfaceXMLNode<Application>
- Overrides:
addDescriptor
in classDeploymentDescriptorNode<Application>
- Parameters:
newDescriptor
- the new descriptor
-
getDescriptor
public Application getDescriptor()
- Specified by:
getDescriptor
in interfaceXMLNode<Application>
- Overrides:
getDescriptor
in 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:
writeDescriptor
in interfaceXMLNode<Application>
- Overrides:
writeDescriptor
in 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
-
-