Methods Summary |
---|
public void | addDescriptor(java.lang.Object descriptor)Adds a new DOL descriptor instance to the descriptor instance associated with
this XMLNode
// done is getHandlerFor
|
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(TagNames.NAMESPACE, "setNameSpace");
return table;
|
public XMLNode | getHandlerFor(XMLElement element)
ExtensionElementNode subNode = new ExtensionElementNode();
DeploymentExtensionDescriptor o = (DeploymentExtensionDescriptor) getDescriptor();
o.addElement((ExtensionElementDescriptor) subNode.getDescriptor());
subNode.setXMLRootTag(new XMLElement(TagNames.EXTENSION_ELEMENT));
subNode.setParentNode(this);
return subNode;
|
public boolean | handlesElement(XMLElement element)
if (TagNames.EXTENSION_ELEMENT.equals(element.getQName())) {
return false;
}
return true;
|
public void | setElementValue(XMLElement element, java.lang.String value)receives notification of the value for a particular tag
if (TagNames.MUST_UNDERSTAND.equals(element.getQName())) {
if ("true".equals(value)) {
throw new RuntimeException("a deployment-extension tagged with mustUnderstand attribute is not understood");
}
} else
super.setElementValue(element, value);
|
protected void | writeDescriptor(org.w3c.dom.Node parentNode, java.util.Iterator itr)write the deployment extensions nodes associated with this node
ExtensionElementNode subNode = new ExtensionElementNode();
do {
DeploymentExtensionDescriptor descriptor = (DeploymentExtensionDescriptor) itr.next();
Element extensionNode = appendChild(parentNode, TagNames.DEPLOYMENT_EXTENSION);
setAttribute(extensionNode, TagNames.NAMESPACE, descriptor.getNameSpace());
if (descriptor.getMustUnderstand()) {
setAttribute(extensionNode, TagNames.MUST_UNDERSTAND, "true");
}
for (Iterator elements = descriptor.elements();elements.hasNext();) {
ExtensionElementDescriptor element = (ExtensionElementDescriptor) elements.next();
subNode.writeDescriptor(extensionNode, TagNames.EXTENSION_ELEMENT, element );
}
} while(itr.hasNext());
|