Methods Summary |
---|
public void | addDescriptor(java.lang.Object obj)Adds a new DOL descriptor instance to the descriptor instance associated with
this XMLNode
if (obj instanceof EnvironmentProperty) {
adminObject.addConfigProperty((EnvironmentProperty)obj);
}
|
public java.lang.Object | getDescriptor()
if (adminObject == null) {
adminObject = (AdminObject) DescriptorFactory.getDescriptor(getXMLPath());
}
return adminObject;
|
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.
Map table = super.getDispatchTable();
table.put(ConnectorTagNames.ADMIN_OBJECT_INTERFACE, "setAdminObjectInterface");
table.put(ConnectorTagNames.ADMIN_OBJECT_CLASS, "setAdminObjectClass");
return table;
|
private void | register()method for registering the handlers with the various tags
registerElementHandler(new XMLElement(ConnectorTagNames.CONFIG_PROPERTY),
ConfigPropertyNode.class);
|
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 ConnectorDescriptor)) {
throw new IllegalArgumentException(getClass() + " cannot handle descriptors of type " + descriptor.getClass());
}
//adminObject info
for (Iterator adminObjects = ((ConnectorDescriptor)descriptor).getAdminObjects().iterator(); adminObjects.hasNext();) {
AdminObject adminObject = (AdminObject) adminObjects.next();
Node adminObjectNode = appendChild(parent, ConnectorTagNames.ADMIN_OBJECT);
appendTextChild(adminObjectNode, ConnectorTagNames.ADMIN_OBJECT_INTERFACE, adminObject.getAdminObjectInterface());
appendTextChild(adminObjectNode, ConnectorTagNames.ADMIN_OBJECT_CLASS, adminObject.getAdminObjectClass());
ConfigPropertyNode config = new ConfigPropertyNode();
adminObjectNode = config.writeDescriptor(adminObjectNode, adminObject);
}
return parent;
|