public interface User extends Principal
Modifier and Type | Field and Description |
---|---|
static String |
ADMIN_USER_NAME
The super admin login name.
|
Modifier and Type | Method and Description |
---|---|
String |
getAbbreviation()
Gets the abbreviation of the user.
|
boolean |
getAdminMode()
Returns
true if admin mode is enabled for this user. |
String |
getEMail()
Gets eMail adress of the user.
|
Map<String,String> |
getFiletypeBindings() |
String |
getLDAPSection()
Gets the LDAPSection attribute of the User object
|
String |
getLoginName()
Get the login name.
|
String |
getName()
Returns the name of this principal.
|
String |
getPhoneNumber()
Gets the phone number.
|
String |
getRealname()
The realname of the user.
|
Map<String,String> |
getUserBindings()
Get a map containing user bindings.
|
boolean |
isActive() |
boolean |
isAdmin()
Returns
true if the user currently has admin permissions, i.e. is server admin and admin mode is enabled. |
boolean |
isLDAPUser()
Returns
true if this user is a LDAP user. |
boolean |
isProjectAdmin(Project project)
Is this user project admin.
|
boolean |
isServerAdmin()
Returns
true if this user is the super admin or a member of a server admin group. |
void |
setAbbreviation(String abbreviation)
Sets the abbreviation of the user
|
void |
setActive(boolean active)
Set activation state of user.
|
void |
setAdminMode(boolean value)
Enable admin mode for this user with extended permissions.
|
void |
setEMail(String email)
Sets the email address of the user.
|
void |
setFiletypeBindings(Map<String,String> fileTypeBindings) |
void |
setLDAPSection(String section)
Sets the lDAPSection attribute of the User object
|
void |
setLDAPUser(boolean isLDAP)
Sets the LDAPUser attribute of the User object
|
void |
setLoginName(String name)
Sets the login name.
|
void |
setLoginPassword(String password)
Sets the password of the user.
|
void |
setPhoneNumber(String phone)
Sets the phone number.
|
void |
setRealname(String name)
Sets the realname of the user.
|
void |
setUserBindings(Map<String,String> userBindings) |
boolean |
verifyPassword(String password)
Verify password.
|
compareTo
static final String ADMIN_USER_NAME
String getLoginName()
void setLoginName(String name)
name
- The new login name.void setLoginPassword(String password)
password
- the new passwordNullPointerException
- if provided password is null.IllegalArgumentException
- if the provided password is empty.boolean verifyPassword(String password)
password
- the password to verify.true
if the password is correct.String getRealname()
void setRealname(String name)
name
- the new realnameString getEMail()
void setEMail(String email)
email
- the new email address.String getPhoneNumber()
void setPhoneNumber(String phone)
phone
- the new phone number.String getAbbreviation()
void setAbbreviation(String abbreviation)
abbreviation
- the new abbreviation.boolean isLDAPUser()
true
if this user is a LDAP user.true
if this user is a LDAP user, else false
.void setLDAPUser(boolean isLDAP)
isLDAP
- the new LDAPUser valueString getLDAPSection()
void setLDAPSection(String section)
section
- the new LDAPSection valueboolean isAdmin()
true
if the user currently has admin permissions, i.e. is server admin
and admin mode
is enabled.true
if this user currently has admin permissions, false
otherwise.isServerAdmin()
,
getAdminMode()
boolean isServerAdmin()
true
if this user is the super admin or a member of a server admin group. Only server admins are
allowed to switch to admin mode
.true
true if this user is a server admin, false
otherwisesetAdminMode(boolean)
boolean isProjectAdmin(Project project)
server admin
is project admin of all
projects.project
- the project to verify againstboolean getAdminMode() throws SecurityException
true
if admin mode is enabled for this user. Admin mode is by default enabled if the user is aserver admin
.SecurityException
setAdminMode(boolean)
,
isServerAdmin()
void setAdminMode(boolean value) throws SecurityException
server admin
, but may be explicity switched off in some environments.value
- Turn admin mode on or off.SecurityException
- Thrown if this user is not a server adminisServerAdmin()
,
getAdminMode()
Map<String,String> getUserBindings()
setUserBindings(java.util.Map<java.lang.String, java.lang.String>)
void setUserBindings(Map<String,String> userBindings)
userBindings
- the new user bindingsgetUserBindings()
Map<String,String> getFiletypeBindings()
setFiletypeBindings(Map<String, String> fileTypeBindings)
void setFiletypeBindings(Map<String,String> fileTypeBindings) throws IOException
fileTypeBindings
- mapping file extensions to program namesIOException
- if the save operation failes on the servergetFiletypeBindings()
String getName()
Principal
boolean isActive()
true
if the user is activated. If the user is deactivated no login is possible.void setActive(boolean active)
Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408