RANodepublic final class RANode extends com.sun.enterprise.deployment.node.DeploymentDescriptorNode
Fields Summary |
---|
private com.sun.enterprise.deployment.ConnectorDescriptor | descriptor | public static final String | VERSION_10 | public static final String | VERSION_15 |
Methods Summary |
---|
public java.lang.Object | getDescriptor()
if (descriptor == null) {
descriptor = (ConnectorDescriptor)getParentNode().getDescriptor();
}
return descriptor;
| 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.
// no need to be synchronized for now
Map table = super.getDispatchTable();
table.put(ConnectorTagNames.RESOURCE_ADAPTER_CLASS, "setResourceAdapterClass");
return table;
| private void | register()
//check for the version of DTD
registerElementHandler(new XMLElement(ConnectorTagNames.OUTBOUND_RESOURCE_ADAPTER),
OutBoundRANode.class);
registerElementHandler(new XMLElement(ConnectorTagNames.INBOUND_RESOURCE_ADAPTER),
InBoundRANode.class);
registerElementHandler(new XMLElement(ConnectorTagNames.CONFIG_PROPERTY),
ConfigPropertyNode.class, "addConfigProperty");
registerElementHandler(new XMLElement(ConnectorTagNames.ADMIN_OBJECT),
AdminObjectNode.class, "addAdminObject");
registerElementHandler(new XMLElement(ConnectorTagNames.SECURITY_PERMISSION),
SecurityPermissionNode.class, "addSecurityPermission");
| public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node connectorNode, com.sun.enterprise.deployment.Descriptor descriptor)write the descriptor class to a DOM tree and return it
if (! (descriptor instanceof ConnectorDescriptor)) {
throw new IllegalArgumentException(getClass() + " cannot handle descriptors of type " + descriptor.getClass());
}
ConnectorDescriptor conDesc = (ConnectorDescriptor) descriptor;
Node raNode = appendChild(connectorNode, ConnectorTagNames.RESOURCE_ADAPTER);
appendTextChild(raNode, ConnectorTagNames.RESOURCE_ADAPTER_CLASS, conDesc.getResourceAdapterClass());
//config-property
ConfigPropertyNode config = new ConfigPropertyNode();
raNode = config.writeDescriptor(raNode, conDesc);
if (conDesc.getOutBoundDefined() == true) {
//outbound RA info
OutBoundRANode obNode = new OutBoundRANode();
raNode = obNode.writeDescriptor(raNode, conDesc);
}
if (conDesc.getInBoundDefined() == true) {
//inbound RA info
InBoundRANode inNode = new InBoundRANode();
raNode = inNode.writeDescriptor(raNode, conDesc);
}
//adminobject
AdminObjectNode admin = new AdminObjectNode();
raNode = admin.writeDescriptor(raNode, conDesc);
//}
// security-permission*
SecurityPermissionNode secPerm = new SecurityPermissionNode();
raNode = secPerm.writeDescriptor(raNode, conDesc);
return connectorNode;
|
|