|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.domui.state.UIContext
public class UIContext
A class which allows access to the page's context and related information. This is experimental. The PageContext is the root for all navigational information, and interfaces the pages and the server. This would usually be the task of the RequestContext, but that's an interface and I want the primary accessor to be in the same class.
Constructor Summary | |
---|---|
UIContext()
|
Method Summary | |
---|---|
static javax.servlet.http.Cookie |
createLoginCookie(long l)
|
static ConversationContext |
getCurrentConversation()
|
static Page |
getCurrentPage()
|
static IUser |
getCurrentUser()
Return the currently-known logged in user, or null if unknown/not logged in. |
static IUser |
getLoggedInUser()
This returns the currently logged in user. |
static IRequestContext |
getRequestContext()
|
static void |
internalClear()
This CLEARS all "current state" threadlocals. |
static IUser |
internalGetLoggedInUser(IRequestContext rx)
UNSTABLE INTERFACE. |
static void |
internalSet(IRequestContext rc)
Called when a new request is to be made current, or when the request has ended. |
static void |
internalSet(Page pg)
|
static boolean |
login(java.lang.String userid,
java.lang.String password)
Logs in a user. |
static void |
logout()
Logs out a user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UIContext()
Method Detail |
---|
public static IRequestContext getRequestContext()
public static void internalSet(@Nonnull IRequestContext rc) throws java.lang.Exception
rc
-
java.lang.Exception
public static void internalClear()
public static void internalSet(Page pg)
public static Page getCurrentPage()
public static ConversationContext getCurrentConversation()
@Nullable public static IUser getCurrentUser()
@Nonnull public static IUser getLoggedInUser()
public static IUser internalGetLoggedInUser(IRequestContext rx) throws java.lang.Exception
rci
-
java.lang.Exception
public static boolean login(java.lang.String userid, java.lang.String password) throws java.lang.Exception
userid
- password
-
java.lang.Exception
public static void logout() throws java.lang.Exception
java.lang.Exception
public static javax.servlet.http.Cookie createLoginCookie(long l) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |