|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
BbSession. See blackboard.apps.bb5.session for implementation classes.
| Nested Class Summary | |
static class |
BbSession.Scope
Inner class -- BbSession.Scope Enumeration. |
| Method Summary | |
java.lang.String |
encodeNavigationItemURL(javax.servlet.http.HttpServletRequest request,
java.lang.String url)
Performs url parse/replace operation for navigation item specific entities. |
java.lang.String |
encodeSessionContext(java.lang.String url)
Encodes this session's id on the given url as a request parameter formatted as "? |
java.lang.String |
encodeTemplateUrl(javax.servlet.http.HttpServletRequest request,
java.lang.String url)
Encodes context information on the given url as required by the template based format. |
java.lang.Object |
getAttribute(java.lang.String name,
BbSession.Scope scope)
Gets an attribute in this user's session that was originally defined to have a given scope. |
int |
getBbSessionId()
Returns the Blackboard assigned unique id for this user's session. |
java.lang.String |
getBbSessionIdMd5()
Returns the Blackboard assigned unique id for this user's session as an MD5 hashed string. |
long |
getCreateTimeMillis()
Returns the system time in milliseconds as specified by System.getTimeMillis() of when this session instance was created. |
java.lang.String |
getGlobalKey(java.lang.String name)
Retrives a key with Scope == GLOBAL, 1 database hit (unless cached and updated asynchronously). |
long |
getLastAccessTimeMillis()
Returns the system time in milliseconds as specified by System.getTimeMillis() of when this session instance was last accessed. |
Id |
getUserId()
Returns the Id of the user associated with this session. |
java.lang.String |
getUserName()
Returns the system login name of the user associated with this session. |
boolean |
isAuthenticated()
Returns true if the associated user has been authenticated. |
CourseContext |
lookupCourseContext(javax.servlet.http.HttpServletRequest request)
Parses user context information encoded in the given request and returns a CourseContext or null if none exists. |
GroupContext |
lookupGroupContext(javax.servlet.http.HttpServletRequest request)
Parses group context information encoded in the given request and returns a GroupContext or null if none exists. |
RequestContext |
lookupRequestContext(javax.servlet.http.HttpServletRequest request)
Parses user context information encoded in the given request and returns a RequestContext or null if none exists. |
UserContext |
lookupUserContext(javax.servlet.http.HttpServletRequest request)
Parses user context information encoded in the given request and returns a UserContext or null if none exists. |
java.lang.Object |
removeAttribute(java.lang.String name,
BbSession.Scope scope)
Removes any resources being held by this attribute, including memory or file storage. |
void |
setAttribute(java.lang.String name,
java.lang.Object value,
BbSession.Scope scope)
Sets an attribute in this user's session for availability in the target scope. |
void |
setGlobalKey(java.lang.String name,
java.lang.String value)
Sets a key with Scope == GLOBAL, 1 database hit. |
| Method Detail |
public int getBbSessionId()
public java.lang.String getBbSessionIdMd5()
public java.lang.String encodeSessionContext(java.lang.String url)
public java.lang.String encodeTemplateUrl(javax.servlet.http.HttpServletRequest request,
java.lang.String url)
throws PersistenceException,
InitializationException
PersistenceException
InitializationException
public java.lang.String encodeNavigationItemURL(javax.servlet.http.HttpServletRequest request,
java.lang.String url)
public Id getUserId()
Id of the user associated with this session.
public java.lang.String getUserName()
public boolean isAuthenticated()
public UserContext lookupUserContext(javax.servlet.http.HttpServletRequest request)
UserContext or null if none exists. This method can be used
to retrieve a context encoded via UserContext.encodeUserContext( String ).
public RequestContext lookupRequestContext(javax.servlet.http.HttpServletRequest request)
RequestContext or null if none exists. This method can be used
to retrieve a context encoded via RequestContext.encodeRequestContext( String ).
public CourseContext lookupCourseContext(javax.servlet.http.HttpServletRequest request)
CourseContext or null if none exists. This method can be used
to retrieve a context encoded via CourseContext.encodeCourseContext( String ).
public GroupContext lookupGroupContext(javax.servlet.http.HttpServletRequest request)
GroupContext or null if none exists. This method can be used
to retrieve a context encoded via GroupContext.encodeGroupContext( String ).
public java.lang.String getGlobalKey(java.lang.String name)
throws PersistenceException
PersistenceException
public void setGlobalKey(java.lang.String name,
java.lang.String value)
throws PersistenceException
PersistenceException
public void setAttribute(java.lang.String name,
java.lang.Object value,
BbSession.Scope scope)
public java.lang.Object getAttribute(java.lang.String name,
BbSession.Scope scope)
public java.lang.Object removeAttribute(java.lang.String name,
BbSession.Scope scope)
public long getCreateTimeMillis()
public long getLastAccessTimeMillis()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||