public class User extends Object implements Serializable
| Constructor and Description |
|---|
User() |
| Modifier and Type | Method and Description |
|---|---|
@Nullable String[] |
getRoles()
Returns all active roles of the user.
|
@Nullable Limits |
getUserLimits()
Returns the user limits for the current user.
|
@Nullable String |
getUserName()
Returns the name of the current user.
|
boolean |
isAdmin()
Returns true, if the user is an administrator.
|
boolean |
isAuthenticated()
Returns true, if the user has been authenticated.
|
boolean |
isUser()
Returns true, if the user is a standard user.
|
void |
setAdmin(boolean admin)
Set to true, if the user is an administrator.
|
void |
setAuthenticated(boolean authenticated)
Set to true, if the user has been authenticated.
|
void |
setRoles(@Nullable String[] roles)
Set all active roles of the user.
|
void |
setUser(boolean user)
Set to true, if the user is a standard user.
|
void |
setUserLimits(@Nullable Limits userLimits)
Sets the user limits for the current user.
|
void |
setUserName(@Nullable String userName)
Sets the name of the current user.
|
public boolean isAdmin()
public void setAdmin(boolean admin)
admin - True, if the user is an administrator.public boolean isUser()
public void setUser(boolean user)
user - True, if the user is a standard user.public boolean isAuthenticated()
public void setAuthenticated(boolean authenticated)
authenticated - True, if the user has been authenticated.@Nullable public @Nullable String[] getRoles()
public void setRoles(@Nullable
@Nullable String[] roles)
roles - All active roles of the user.@Nullable public @Nullable String getUserName()
public void setUserName(@Nullable
@Nullable String userName)
userName - The name of the current user.@Nullable public @Nullable Limits getUserLimits()
public void setUserLimits(@Nullable
@Nullable Limits userLimits)
userLimits - The user limits for the current user.Copyright © 2017–2020 SoftVision Development GmbH, Fulda, Germany. All rights reserved.