Class EjbBundleNode
- java.lang.Object
-
- com.sun.enterprise.deployment.node.DeploymentDescriptorNode<T>
-
- com.sun.enterprise.deployment.node.DisplayableComponentNode<T>
-
- com.sun.enterprise.deployment.node.AbstractBundleNode<EjbBundleDescriptorImpl>
-
- org.glassfish.ejb.deployment.node.EjbBundleNode
-
- All Implemented Interfaces:
BundleNode,RootXMLNode<EjbBundleDescriptorImpl>,XMLNode<EjbBundleDescriptorImpl>
@Service public class EjbBundleNode extends AbstractBundleNode<EjbBundleDescriptorImpl>
This class handles ejb bundle xml files- Author:
- Jerome Dochez
-
-
Field Summary
Fields Modifier and Type Field Description static StringPUBLIC_DTD_IDstatic StringPUBLIC_DTD_ID_12static StringSCHEMA_IDstatic StringSCHEMA_ID_21static StringSCHEMA_ID_30static StringSCHEMA_ID_31static StringSCHEMA_ID_32static StringSCHEMA_ID_33static StringSPEC_VERSIONstatic StringSYSTEM_IDThe system ID of an ejb-jar document.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 EjbBundleNode()
-
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 XMLNodeEjbBundleDescriptorImplgetDescriptor()protected MapgetDispatchTable()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.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 tagNodewriteDescriptor(Node parent, EjbBundleDescriptorImpl ejbDesc)write the descriptor class to a DOM tree and return it-
Methods inherited from class com.sun.enterprise.deployment.node.AbstractBundleNode
addBundleNodeAttributes, addPrefixMapping, appendChildNS, elementsAllowingEmptyValue, elementsPreservingWhiteSpace, 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, 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
-
tag
public static final XMLElement tag
-
PUBLIC_DTD_ID
public static final String PUBLIC_DTD_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 of an ejb-jar document.- See Also:
- Constant Field Values
-
SYSTEM_ID_12
public static final String SYSTEM_ID_12
- See Also:
- Constant Field Values
-
SCHEMA_ID_21
public static final String SCHEMA_ID_21
- 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_32
public static final String SCHEMA_ID_32
- See Also:
- Constant Field Values
-
SCHEMA_ID_33
public static final String SCHEMA_ID_33
- 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
-
-
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
-
addDescriptor
public void addDescriptor(Object newDescriptor)
Description copied from class:DeploymentDescriptorNodeAdds a new DOL descriptor instance to the descriptor instance associated with this XMLNode- Specified by:
addDescriptorin interfaceXMLNode<EjbBundleDescriptorImpl>- Overrides:
addDescriptorin classDeploymentDescriptorNode<EjbBundleDescriptorImpl>- Parameters:
newDescriptor- the new descriptor
-
setElementValue
public void setElementValue(XMLElement element, String value)
Description copied from class:AbstractBundleNodereceives notiification of the value for a particular tag- Specified by:
setElementValuein interfaceXMLNode<EjbBundleDescriptorImpl>- Overrides:
setElementValuein classAbstractBundleNode<EjbBundleDescriptorImpl>- Parameters:
element- the xml elementvalue- it's associated value
-
getDescriptor
public EjbBundleDescriptorImpl getDescriptor()
- Specified by:
getDescriptorin interfaceXMLNode<EjbBundleDescriptorImpl>- Overrides:
getDescriptorin classDeploymentDescriptorNode<EjbBundleDescriptorImpl>- Returns:
- the descriptor instance to associate with this XMLNode
-
getXMLRootTag
protected XMLElement getXMLRootTag()
- Overrides:
getXMLRootTagin classDeploymentDescriptorNode<EjbBundleDescriptorImpl>- Returns:
- the XML tag associated with this XMLNode
-
getDispatchTable
protected Map getDispatchTable()
Description copied from class:AbstractBundleNodeall 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 classAbstractBundleNode<EjbBundleDescriptorImpl>- Returns:
- the map with the element name as a key, the setter method as a value
-
writeDescriptor
public Node writeDescriptor(Node parent, EjbBundleDescriptorImpl ejbDesc)
Description copied from class:AbstractBundleNodewrite the descriptor class to a DOM tree and return it- Specified by:
writeDescriptorin interfaceXMLNode<EjbBundleDescriptorImpl>- Overrides:
writeDescriptorin classAbstractBundleNode<EjbBundleDescriptorImpl>- Parameters:
parent- node for the DOM treeejbDesc- the descriptor to write- Returns:
- the DOM tree top node
-
getDocType
public String getDocType()
- Returns:
- the DOCTYPE that should be written to 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
-
getSpecVersion
public String getSpecVersion()
- Returns:
- the default spec version level this node complies to
-
-