|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.core.util.CallContext
public class CallContext
This class encapsulate context in which certain (method) call execution is made. This class establishes that every call is made in the context of user and domain where the user belongs. This class is independent from the security implementation, therefore it doesn't refer to any specific security package. Overriden class actually implement concept of users and domains as proposed in this class.
| Constructor Summary | |
|---|---|
CallContext()
Default constructor. |
|
| Method Summary | |
|---|---|
java.util.Map |
getCache(java.lang.String strCacheKey)
Get custom cache for given key. |
int |
getCurrentDomainId()
Get curent domain ID, which can be used to limit current user or session to access only data in this domain. |
java.lang.String |
getCurrentSession()
Get identification of current session, which is jus a unique string which can identify the each individual session established between client and application. |
java.security.Principal |
getCurrentUser()
Get identification of current user. |
int |
getCurrentUserId()
Get curent user ID. |
static CallContext |
getInstance()
Get the default instance. |
Messages |
getMessages()
Get messages to display to user for current call. |
void |
reset()
Removes context (all information) for current call from stack. |
void |
resetCache()
Removes all cached items for current custom cache. |
void |
resetCurrentUserAndSession()
Removes who is the current user session for this call context from stack. |
void |
resetMessages()
Removes all messages for current call. |
protected void |
setCache(java.util.Map cache)
Set custom cache for this call context |
void |
setCurrentUserAndSession(java.security.Principal user,
java.lang.String session)
Set who is the current user and session for this call context. |
static void |
setInstance(CallContext defaultInstance)
Set the default instance. |
protected void |
setMessages(Messages msgs)
Set the error or information message object to collect messages to display to user for current call |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CallContext()
| Method Detail |
|---|
public static CallContext getInstance()
public static void setInstance(CallContext defaultInstance)
defaultInstance - - new default instancegetInstance()public java.security.Principal getCurrentUser()
public java.lang.String getCurrentSession()
public int getCurrentUserId()
public void setCurrentUserAndSession(java.security.Principal user,
java.lang.String session)
user - - information about user who is making the call.session - - information about session in whic user is making the call.public void resetCurrentUserAndSession()
public int getCurrentDomainId()
public Messages getMessages()
protected void setMessages(Messages msgs)
msgs - - messages for current callpublic void resetMessages()
public java.util.Map getCache(java.lang.String strCacheKey)
strCacheKey - - key for which to get cache
protected void setCache(java.util.Map cache)
cache - - cache for current call contextpublic void resetCache()
public void reset()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||