public class AdminUser extends Object implements Serializable, fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource
Modifier and Type | Field and Description |
---|---|
static int |
ACTIVE_CODE |
static int |
ANONYMIZED_CODE |
static int |
EXPIRED_CODE |
static int |
NOT_ACTIVE_CODE |
static String |
RESOURCE_TYPE |
Constructor and Description |
---|
AdminUser()
Constructor
|
AdminUser(String stAccessCode,
AdminAuthentication authenticationService)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addRoles(Map<String,AdminRole> roles)
add user's roles
|
boolean |
checkRight(String strRightCode)
Verify user rights on a given functionality
|
String |
getAccessCode() |
boolean |
getAccessibilityMode()
Return the accessibility mode
|
Timestamp |
getAccountMaxValidDate()
Get the expiration date of the user account.
|
String |
getAuthenticationService()
Returns the authentification service that had authentified the user
|
String |
getAuthenticationType()
Returns the authentification type that had authentified the user
|
Timestamp |
getDateLastLogin()
Get the last login date of the user
|
static Timestamp |
getDefaultDateLastLogin() |
String |
getEmail()
Returns the email of this user.
|
String |
getFirstName()
Returns the first name of this user.
|
String |
getLastName()
Returns the last name of this user.
|
Locale |
getLocale()
Get the user's Locale
|
Timestamp |
getPasswordMaxValidDate()
Get the maximum valid date of the password of the user
|
int |
getRealStatus() |
Map<String,Right> |
getRights()
Returns user's rights
|
Map<String,AdminRole> |
getRoles()
Returns user's roles
|
int |
getStatus() |
int |
getUserId()
Return the user's id
|
Object |
getUserInfo(String strKey)
Gets the user info for a given key
|
int |
getUserLevel()
Returns the user level
|
String |
getWorkgroup() |
String |
getWorkgroupKey() |
boolean |
hasRights(int level)
Check if current user has rights depending on level
|
static void |
init()
Init
|
boolean |
isAdmin()
Check if this user has admin rights
|
boolean |
isInRole(String strRole)
Check if this user has a given role
|
boolean |
isParent(AdminUser user)
Check if current user has rights over user
|
boolean |
isPasswordReset()
Check if the password has been reinitialized
|
boolean |
isStatusActive()
Tells whether the current user is active or not
|
boolean |
isStatusAnonymized()
Tells whether the current user is anonymized
|
void |
setAccessCode(String strAccessCode) |
void |
setAccessibilityMode(boolean bAccessibilityMode)
Set the accessibility mode
|
void |
setAccountMaxValidDate(Timestamp accountMaxValidDate)
Set the expiration date of the user account.
|
void |
setAuthenticationService(String strAuthenticationService)
Defines the authentification service that had authentified the user
|
void |
setAuthenticationType(String strAuthenticationType)
Defines the authentification type that had authentified the user
|
void |
setDateLastLogin(Timestamp dateLastLogin)
Set the last login date of the user
|
void |
setEmail(String strEmail)
Sets the email of the user to the specified string.
|
void |
setFirstName(String strFirstName)
Sets the first name of the user to the specified string.
|
void |
setLastName(String strLastName)
Sets the last name of the user to the specified string.
|
void |
setLocale(Locale locale)
Set the user Locale
|
void |
setPasswordMaxValidDate(Timestamp passwordMaxValidDate)
Set the maximum valid date of the password of the user
|
void |
setPasswordReset(boolean bIsPasswordReset)
Set pwd reseted
|
void |
setRights(Map<String,Right> rights)
Defines user's rights
|
void |
setRoles(Map<String,AdminRole> roles)
Defines user's roles
|
void |
setStatus(int nStatus) |
void |
setUserId(int nUserId)
Sets the user's id
|
Object |
setUserInfo(String strKey,
Object info)
Sets a user info for the given key.
|
void |
setUserLevel(int nUserLevel)
Defines the user level
|
void |
setWorkgroupKey(String strWorkgroupKey) |
void |
updateRight(Right rightToUpdate)
Update user right
|
public static final String RESOURCE_TYPE
public static final int ACTIVE_CODE
public static final int NOT_ACTIVE_CODE
public static final int EXPIRED_CODE
public static final int ANONYMIZED_CODE
public AdminUser()
public AdminUser(String stAccessCode, AdminAuthentication authenticationService)
stAccessCode
- The User NameauthenticationService
- The PortalAuthentication objectpublic static void init()
@NotNull public Locale getLocale()
public void setLocale(Locale locale)
locale
- The localepublic int getUserId()
public void setUserId(int nUserId)
nUserId
- The User idpublic int getStatus()
public int getRealStatus()
public void setStatus(int nStatus)
nStatus
- The _nStatus to set.public boolean isStatusActive()
public boolean isStatusAnonymized()
public String getLastName()
public void setLastName(String strLastName)
strLastName
- the new last namepublic String getFirstName()
public void setFirstName(String strFirstName)
strFirstName
- the new first namepublic String getEmail()
public void setEmail(String strEmail)
strEmail
- the new emailpublic String getAccessCode()
public void setAccessCode(String strAccessCode)
strAccessCode
- The _strAccessCode to set.public Timestamp getPasswordMaxValidDate()
public void setPasswordMaxValidDate(Timestamp passwordMaxValidDate)
passwordMaxValidDate
- The new maximum valid date of the password of the user, or null if it doesn't have any.public Timestamp getAccountMaxValidDate()
public void setAccountMaxValidDate(Timestamp accountMaxValidDate)
accountMaxValidDate
- The new expiration date of the user account.public void addRoles(Map<String,AdminRole> roles)
roles
- The User rolespublic void setRoles(Map<String,AdminRole> roles)
roles
- The User rolespublic boolean checkRight(String strRightCode)
strRightCode
- right code which corresponding to the functionalitypublic void setRights(Map<String,Right> rights)
rights
- The User rightspublic void updateRight(Right rightToUpdate)
rightToUpdate
- to update in _rights for userpublic void setAuthenticationService(String strAuthenticationService)
strAuthenticationService
- The authentification servicepublic String getAuthenticationService()
public void setAuthenticationType(String strAuthenticationType)
strAuthenticationType
- The authentification typepublic String getAuthenticationType()
public void setUserLevel(int nUserLevel)
nUserLevel
- the user levelpublic int getUserLevel()
public boolean isParent(AdminUser user)
user
- the user to checkpublic boolean hasRights(int level)
level
- a level idpublic boolean isAdmin()
public boolean isInRole(String strRole)
strRole
- The role keypublic boolean isPasswordReset()
public void setPasswordReset(boolean bIsPasswordReset)
bIsPasswordReset
- true if it has been reinitialized, false otherwisepublic void setAccessibilityMode(boolean bAccessibilityMode)
bAccessibilityMode
- true if the mode is accessible, false otherwisepublic boolean getAccessibilityMode()
public Timestamp getDateLastLogin()
public void setDateLastLogin(Timestamp dateLastLogin)
dateLastLogin
- The last login date of the userpublic String getWorkgroupKey()
public void setWorkgroupKey(String strWorkgroupKey)
strWorkgroupKey
- the _strWorkgroupKey to setpublic String getWorkgroup()
getWorkgroup
in interface fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource
public Object setUserInfo(String strKey, Object info)
IAttribute
system. The user infos are not
persisted. Subclasses can choose another strategy.strKey
- the keyinfo
- the infopublic Object getUserInfo(String strKey)
strKey
- the keysetUserInfo(String, Object)
public static Timestamp getDefaultDateLastLogin()
Copyright © 2020 City of Paris. All rights reserved.