1 23 24 package com.sun.enterprise.deployment.node.runtime; 25 26 import com.sun.enterprise.deployment.runtime.JavaWebStartAccessDescriptor; 27 import java.util.List ; 28 import java.util.Map ; 29 import java.util.Set ; 30 import org.w3c.dom.Node ; 31 32 import com.sun.enterprise.deployment.Descriptor; 33 import com.sun.enterprise.deployment.ApplicationClientDescriptor; 34 import com.sun.enterprise.deployment.Application; 35 import com.sun.enterprise.deployment.node.XMLElement; 36 import com.sun.enterprise.deployment.xml.ApplicationTagNames; 37 import com.sun.enterprise.deployment.xml.RuntimeTagNames; 38 import com.sun.enterprise.deployment.xml.WebServicesTagNames; 39 import com.sun.enterprise.deployment.xml.DTDRegistry; 40 import com.sun.enterprise.deployment.util.DOLUtils; 41 42 49 public class AppClientRuntimeNode extends RuntimeBundleNode 50 { 51 52 public AppClientRuntimeNode(Descriptor descriptor) { 53 super(descriptor); 54 } 55 56 public AppClientRuntimeNode() { 57 } 58 59 62 protected void Init() { 63 64 handlers = null; 66 67 registerElementHandler(new XMLElement(RuntimeTagNames.RESOURCE_REFERENCE), 68 ResourceRefNode.class); 69 registerElementHandler(new XMLElement(RuntimeTagNames.EJB_REFERENCE), 70 EjbRefNode.class); 71 registerElementHandler(new XMLElement(RuntimeTagNames.RESOURCE_ENV_REFERENCE), 72 ResourceEnvRefNode.class); 73 registerElementHandler(new XMLElement(RuntimeTagNames.MESSAGE_DESTINATION_REFERENCE), 74 MessageDestinationRefNode.class); 75 registerElementHandler(new XMLElement(RuntimeTagNames.MESSAGE_DESTINATION), 76 MessageDestinationRuntimeNode.class); 77 registerElementHandler(new XMLElement(WebServicesTagNames.SERVICE_REF), 78 ServiceRefNode.class); 79 registerElementHandler(new XMLElement(RuntimeTagNames.JAVA_WEB_START_ACCESS), 80 JavaWebStartAccessNode.class); 81 82 83 } 84 85 91 public static String registerBundle(Map publicIDToDTD) { 92 publicIDToDTD.put(DTDRegistry.SUN_APPCLIENT_130_DTD_PUBLIC_ID, DTDRegistry.SUN_APPCLIENT_130_DTD_SYSTEM_ID); 93 publicIDToDTD.put(DTDRegistry.SUN_APPCLIENT_140_DTD_PUBLIC_ID, DTDRegistry.SUN_APPCLIENT_140_DTD_SYSTEM_ID); 94 publicIDToDTD.put(DTDRegistry.SUN_APPCLIENT_141_DTD_PUBLIC_ID, DTDRegistry.SUN_APPCLIENT_141_DTD_SYSTEM_ID); 95 publicIDToDTD.put(DTDRegistry.SUN_APPCLIENT_500_DTD_PUBLIC_ID, DTDRegistry.SUN_APPCLIENT_500_DTD_SYSTEM_ID); 96 if (!restrictDTDDeclarations()) { 97 publicIDToDTD.put(DTDRegistry.SUN_APPCLIENT_140beta_DTD_PUBLIC_ID, DTDRegistry.SUN_APPCLIENT_140beta_DTD_SYSTEM_ID); 98 } 99 return RuntimeTagNames.S1AS_APPCLIENT_RUNTIME_TAG; 100 } 101 102 105 protected XMLElement getXMLRootTag() { 106 return new XMLElement(RuntimeTagNames.S1AS_APPCLIENT_RUNTIME_TAG); 107 } 108 109 112 public String getDocType() { 113 return DTDRegistry.SUN_APPCLIENT_500_DTD_PUBLIC_ID; 114 } 115 116 119 public String getSystemID() { 120 return DTDRegistry.SUN_APPCLIENT_500_DTD_SYSTEM_ID; 121 } 122 123 126 public List <String > getSystemIDs() { 127 return null; 128 } 129 130 137 public Node writeDescriptor(Node parent, Descriptor descriptor) { 138 if (! (descriptor instanceof ApplicationClientDescriptor)) { 139 throw new IllegalArgumentException (getClass() + " cannot handles descriptors of type " + descriptor.getClass()); 140 } 141 142 Node appClient = super.writeDescriptor(parent, descriptor); 143 ApplicationClientDescriptor bundleDescriptor = (ApplicationClientDescriptor) descriptor; 144 RuntimeDescriptorNode.writeCommonComponentInfo(appClient, descriptor); 145 RuntimeDescriptorNode.writeMessageDestinationInfo(appClient, bundleDescriptor); 146 JavaWebStartAccessNode.writeJavaWebStartInfo(appClient, bundleDescriptor.getJavaWebStartAccessDescriptor()); 147 return appClient; 148 } 149 } 150 | Popular Tags |