summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/certsrv/base/SessionContext.java
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2011-12-08 21:15:59 -0500
committerAde Lee <alee@redhat.com>2011-12-08 21:15:59 -0500
commit171aaece4f23709d33d180cf36eb3af5e454b0c9 (patch)
tree1485f9f0a7bd10de4ff25030db575dbb8dafae74 /pki/base/common/src/com/netscape/certsrv/base/SessionContext.java
parentadad2fcee8a29fdb82376fbce07dedb11fccc182 (diff)
downloadpki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.gz
pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.xz
pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.zip
Revert "Formatting"
This reverts commit 32150d3ee32f8ac27118af7c792794b538c78a2f.
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/base/SessionContext.java')
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/SessionContext.java60
1 files changed, 34 insertions, 26 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/base/SessionContext.java b/pki/base/common/src/com/netscape/certsrv/base/SessionContext.java
index 956a579e9..29c390acd 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/SessionContext.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/SessionContext.java
@@ -17,16 +17,19 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
+
import java.util.Hashtable;
+
/**
- * This class specifies the context object that includes authentication
- * environment and connection information. This object is later used in access
- * control evaluation. This is a global object that can be accessible throughout
- * the server. It is useful for passing global and per-thread infomration in
- * methods.
+ * This class specifies the context object that includes
+ * authentication environment and connection information.
+ * This object is later used in access control evaluation.
+ * This is a global object that can be accessible
+ * throughout the server. It is useful for passing
+ * global and per-thread infomration in methods.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class SessionContext extends Hashtable implements IAuthInfo {
@@ -64,7 +67,7 @@ public class SessionContext extends Hashtable implements IAuthInfo {
/**
* Group ID of the authenticated user in the current thread.
*/
- public static final String GROUP_ID = "groupid"; // String
+ public static final String GROUP_ID = "groupid"; //String
/**
* ID of the processing request in the current thread.
@@ -91,9 +94,10 @@ public class SessionContext extends Hashtable implements IAuthInfo {
}
/**
- * Creates a new context and associates it with the current thread. If the
- * current thread is also associated with a old context, the old context
- * will be replaced.
+ * Creates a new context and associates it with
+ * the current thread. If the current thread is
+ * also associated with a old context, the old
+ * context will be replaced.
*/
private static SessionContext createContext() {
SessionContext sc = new SessionContext();
@@ -103,10 +107,12 @@ public class SessionContext extends Hashtable implements IAuthInfo {
}
/**
- * Sets the current context. This allows the caller to associate a specific
- * session context with the current thread. This methods makes custom
- * session context possible.
- *
+ * Sets the current context. This allows the
+ * caller to associate a specific session context
+ * with the current thread.
+ * This methods makes custom session context
+ * possible.
+ *
* @param sc session context
*/
public static void setContext(SessionContext sc) {
@@ -114,14 +120,15 @@ public class SessionContext extends Hashtable implements IAuthInfo {
}
/**
- * Retrieves the session context associated with the current thread. If no
- * context is associated, a context is created.
- *
+ * Retrieves the session context associated with
+ * the current thread. If no context is associated,
+ * a context is created.
+ *
* @return sesssion context
*/
public static SessionContext getContext() {
- SessionContext sc = (SessionContext) mContexts.get(Thread
- .currentThread());
+ SessionContext sc = (SessionContext) mContexts.get(
+ Thread.currentThread());
if (sc == null) {
sc = createContext();
@@ -130,14 +137,15 @@ public class SessionContext extends Hashtable implements IAuthInfo {
}
/**
- * Retrieves the session context associated with the current thread. If no
- * context is associated, null is returned.
- *
+ * Retrieves the session context associated with
+ * the current thread. If no context is associated,
+ * null is returned.
+ *
* @return sesssion context
*/
public static SessionContext getExistingContext() {
- SessionContext sc = (SessionContext) mContexts.get(Thread
- .currentThread());
+ SessionContext sc = (SessionContext)
+ mContexts.get(Thread.currentThread());
if (sc == null) {
return null;
@@ -150,8 +158,8 @@ public class SessionContext extends Hashtable implements IAuthInfo {
* Releases the current session context.
*/
public static void releaseContext() {
- SessionContext sc = (SessionContext) mContexts.get(Thread
- .currentThread());
+ SessionContext sc = (SessionContext) mContexts.get(
+ Thread.currentThread());
if (sc != null) {
mContexts.remove(Thread.currentThread());