AppClientNodepublic class AppClientNode extends com.sun.enterprise.deployment.node.BundleNode implements com.sun.enterprise.deployment.node.RootXMLNodeThis class is responsible for handling app clients |
Fields Summary |
---|
private com.sun.enterprise.deployment.ApplicationClientDescriptor | descriptor | public static final String | PUBLIC_DTD_ID_12 | public static final String | SYSTEM_ID_12 | public static final String | PUBLIC_DTD_ID | public static final String | SYSTEM_ID | public static final String | SCHEMA_ID_14 | public static final String | SCHEMA_ID | public static final String | SPEC_VERSION | private static final List | systemIDs | public static final com.sun.enterprise.deployment.node.XMLElement | tag |
Constructors Summary |
---|
public AppClientNode()Creates new AppClientNode
registerElementHandler(new XMLElement(TagNames.ENVIRONMENT_PROPERTY),
EnvEntryNode.class, "addEnvironmentProperty");
registerElementHandler(new XMLElement(EjbTagNames.EJB_REFERENCE), EjbReferenceNode.class);
registerElementHandler(new XMLElement(EjbTagNames.EJB_LOCAL_REFERENCE), EjbLocalReferenceNode.class);
registerElementHandler(new XMLElement(WebServicesTagNames.SERVICE_REF), ServiceReferenceNode.class, "addServiceReferenceDescriptor");
registerElementHandler(new XMLElement(EjbTagNames.RESOURCE_REFERENCE),
ResourceRefNode.class, "addResourceReferenceDescriptor");
registerElementHandler(new XMLElement(TagNames.RESOURCE_ENV_REFERENCE),
ResourceEnvRefNode.class, "addJmsDestinationReferenceDescriptor");
registerElementHandler(new XMLElement(TagNames.MESSAGE_DESTINATION_REFERENCE), MessageDestinationRefNode.class, "addMessageDestinationReferenceDescriptor");
registerElementHandler(new XMLElement(TagNames.PERSISTENCE_UNIT_REF), EntityManagerFactoryReferenceNode.class, "addEntityManagerFactoryReferenceDescriptor");
registerElementHandler(new XMLElement(TagNames.MESSAGE_DESTINATION),
MessageDestinationNode.class,
"addMessageDestination");
registerElementHandler(new XMLElement(TagNames.POST_CONSTRUCT), LifecycleCallbackNode.class, "addPostConstructDescriptor");
registerElementHandler(new XMLElement(TagNames.PRE_DESTROY), LifecycleCallbackNode.class, "addPreDestroyDescriptor");
|
Methods Summary |
---|
public void | addDescriptor(java.lang.Object newDescriptor)Adds a new DOL descriptor instance to the descriptor instance associated with
this XMLNode
if (newDescriptor instanceof EjbReference) {
DOLUtils.getDefaultLogger().fine("Adding ejb ref " + newDescriptor);
((ApplicationClientDescriptor)getDescriptor()).addEjbReferenceDescriptor(
(EjbReference) newDescriptor);
} else {
super.addDescriptor(newDescriptor);
}
| public java.lang.Object | getDescriptor()
if (descriptor == null) {
descriptor = (ApplicationClientDescriptor) DescriptorFactory.getDescriptor(getXMLPath());
}
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(ApplicationClientTagNames.CALLBACK_HANDLER, "setCallbackHandler");
return table;
| public java.lang.String | getDocType()
return null;
| public java.lang.String | getSpecVersion()
return SPEC_VERSION;
| public java.lang.String | getSystemID()
return SCHEMA_ID;
| public java.util.List | getSystemIDs()
return systemIDs;
| protected com.sun.enterprise.deployment.node.XMLElement | getXMLRootTag()
return tag;
| private static java.util.List | initSystemIDs()
final ArrayList<String> systemIDs = new ArrayList<String>();
systemIDs.add(SCHEMA_ID);
systemIDs.add(SCHEMA_ID_14);
return Collections.unmodifiableList(systemIDs);
| public static java.lang.String | registerBundle(java.util.Map publicIDToDTD)register this node as a root node capable of loading entire DD files
publicIDToDTD.put(PUBLIC_DTD_ID, SYSTEM_ID);
publicIDToDTD.put(PUBLIC_DTD_ID_12, SYSTEM_ID_12);
return tag.getQName();
| public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, com.sun.enterprise.deployment.Descriptor descriptor)write the descriptor class to a DOM tree and return it
if (! (descriptor instanceof ApplicationClientDescriptor)) {
throw new IllegalArgumentException(getClass() + " cannot handle descriptors of type " + descriptor.getClass());
}
ApplicationClientDescriptor appclientDesc = (ApplicationClientDescriptor) descriptor;
Node appclientNode = super.writeDescriptor(parent, appclientDesc);
// env-entry*
writeEnvEntryDescriptors(appclientNode, appclientDesc.getEnvironmentProperties().iterator());
// ejb-ref * and ejb-local-ref*
writeEjbReferenceDescriptors(appclientNode, appclientDesc.getEjbReferenceDescriptors().iterator());
// service-ref*
writeServiceReferenceDescriptors(appclientNode, appclientDesc.getServiceReferenceDescriptors().iterator());
// resource-ref*
writeResourceRefDescriptors(appclientNode, appclientDesc.getResourceReferenceDescriptors().iterator());
// resource-env-ref*
writeResourceEnvRefDescriptors(appclientNode, appclientDesc.getJmsDestinationReferenceDescriptors().iterator());
// message-destination-ref*
writeMessageDestinationRefDescriptors(appclientNode, appclientDesc.getMessageDestinationReferenceDescriptors().iterator());
// persistence-unit-ref*
writeEntityManagerFactoryReferenceDescriptors(appclientNode, appclientDesc.getEntityManagerFactoryReferenceDescriptors().iterator());
// post-construct
writePostConstructDescriptors(appclientNode, appclientDesc.getPostConstructDescriptors().iterator());
// pre-destroy
writePreDestroyDescriptors(appclientNode, appclientDesc.getPreDestroyDescriptors().iterator());
appendTextChild(appclientNode, ApplicationClientTagNames.CALLBACK_HANDLER, appclientDesc.getCallbackHandler());
// message-destination*
writeMessageDestinations
(appclientNode, appclientDesc.getMessageDestinations().iterator());
return appclientNode;
|
|