From 3ff46c6dd323b0bb2c7c27495e7ef17601e7f0cd Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 21 Mar 2005 13:29:49 +0000 Subject: [PATCH] Add public setUserHandle(), setCacheNode(), getMessage(), setMessage() methods. --- src/helma/framework/core/Session.java | 41 +++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/src/helma/framework/core/Session.java b/src/helma/framework/core/Session.java index ad75e154..6cd17078 100644 --- a/src/helma/framework/core/Session.java +++ b/src/helma/framework/core/Session.java @@ -112,6 +112,13 @@ public class Session implements Serializable { } } + /** + * Set the user handle for this session. + */ + public void setUserHandle(NodeHandle handle) { + this.userHandle = handle; + } + /** * Get the Node handle for the current user, if logged in. */ @@ -130,6 +137,13 @@ public class Session implements Serializable { } } + /** + * Set the cache node for this session. + */ + public void setCacheNode(TransientNode node) { + this.cacheNode = node; + } + /** * Gets the transient cache node. */ @@ -234,10 +248,33 @@ public class Session implements Serializable { } /** - * Get the persistent user id of a registered user. This is usually the user name, or - * null if the user is not logged in. + * Get the persistent user id of a registered user. + * This is usually the user name, or null if the user is not logged in. */ public String getUID() { return uid; } + + + /** + * Return the message that is to be displayed upon the next + * request within this session. + * + * @return the message, or null if none was set. + */ + public String getMessage() { + return message; + } + + /** + * Set a message to be displayed to this session's user. This + * can be used to save a message over to the next request when + * the current request can't be used to display a user visible + * message. + * + * @param msg + */ + public void setMessage(String msg) { + message = msg; + } }