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<de.alpharogroup.user.entities.Roles> |
getRoles()
Gets the roles.
|
abstract de.alpharogroup.user.entities.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(de.alpharogroup.user.entities.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<de.alpharogroup.user.entities.Roles> roles)
Sets the roles.
|
abstract void |
setUser(de.alpharogroup.user.entities.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, clear, debug, detach, dirty, dirty, error, exists, fatal, getApplication, getAttribute, getAttributeNames, getAuthorizationStrategy, getClassResolver, getFeedbackMessages, getId, getLocale, getMetaData, getPageFactory, getPageManager, getSessionStore, getSizeInBytes, getStyle, info, internalDetach, 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<de.alpharogroup.user.entities.Roles> getRoles()
public abstract de.alpharogroup.user.entities.Users getUser()
public 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 isGuest()
public boolean isInRole(de.alpharogroup.user.entities.Roles role)
role - the rolepublic boolean isInRole(String rolename)
rolename - the role namepublic boolean isSignedIn()
public void onSignOut()
public Serializable removeUserAttribute(String key)
key - the keypublic void setRoles(List<de.alpharogroup.user.entities.Roles> roles)
roles - the new rolespublic abstract void setUser(de.alpharogroup.user.entities.Users user)
user - the userpublic void setUserAttribute(String key, Serializable value)
key - the keyvalue - the valuepublic void setUserId(USERID userId)
userId - the new user idCopyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.