|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Context
Context is a core component of the Blackboard API, encapsulating as much as information
about the current service request as possible. In most cases, the service request means
an HTTP request to the server. Context is set via the ContextManager.setContext()
method.
The data that's stored context includes session data and data relevant just to the current
request, such as which Course or Content object is being accessed. Other data which might
be in context includes Group and User (accessed via the BbSession
object.
| Nested Class Summary | |
|---|---|
static class |
Context.OverrideType
|
| Field Summary | |
|---|---|
static java.lang.String |
PARAM_NAME
Standard name for the context param in request attributes |
| Method Summary | |
|---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Gets an arbitrary attribute for use in this context. |
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Gets all the attributes in this context in the form of a HashMap. |
Context.OverrideType |
getContextOverride()
returns the OverrideType of this Context object. |
java.util.List<SecurityContext> |
getSecurityContexts()
Returns all security contexts for the current user. |
BbSession |
getSession()
|
boolean |
hasContentContext()
Returns true if the ContentId is set for this Context |
boolean |
hasCourseContext()
Returns true if the CourseId is set for this Context |
boolean |
hasGroupContext()
Returns true if the GroupId is set for this Context |
boolean |
hasRequestContext()
Returns true if the web Request information is set for this Context |
boolean |
hasSystemContext()
Returns true if the Virtual Request information is set for this Context |
boolean |
hasUserContext()
Returns true if the UserId is set for this Context |
java.lang.Object |
removeAttribute(java.lang.String name)
Removes an arbitrary attribute for use in this context. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets an arbitrary attribute for use in this context. |
void |
setContextOverride(Context.OverrideType override)
The context override is used to override the context that is implied from the request parameters. |
| Methods inherited from interface blackboard.platform.security.Entitled |
|---|
getEntitlements |
| Field Detail |
|---|
static final java.lang.String PARAM_NAME
| Method Detail |
|---|
boolean hasContentContext()
boolean hasUserContext()
boolean hasCourseContext()
boolean hasGroupContext()
boolean hasSystemContext()
boolean hasRequestContext()
void setAttribute(java.lang.String name,
java.lang.Object value)
java.lang.Object getAttribute(java.lang.String name)
java.util.Map<java.lang.String,java.lang.Object> getAttributes()
HashMap.
java.lang.Object removeAttribute(java.lang.String name)
BbSession getSession()
void setContextOverride(Context.OverrideType override)
override - the context OverrideType to set. Possible values are as follows:
ADMIN_PANELContext.OverrideType getContextOverride()
java.util.List<SecurityContext> getSecurityContexts()
ContextHandler extensions.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||