Class ConnectorNode
- java.lang.Object
-
- com.sun.enterprise.deployment.node.DeploymentDescriptorNode<T>
-
- com.sun.enterprise.deployment.node.DisplayableComponentNode<T>
-
- com.sun.enterprise.deployment.node.AbstractBundleNode<ConnectorDescriptor>
-
- com.sun.enterprise.deployment.node.connector.ConnectorNode
-
- All Implemented Interfaces:
BundleNode
,RootXMLNode<ConnectorDescriptor>
,XMLNode<ConnectorDescriptor>
@Service public class ConnectorNode extends AbstractBundleNode<ConnectorDescriptor>
The top connector node class- Author:
- Sheetal Vartak
-
-
Field Summary
Fields Modifier and Type Field Description static String
PUBLIC_DTD_ID
static String
PUBLIC_DTD_ID_10
static String
PUBLIC_DTD_ID_15
static String
PUBLIC_DTD_ID_16
static String
SCHEMA_ID
static String
SCHEMA_ID_15
static String
SCHEMA_ID_16
static String
SCHEMA_ID_17
static String
SCHEMA_ID_20
static String
SPEC_VERSION
static String
SYSTEM_ID
static String
SYSTEM_ID_10
static String
SYSTEM_ID_15
static String
SYSTEM_ID_16
static XMLElement
tag
static String
VERSION_10
static String
VERSION_15
static String
VERSION_16
static String
VERSION_17
static String
VERSION_20
-
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 ConnectorNode()
-
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 XMLNodeConnectorDescriptor
getDescriptor()
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.String
getDocType()
XMLNode
getHandlerFor(XMLElement element)
Return the XMLNode implementation respionsible for handling the sub-element of the current nodeprotected String
getSchemaURL()
String
getSpecVersion()
String
getSystemID()
List<String>
getSystemIDs()
protected XMLElement
getXMLRootTag()
boolean
handlesElement(XMLElement element)
Return true if the XMLNode is responisble for handling the XML elementString
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.protected boolean
setAttributeValue(XMLElement elementName, XMLElement attributeName, String value)
parsed an attribute of an elementvoid
setElementValue(XMLElement element, String value)
receives notification of the value for a particular tagNode
writeDescriptor(Node parent, ConnectorDescriptor conDesc)
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, 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, getLocalPartFromQName, getOwnerDocument, getParentNode, getPrefixFromQName, getRootNode, getXMLPath, postParsing, registerElementHandler, registerElementHandler, resolvePrefix, setAttribute, setAttributeNS, 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, getParentNode, getRootNode, getXMLPath, resolvePrefix, startElement
-
-
-
-
Field Detail
-
VERSION_10
public static final String VERSION_10
- See Also:
- Constant Field Values
-
VERSION_15
public static final String VERSION_15
- See Also:
- Constant Field Values
-
VERSION_16
public static final String VERSION_16
- See Also:
- Constant Field Values
-
VERSION_17
public static final String VERSION_17
- See Also:
- Constant Field Values
-
VERSION_20
public static final String VERSION_20
- See Also:
- Constant Field Values
-
PUBLIC_DTD_ID_10
public static final String PUBLIC_DTD_ID_10
- See Also:
- Constant Field Values
-
SYSTEM_ID_10
public static final String SYSTEM_ID_10
- See Also:
- Constant Field Values
-
PUBLIC_DTD_ID_15
public static final String PUBLIC_DTD_ID_15
- See Also:
- Constant Field Values
-
SYSTEM_ID_15
public static final String SYSTEM_ID_15
- See Also:
- Constant Field Values
-
SCHEMA_ID_15
public static final String SCHEMA_ID_15
- See Also:
- Constant Field Values
-
PUBLIC_DTD_ID_16
public static final String PUBLIC_DTD_ID_16
- See Also:
- Constant Field Values
-
SYSTEM_ID_16
public static final String SYSTEM_ID_16
- See Also:
- Constant Field Values
-
SCHEMA_ID_16
public static final String SCHEMA_ID_16
- See Also:
- Constant Field Values
-
PUBLIC_DTD_ID
public static final String PUBLIC_DTD_ID
- See Also:
- Constant Field Values
-
SYSTEM_ID
public static final String SYSTEM_ID
- See Also:
- Constant Field Values
-
SCHEMA_ID_17
public static final String SCHEMA_ID_17
- See Also:
- Constant Field Values
-
SCHEMA_ID_20
public static final String SCHEMA_ID_20
- 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<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
-
getDescriptor
public ConnectorDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfaceXMLNode<ConnectorDescriptor>
- Overrides:
getDescriptor
in classDeploymentDescriptorNode<ConnectorDescriptor>
- Returns:
- the descriptor instance to associate with this XMLNode
-
setAttributeValue
protected boolean setAttributeValue(XMLElement elementName, XMLElement attributeName, String value)
parsed an attribute of an element- Overrides:
setAttributeValue
in classDeploymentDescriptorNode<ConnectorDescriptor>
- Parameters:
the
- element namethe
- attribute namethe
- attribute value- Returns:
- true if the attribute was processed
-
setElementValue
public void setElementValue(XMLElement element, String value)
receives notification of the value for a particular tag- Specified by:
setElementValue
in interfaceXMLNode<ConnectorDescriptor>
- Overrides:
setElementValue
in classAbstractBundleNode<ConnectorDescriptor>
- Parameters:
element
- the xml elementvalue
- it's associated value
-
handlesElement
public boolean handlesElement(XMLElement element)
Description copied from interface:XMLNode
Return true if the XMLNode is responisble for handling the XML element- Specified by:
handlesElement
in interfaceXMLNode<ConnectorDescriptor>
- Overrides:
handlesElement
in classDeploymentDescriptorNode<ConnectorDescriptor>
- Parameters:
element
- the XML element type name- Returns:
- true if the element tag can be handled by any registered sub nodes of the current XMLNode
-
getHandlerFor
public XMLNode getHandlerFor(XMLElement element)
Description copied from interface:XMLNode
Return the XMLNode implementation respionsible for handling the sub-element of the current node- Specified by:
getHandlerFor
in interfaceXMLNode<ConnectorDescriptor>
- Overrides:
getHandlerFor
in classDeploymentDescriptorNode<ConnectorDescriptor>
- Parameters:
element
- the XML element type name- Returns:
- the handler registered for the subtag element of the curent XMLNode
-
getXMLRootTag
protected XMLElement getXMLRootTag()
- Overrides:
getXMLRootTag
in classDeploymentDescriptorNode<ConnectorDescriptor>
- Returns:
- the XML tag associated with this XMLNode
-
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<ConnectorDescriptor>
- Overrides:
addDescriptor
in classDeploymentDescriptorNode<ConnectorDescriptor>
- Parameters:
descriptor
- the new descriptor
-
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:
getDispatchTable
in classAbstractBundleNode<ConnectorDescriptor>
- Returns:
- the map with the element name as a key, the setter method as a value
-
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, ConnectorDescriptor conDesc)
write the descriptor class to a DOM tree and return it- Specified by:
writeDescriptor
in interfaceXMLNode<ConnectorDescriptor>
- Overrides:
writeDescriptor
in classAbstractBundleNode<ConnectorDescriptor>
- Parameters:
parent
- node for the DOM treethe
- descriptor to write- Returns:
- the DOM tree top node
-
getSpecVersion
public String getSpecVersion()
- Returns:
- the default spec version level this node complies to
-
getSchemaURL
protected String getSchemaURL()
- Overrides:
getSchemaURL
in classAbstractBundleNode<ConnectorDescriptor>
- Returns:
- the schema URL
-
-