Package net.webpdf.wsclient.schema.beans
Class User
- java.lang.Object
-
- net.webpdf.wsclient.schema.beans.User
-
- All Implemented Interfaces:
Serializable
public class User extends Object implements Serializable
An instance ofUseris intended to wrap and simplify information about a webPDF server user.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description User()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable String[]getRoles()Returns all active roles of the user.@Nullable LimitsgetUserLimits()Returns theLimitsfor the current user.@Nullable StringgetUserName()Returns the name of the current user.booleanisAdmin()Returnstrue, if the user is an administrator.booleanisAuthenticated()Returnstrue, if the user has been authenticated.booleanisUser()Returnstrue, if the user is a standard user.voidsetAdmin(boolean admin)Set totrue, if the user is an administrator.voidsetAuthenticated(boolean authenticated)Set totrue, if the user has been authenticated.voidsetRoles(@Nullable String[] roles)Set all active roles of the user.voidsetUser(boolean user)Set totrue, if the user is a standard user.voidsetUserLimits(@Nullable Limits userLimits)Sets the userLimitsfor the current user.voidsetUserName(@Nullable String userName)Sets the name of the current user.
-
-
-
Method Detail
-
isAdmin
public boolean isAdmin()
Returnstrue, if the user is an administrator.- Returns:
true, if the user is an administrator.
-
setAdmin
public void setAdmin(boolean admin)
Set totrue, if the user is an administrator.- Parameters:
admin-true, if the user is an administrator.
-
isUser
public boolean isUser()
Returnstrue, if the user is a standard user.- Returns:
true, if the user is a standard user.
-
setUser
public void setUser(boolean user)
Set totrue, if the user is a standard user.- Parameters:
user-true, if the user is a standard user.
-
isAuthenticated
public boolean isAuthenticated()
Returnstrue, if the user has been authenticated.- Returns:
true, if the user has been authenticated.
-
setAuthenticated
public void setAuthenticated(boolean authenticated)
Set totrue, if the user has been authenticated.- Parameters:
authenticated-true, if the user has been authenticated.
-
getRoles
@Nullable public @Nullable String[] getRoles()
Returns all active roles of the user.- Returns:
- All active roles of the user.
-
setRoles
public void setRoles(@Nullable @Nullable String[] roles)Set all active roles of the user.- Parameters:
roles- All active roles of the user.
-
getUserName
@Nullable public @Nullable String getUserName()
Returns the name of the current user.- Returns:
- The name of the current user.
-
setUserName
public void setUserName(@Nullable @Nullable String userName)Sets the name of the current user.- Parameters:
userName- The name of the current user.
-
getUserLimits
@Nullable public @Nullable Limits getUserLimits()
Returns theLimitsfor the current user.- Returns:
- The
Limitsfor the current user.
-
-