USERID - the generic type for the user id.public abstract class AbstractWicketSession<USERID>
extends org.apache.wicket.protocol.http.WebSession
| Constructor and Description |
|---|
AbstractWicketSession(org.apache.wicket.request.Request request)
Instantiates a new WicketSession.
|
| Modifier and Type | Method and Description |
|---|---|
static AbstractWicketSession |
get()
Gets the WicketSession for this application.
|
List<user.management.model.Roles> |
getRoles()
Gets the roles.
|
abstract user.management.model.Users |
getUser()
Gets the user.
|
Serializable |
getUserAttribute(String key)
Gets the user attribute.
|
USERID |
getUserId()
Gets the user id.
|
void |
invalidate() |
void |
invalidateNow() |
boolean |
isGuest()
Checks if the user is a guest.
|
boolean |
isInRole(user.management.model.Roles role)
Checks if the user is in the given Roles object.
|
boolean |
isInRole(String rolename)
Checks if the user is in the role lookup is made over the role name.
|
boolean |
isSignedIn()
Checks if is user signed in.
|
void |
onSignOut()
Hook method that can be used when a user signs out from the application.
|
Serializable |
removeUserAttribute(String key)
Removes the user attribute.
|
void |
setRoles(List<user.management.model.Roles> roles)
Sets the roles.
|
abstract void |
setUser(user.management.model.Users user)
Sets the user.
|
void |
setUserAttribute(String key,
Serializable value)
Sets the user attribute.
|
void |
setUserId(USERID userId)
Sets the user id.
|
getClientInfo, newBrowserInfoPagebind, cleanupFeedbackMessages, clear, debug, detach, dirty, dirty, error, exists, fatal, getApplication, getAttribute, getAttributeNames, getAuthorizationStrategy, getClassResolver, getFeedbackMessages, getId, getLocale, getMetaData, getPageFactory, getPageManager, getSessionStore, getSizeInBytes, getStyle, info, internalDetach, isCurrentRequestValid, isSessionInvalidated, isTemporary, newPageAccessSynchronizer, nextPageId, nextSequenceValue, onEvent, onInvalidate, removeAttribute, replaceSession, setAttribute, setClientInfo, setLocale, setMetaData, setStyle, success, warnprotected USERID userId
public AbstractWicketSession(org.apache.wicket.request.Request request)
request - The current requestpublic static AbstractWicketSession get()
public List<user.management.model.Roles> getRoles()
public abstract user.management.model.Users getUser()
public abstract void setUser(user.management.model.Users user)
user - the userpublic Serializable getUserAttribute(String key)
key - the keypublic USERID getUserId()
public void invalidate()
invalidate in class org.apache.wicket.protocol.http.WebSessionpublic void invalidateNow()
invalidateNow in class org.apache.wicket.Sessionpublic boolean isInRole(user.management.model.Roles role)
role - the rolepublic boolean isInRole(String rolename)
rolename - the role namepublic boolean isSignedIn()
public boolean isGuest()
public Serializable removeUserAttribute(String key)
key - the keypublic void setRoles(List<user.management.model.Roles> roles)
roles - the new rolespublic void setUserAttribute(String key, Serializable value)
key - the keyvalue - the valuepublic void setUserId(USERID userId)
userId - the new user idpublic void onSignOut()
Copyright © 2015. All rights reserved.