com.sun.enterprise.deployment.node.connector
Class ConnectorNode

java.lang.Object
  extended by com.sun.enterprise.deployment.node.DeploymentDescriptorNode<T>
      extended by com.sun.enterprise.deployment.node.DisplayableComponentNode<T>
          extended by com.sun.enterprise.deployment.node.BundleNode<ConnectorDescriptor>
              extended by com.sun.enterprise.deployment.node.connector.ConnectorNode
All Implemented Interfaces:
RootXMLNode<ConnectorDescriptor>, XMLNode<ConnectorDescriptor>

public class ConnectorNode
extends BundleNode<ConnectorDescriptor>

The top connector node class

Version:
Author:
Sheetal Vartak

Field Summary
static java.lang.String PUBLIC_DTD_ID
           
static java.lang.String PUBLIC_DTD_ID_10
           
static java.lang.String PUBLIC_DTD_ID_15
           
static java.lang.String PUBLIC_DTD_ID_16
           
static java.lang.String SCHEMA_ID
           
static java.lang.String SCHEMA_ID_15
           
static java.lang.String SCHEMA_ID_16
           
static java.lang.String SPEC_VERSION
           
static java.lang.String SYSTEM_ID
           
static java.lang.String SYSTEM_ID_10
           
static java.lang.String SYSTEM_ID_15
           
static java.lang.String SYSTEM_ID_16
           
static XMLElement tag
           
static java.lang.String VERSION_10
           
static java.lang.String VERSION_15
           
static java.lang.String VERSION_16
           
 
Fields inherited from class com.sun.enterprise.deployment.node.BundleNode
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
 
Constructor Summary
ConnectorNode()
           
 
Method Summary
 void addDescriptor(java.lang.Object newDescriptor)
          Adds a new DOL descriptor instance to the descriptor instance associated with this XMLNode
 ConnectorDescriptor getDescriptor()
           
protected  java.util.Map 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.
 java.lang.String getDocType()
           
 XMLNode getHandlerFor(XMLElement element)
          Return the XMLNode implementation respionsible for handling the sub-element of the current node
protected  java.lang.String getSchemaURL()
           
 java.lang.String getSpecVersion()
           
 java.lang.String getSystemID()
           
 java.util.List<java.lang.String> getSystemIDs()
           
protected  XMLElement getXMLRootTag()
           
 boolean handlesElement(XMLElement element)
          Return true if the XMLNode is responisble for handling the XML element
static java.lang.String registerBundle(java.util.Map publicIDToDTD)
          register this node as a root node capable of loading entire DD files
protected  boolean setAttributeValue(XMLElement elementName, XMLElement attributeName, java.lang.String value)
          parsed an attribute of an element
 void setElementValue(XMLElement element, java.lang.String value)
          receives notification of the value for a particular tag
 org.w3c.dom.Node writeDescriptor(org.w3c.dom.Node parent, ConnectorDescriptor conDesc)
          write the descriptor class to a DOM tree and return it
 
Methods inherited from class com.sun.enterprise.deployment.node.BundleNode
addBundleNodeAttributes, addPrefixMapping, appendChildNS, 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, endElement, forceAppendTextChild, getLocalPartFromQName, getOwnerDocument, getParentNode, getPrefixFromQName, getXMLPath, postParsing, registerElementHandler, registerElementHandler, resolvePrefix, setAttribute, setAttributeNS, setDescriptorInfo, setParentNode, setXMLRootTag, startElement, writeAroundInvokeDescriptors, writeAroundTimeoutDescriptors, writeDataSourceDefinitionDescriptors, writeDescriptor, writeEjbReferenceDescriptors, writeEntityManagerFactoryReferenceDescriptors, writeEntityManagerReferenceDescriptors, writeEnvEntryDescriptors, writeJNDIEnvironmentRefs, writeLocalizedDescriptions, writeMessageDestinationRefDescriptors, writePostActivateDescriptors, writePostConstructDescriptors, writePreDestroyDescriptors, writePrePassivateDescriptors, writeResourceEnvRefDescriptors, writeResourceRefDescriptors, writeServiceReferenceDescriptors
 
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, getXMLPath, resolvePrefix, startElement
 

Field Detail

VERSION_10

public static final java.lang.String VERSION_10
See Also:
Constant Field Values

VERSION_15

public static final java.lang.String VERSION_15
See Also:
Constant Field Values

VERSION_16

public static final java.lang.String VERSION_16
See Also:
Constant Field Values

PUBLIC_DTD_ID_10

public static final java.lang.String PUBLIC_DTD_ID_10
See Also:
Constant Field Values

SYSTEM_ID_10

public static final java.lang.String SYSTEM_ID_10
See Also:
Constant Field Values

PUBLIC_DTD_ID_15

public static final java.lang.String PUBLIC_DTD_ID_15
See Also:
Constant Field Values

SYSTEM_ID_15

public static final java.lang.String SYSTEM_ID_15
See Also:
Constant Field Values

SCHEMA_ID_15

public static final java.lang.String SCHEMA_ID_15
See Also:
Constant Field Values

PUBLIC_DTD_ID_16

public static final java.lang.String PUBLIC_DTD_ID_16
See Also:
Constant Field Values

SYSTEM_ID_16

public static final java.lang.String SYSTEM_ID_16
See Also:
Constant Field Values

SCHEMA_ID_16

public static final java.lang.String SCHEMA_ID_16
See Also:
Constant Field Values

PUBLIC_DTD_ID

public static final java.lang.String PUBLIC_DTD_ID
See Also:
Constant Field Values

SYSTEM_ID

public static final java.lang.String SYSTEM_ID
See Also:
Constant Field Values

SCHEMA_ID

public static final java.lang.String SCHEMA_ID
See Also:
Constant Field Values

SPEC_VERSION

public static final java.lang.String SPEC_VERSION
See Also:
Constant Field Values

tag

public static final XMLElement tag
Constructor Detail

ConnectorNode

public ConnectorNode()
Method Detail

registerBundle

public static java.lang.String registerBundle(java.util.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

getDescriptor

public ConnectorDescriptor getDescriptor()
Specified by:
getDescriptor in interface XMLNode<ConnectorDescriptor>
Overrides:
getDescriptor in class DeploymentDescriptorNode<ConnectorDescriptor>
Returns:
the descriptor instance to associate with this XMLNode

setAttributeValue

protected boolean setAttributeValue(XMLElement elementName,
                                    XMLElement attributeName,
                                    java.lang.String value)
parsed an attribute of an element

Overrides:
setAttributeValue in class DeploymentDescriptorNode<ConnectorDescriptor>
Parameters:
the - element name
the - attribute name
the - attribute value
Returns:
true if the attribute was processed

setElementValue

public void setElementValue(XMLElement element,
                            java.lang.String value)
receives notification of the value for a particular tag

Specified by:
setElementValue in interface XMLNode<ConnectorDescriptor>
Overrides:
setElementValue in class BundleNode<ConnectorDescriptor>
Parameters:
element - the xml element
value - 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 interface XMLNode<ConnectorDescriptor>
Overrides:
handlesElement in class DeploymentDescriptorNode<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 interface XMLNode<ConnectorDescriptor>
Overrides:
getHandlerFor in class DeploymentDescriptorNode<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 class DeploymentDescriptorNode<ConnectorDescriptor>
Returns:
the XML tag associated with this XMLNode

addDescriptor

public void addDescriptor(java.lang.Object newDescriptor)
Adds a new DOL descriptor instance to the descriptor instance associated with this XMLNode

Specified by:
addDescriptor in interface XMLNode<ConnectorDescriptor>
Overrides:
addDescriptor in class DeploymentDescriptorNode<ConnectorDescriptor>
Parameters:
descriptor - the new descriptor

getDispatchTable

protected java.util.Map 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 class BundleNode<ConnectorDescriptor>
Returns:
the map with the element name as a key, the setter method as a value

getDocType

public java.lang.String getDocType()
Returns:
the DOCTYPE of the XML file

getSystemID

public java.lang.String getSystemID()
Returns:
the SystemID of the XML file

getSystemIDs

public java.util.List<java.lang.String> getSystemIDs()
Returns:
the list of SystemID of the XML schema supported

writeDescriptor

public org.w3c.dom.Node writeDescriptor(org.w3c.dom.Node parent,
                                        ConnectorDescriptor conDesc)
write the descriptor class to a DOM tree and return it

Specified by:
writeDescriptor in interface XMLNode<ConnectorDescriptor>
Overrides:
writeDescriptor in class BundleNode<ConnectorDescriptor>
Parameters:
parent - node for the DOM tree
the - descriptor to write
Returns:
the DOM tree top node

getSpecVersion

public java.lang.String getSpecVersion()
Returns:
the default spec version level this node complies to

getSchemaURL

protected java.lang.String getSchemaURL()
Overrides:
getSchemaURL in class BundleNode<ConnectorDescriptor>
Returns:
the schema URL


Copyright © 2012 GlassFish Community. All Rights Reserved.