SessionManagerNodepublic class SessionManagerNode extends WebRuntimeNode superclass node for WebProperty container |
Constructors Summary |
---|
public SessionManagerNode()Initialize the child handlers
registerElementHandler(new XMLElement(RuntimeTagNames.MANAGER_PROPERTIES),
WebPropertyContainerNode.class, "setManagerProperties");
registerElementHandler(new XMLElement(RuntimeTagNames.STORE_PROPERTIES),
WebPropertyContainerNode.class, "setStoreProperties");
|
Methods Summary |
---|
public void | setElementValue(com.sun.enterprise.deployment.node.XMLElement element, java.lang.String value)receives notification of the value for a particular tag
RuntimeDescriptor descriptor = getRuntimeDescriptor();
if (descriptor==null) {
throw new RuntimeException("Trying to set values on a null descriptor");
}
if (element.getQName().equals(RuntimeTagNames.PERSISTENCE_TYPE)) {
descriptor.setAttributeValue(SessionManager.PERSISTENCE_TYPE, value);
}
| public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.runtime.web.SessionManager descriptor)write the descriptor class to a DOM tree and return it
Element sessionMgr = (Element) super.writeDescriptor(parent, nodeName, descriptor);
// manager-properties?
if (descriptor.getManagerProperties()!=null) {
WebPropertyNode wpn = new WebPropertyNode();
Node mgrProps = appendChild(sessionMgr, RuntimeTagNames.MANAGER_PROPERTIES);
wpn.writeDescriptor(mgrProps, RuntimeTagNames.PROPERTY, descriptor.getManagerProperties().getWebProperty());
}
// store-properties?
if (descriptor.getStoreProperties()!=null) {
WebPropertyNode wpn = new WebPropertyNode();
Node storeProps = appendChild(sessionMgr, RuntimeTagNames.STORE_PROPERTIES);
wpn.writeDescriptor(storeProps, RuntimeTagNames.PROPERTY, descriptor.getStoreProperties().getWebProperty());
}
// persistence-type?
setAttribute(sessionMgr, RuntimeTagNames.PERSISTENCE_TYPE, (String) descriptor.getAttributeValue(SessionManager.PERSISTENCE_TYPE));
return sessionMgr;
|
|