FileDocCategorySizeDatePackage
AppClientRuntimeNode.javaAPI DocGlassfish v2 API6922Fri May 04 22:31:42 BST 2007com.sun.enterprise.deployment.node.runtime

AppClientRuntimeNode

public class AppClientRuntimeNode extends RuntimeBundleNode
This node is responsible for saving all J2EE RI runtime information for app clients
author
Jerome Dochez
version

Fields Summary
Constructors Summary
public AppClientRuntimeNode(com.sun.enterprise.deployment.Descriptor descriptor)

        super(descriptor);
    
public AppClientRuntimeNode()

    
Methods Summary
protected voidInit()
Initialize the child handlers

        
        // we do not care about our standard DDS handles
        handlers = null;        
        
        registerElementHandler(new XMLElement(RuntimeTagNames.RESOURCE_REFERENCE), 
                               ResourceRefNode.class);     
        registerElementHandler(new XMLElement(RuntimeTagNames.EJB_REFERENCE), 
                               EjbRefNode.class);             
        registerElementHandler(new XMLElement(RuntimeTagNames.RESOURCE_ENV_REFERENCE), 
                               ResourceEnvRefNode.class);                     
        registerElementHandler(new XMLElement(RuntimeTagNames.MESSAGE_DESTINATION_REFERENCE),
                               MessageDestinationRefNode.class);
        registerElementHandler(new XMLElement(RuntimeTagNames.MESSAGE_DESTINATION), 
             MessageDestinationRuntimeNode.class);
	registerElementHandler(new XMLElement(WebServicesTagNames.SERVICE_REF),
                               ServiceRefNode.class);
        registerElementHandler(new XMLElement(RuntimeTagNames.JAVA_WEB_START_ACCESS),
                               JavaWebStartAccessNode.class);


    
public java.lang.StringgetDocType()

return
the DOCTYPE that should be written to the XML file

	return DTDRegistry.SUN_APPCLIENT_500_DTD_PUBLIC_ID;
    
public java.lang.StringgetSystemID()

return
the SystemID of the XML file

	return DTDRegistry.SUN_APPCLIENT_500_DTD_SYSTEM_ID;
    
public java.util.ListgetSystemIDs()

return
NULL for all runtime nodes.

        return null;
    
protected com.sun.enterprise.deployment.node.XMLElementgetXMLRootTag()

return
the XML tag associated with this XMLNode

        return new XMLElement(RuntimeTagNames.S1AS_APPCLIENT_RUNTIME_TAG);
    
public static java.lang.StringregisterBundle(java.util.Map publicIDToDTD)
register this node as a root node capable of loading entire DD files

param
publicIDToDTD is a mapping between xml Public-ID to DTD
return
the doctype tag name

    
       publicIDToDTD.put(DTDRegistry.SUN_APPCLIENT_130_DTD_PUBLIC_ID, DTDRegistry.SUN_APPCLIENT_130_DTD_SYSTEM_ID);
       publicIDToDTD.put(DTDRegistry.SUN_APPCLIENT_140_DTD_PUBLIC_ID, DTDRegistry.SUN_APPCLIENT_140_DTD_SYSTEM_ID);       
       publicIDToDTD.put(DTDRegistry.SUN_APPCLIENT_141_DTD_PUBLIC_ID, DTDRegistry.SUN_APPCLIENT_141_DTD_SYSTEM_ID);       
       publicIDToDTD.put(DTDRegistry.SUN_APPCLIENT_500_DTD_PUBLIC_ID, DTDRegistry.SUN_APPCLIENT_500_DTD_SYSTEM_ID);       
       if (!restrictDTDDeclarations()) {           
           publicIDToDTD.put(DTDRegistry.SUN_APPCLIENT_140beta_DTD_PUBLIC_ID, DTDRegistry.SUN_APPCLIENT_140beta_DTD_SYSTEM_ID);       
       }
       return RuntimeTagNames.S1AS_APPCLIENT_RUNTIME_TAG;
   
public org.w3c.dom.NodewriteDescriptor(org.w3c.dom.Node parent, com.sun.enterprise.deployment.Descriptor descriptor)
write the descriptor class to a DOM tree and return it

param
parent node for the DOM tree
param
the descriptor to write
return
the DOM tree top node

       
        if (! (descriptor instanceof ApplicationClientDescriptor)) {
            throw new IllegalArgumentException(getClass() + " cannot handles descriptors of type " + descriptor.getClass());
        }
        
        Node appClient = super.writeDescriptor(parent, descriptor);
        ApplicationClientDescriptor bundleDescriptor = (ApplicationClientDescriptor) descriptor;
        RuntimeDescriptorNode.writeCommonComponentInfo(appClient, descriptor);
        RuntimeDescriptorNode.writeMessageDestinationInfo(appClient, bundleDescriptor);
        JavaWebStartAccessNode.writeJavaWebStartInfo(appClient, bundleDescriptor.getJavaWebStartAccessDescriptor());
        return appClient;