CacheHelperNodepublic class CacheHelperNode extends WebRuntimeNode node for cache-helper tag |
Constructors Summary |
---|
public CacheHelperNode()
registerElementHandler(new XMLElement(RuntimeTagNames.PROPERTY),
WebPropertyNode.class, "addWebProperty");
|
Methods Summary |
---|
protected boolean | setAttributeValue(com.sun.enterprise.deployment.node.XMLElement elementName, com.sun.enterprise.deployment.node.XMLElement attributeName, java.lang.String value)parsed an attribute of an element
RuntimeDescriptor descriptor = (RuntimeDescriptor) getRuntimeDescriptor();
if (descriptor==null) {
throw new RuntimeException("Trying to set values on a null descriptor");
}
if (attributeName.getQName().equals(RuntimeTagNames.NAME)) {
descriptor.setAttributeValue(CacheHelper.NAME, value);
return true;
} else
if (attributeName.getQName().equals(RuntimeTagNames.CLASS_NAME)) {
descriptor.setAttributeValue(CacheHelper.CLASS_NAME, value);
return true;
}
return false;
| public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.runtime.web.CacheHelper descriptor)write the descriptor class to a DOM tree and return it
Element cacheHelper = (Element) super.writeDescriptor(parent, nodeName, descriptor);
// property*
WebProperty[] properties = descriptor.getWebProperty();
if (properties.length>0) {
WebPropertyNode wpn = new WebPropertyNode();
wpn.writeDescriptor(cacheHelper, RuntimeTagNames.PROPERTY, properties);
}
// name, class-name attribute
setAttribute(cacheHelper, RuntimeTagNames.NAME, (String) descriptor.getAttributeValue(CacheHelper.NAME));
setAttribute(cacheHelper, RuntimeTagNames.CLASS_NAME, (String) descriptor.getAttributeValue(CacheHelper.CLASS_NAME));
return cacheHelper;
|
|