|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ContextManager
Service that manages the Context used by service APIs for information
about the current user, virtual installation, etc.
Proper usage is to ensure that setContext(HttpServletRequest) is called before any service APIs
are invoked. Failure to do so may result in UnsetContextException to be thrown.
Additionally, releaseContext() must be called for every setContext
must be called.
| Method Summary | |
|---|---|
Context |
getContext()
Retrieves the current context previously set via setContext(HttpServletRequest). |
boolean |
isContextSet()
Check to see if the context is currently set for the active thread. |
void |
purgeContext()
Releases the current context and flushes it from thread local storage. |
void |
releaseContext()
Releases the current context. |
Context |
setContext(javax.servlet.http.HttpServletRequest request)
High-level API that must be called to ensure that proper Context data is
parsed from the current HTTP request. |
Context |
setContext(Id virtualHostId,
Id courseId,
Id userId,
Id groupId,
Id contentId)
|
| Method Detail |
|---|
boolean isContextSet()
Context getContext()
throws UnsetContextException
setContext(HttpServletRequest). The default server
implementation uses thread-based storage to retrieve the correct Context.
UnsetContextExceptionContext setContext(javax.servlet.http.HttpServletRequest request)
Context data is
parsed from the current HTTP request.
request - current HTTP request
Context setContext(Id virtualHostId,
Id courseId,
Id userId,
Id groupId,
Id contentId)
void releaseContext()
void purgeContext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||