public class UserInfo extends Object implements Serializable
Constructor and Description |
---|
UserInfo(Injector injector)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Locale |
getLocale()
Returns the locale preferred by this user.
|
Person |
getPerson()
Gets user.
|
boolean |
getSettingBoolean(String key,
boolean defaultValue)
Returns the value of the specified boolean user setting.
|
Serializable |
getSettingObject(String key,
Serializable defaultValue)
Returns the value of the specified string user setting.
|
String |
getSettingString(String key,
String defaultValue)
Returns the value of the specified string user setting.
|
boolean |
hasRight(String right)
Returns true if the user has the given right.
|
Person |
reload()
Refreshes the user informations.
|
void |
setLocale(Locale locale)
Sets the locale preferred by this user.
|
void |
setPerson(Person user)
Sets the user.
|
void |
setSetting(String key,
Boolean value)
Sets the value of the specified boolean user setting.
|
void |
setSetting(String key,
Serializable value)
Sets the value of the specified user setting.
|
void |
setSetting(String key,
String value)
Sets the value of the specified string user setting.
|
public UserInfo(Injector injector)
injector
- public Person reload()
public Person getPerson()
public void setPerson(Person user)
user
- the new userpublic boolean hasRight(String right)
right
- public Locale getLocale()
public void setLocale(Locale locale)
locale
- public String getSettingString(String key, String defaultValue)
key
- defaultValue
- public boolean getSettingBoolean(String key, boolean defaultValue)
key
- defaultValue
- public Serializable getSettingObject(String key, Serializable defaultValue)
key
- defaultValue
- public void setSetting(String key, Boolean value)
key
- value
- public void setSetting(String key, String value)
key
- value
- public void setSetting(String key, Serializable value)
key
- value
- Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.