SessionConfigNodepublic class SessionConfigNode extends WebRuntimeNode superclass node for WebProperty container |
Constructors Summary |
---|
public SessionConfigNode()Initialize the child handlers
registerElementHandler(new XMLElement(RuntimeTagNames.SESSION_MANAGER),
SessionManagerNode.class, "setSessionManager");
registerElementHandler(new XMLElement(RuntimeTagNames.SESSION_PROPERTIES),
WebPropertyContainerNode.class, "setSessionProperties");
registerElementHandler(new XMLElement(RuntimeTagNames.COOKIE_PROPERTIES),
WebPropertyContainerNode.class, "setCookieProperties");
|
Methods Summary |
---|
public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.runtime.web.SessionConfig descriptor)write the descriptor class to a DOM tree and return it
Node sessionConfig = super.writeDescriptor(parent, nodeName, descriptor);
// session-manager?
if (descriptor.getSessionManager()!=null) {
SessionManagerNode smn = new SessionManagerNode();
smn.writeDescriptor(sessionConfig, RuntimeTagNames.SESSION_MANAGER, descriptor.getSessionManager());
}
// session-properties?
if (descriptor.getSessionProperties()!=null) {
WebPropertyNode wpn = new WebPropertyNode();
Node sessionProps = appendChild(sessionConfig, RuntimeTagNames.SESSION_PROPERTIES);
wpn.writeDescriptor(sessionProps, RuntimeTagNames.PROPERTY, descriptor.getSessionProperties().getWebProperty());
}
// cookie-properties?
if (descriptor.getCookieProperties()!=null) {
WebPropertyNode wpn = new WebPropertyNode();
Node cookieProps = appendChild(sessionConfig, RuntimeTagNames.COOKIE_PROPERTIES);
wpn.writeDescriptor(cookieProps, RuntimeTagNames.PROPERTY, descriptor.getCookieProperties().getWebProperty());
}
return sessionConfig;
|
|