com.sun.enterprise.deployment.node
Class PersistenceNode

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
              extended by com.sun.enterprise.deployment.node.PersistenceNode
All Implemented Interfaces:
RootXMLNode, XMLNode

public class PersistenceNode
extends BundleNode

Represents the top level node, i.e. persistence node in persistence.xsd. Since this is a top level node, it extends BundleNode. This class registers a handler PersistenceNode which is responsible for reading the persistence-unit elements.

Author:
Sanjeeb.Sahoo@Sun.COM

Field Summary
static XMLElement ROOT_ELEMENT
           
static java.lang.String SCHEMA_ID
           
static java.lang.String SCHEMA_ID_1_0
           
static java.lang.String SCHEMA_NS
           
 
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
PersistenceNode()
          This is the default constructor which is also called from other constructors of this class.
PersistenceNode(PersistenceUnitsDescriptor persistenceUnitsDescriptor)
           
 
Method Summary
 void addDescriptor(java.lang.Object descriptor)
          Adds a new DOL descriptor instance to the descriptor instance associated with this XMLNode
 PersistenceUnitsDescriptor getDescriptor()
           
 java.lang.String getDocType()
           
 java.lang.String getNameSpace()
           
 java.lang.String getSpecVersion()
           
 java.lang.String getSystemID()
           
 java.util.List<java.lang.String> getSystemIDs()
           
protected  XMLElement getXMLRootTag()
           
 
Methods inherited from class com.sun.enterprise.deployment.node.BundleNode
addBundleNodeAttributes, addPrefixMapping, appendChildNS, getDispatchTable, getSchemaURL, setDocType, setElementValue, setSpecVersion, writeDescriptor, 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, getHandlerFor, getLocalPartFromQName, getOwnerDocument, getParentNode, getPrefixFromQName, getXMLPath, handlesElement, postParsing, registerElementHandler, registerElementHandler, resolvePrefix, setAttribute, setAttributeNS, setAttributeValue, 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, getHandlerFor, getParentNode, getXMLPath, handlesElement, resolvePrefix, startElement
 

Field Detail

SCHEMA_NS

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

SCHEMA_ID_1_0

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

SCHEMA_ID

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

ROOT_ELEMENT

public static final XMLElement ROOT_ELEMENT
Constructor Detail

PersistenceNode

public PersistenceNode()
This is the default constructor which is also called from other constructors of this class. Inside this constructor, we clear the handlers set up by super classes' constructors because they are not applicable in the context of PersistenceNode because unlike standard Java EE schemas, persistence.xsd does not include javaee_5.xsd for things like description, version etc.


PersistenceNode

public PersistenceNode(PersistenceUnitsDescriptor persistenceUnitsDescriptor)
Method Detail

getDescriptor

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

addDescriptor

public void addDescriptor(java.lang.Object descriptor)
Description copied from class: DeploymentDescriptorNode
Adds a new DOL descriptor instance to the descriptor instance associated with this XMLNode

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

getDocType

public java.lang.String getDocType()
Returns:
the DOCTYPE that should be written to the XML file

getSystemID

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

getNameSpace

public java.lang.String getNameSpace()

getXMLRootTag

protected XMLElement getXMLRootTag()
Overrides:
getXMLRootTag in class DeploymentDescriptorNode
Returns:
the XML tag associated with this XMLNode

getSystemIDs

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

getSpecVersion

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


Copyright © 2012 GlassFish Community. All Rights Reserved.