| java.lang.Object org.opencms.security.CmsPrincipal org.opencms.file.CmsUser
CmsUser | public class CmsUser extends CmsPrincipal implements I_CmsPrincipal,Cloneable(Code) | | A user principal in the OpenCms permission system.
A user in OpenCms is uniquely defined by its user named returned by
CmsUser.getName() .
Basic users in OpenCms are users that can access the OpenCms Workplace.
Moreover, the user must be created by another user with the
org.opencms.security.CmsRole.ACCOUNT_MANAGER role.
These users are "content managers" that actually have write permissions in
at last some parts of the VFS.
Another possibility is to have users in a 'Guests' group.
These users do not have access to the OpenCms Workplace.
However, an user in a 'Guests' group can be created by every user, for example
the "Guest" user. The main use case is that these users are used for users of
the website that can generate their own accounts, in a "please register your
account..." scenario.
These user accounts can then be used to build personalized web sites.
author: Alexander Kandzior author: Michael Emmerich author: Michael Moossen version: $Revision: 1.40 $ since: 6.0.0 See Also: CmsGroup See Also: |
CmsUser | public CmsUser()(Code) | | Creates a new, empty OpenCms user principal.
Mostly intended to be used with the org.opencms.workplace.tools.accounts.A_CmsEditUserDialog .
|
CmsUser | public CmsUser(CmsUUID id, String name, String password, String firstname, String lastname, String email, long lastlogin, int flags, long dateCreated, Map additionalInfo)(Code) | | Creates a new OpenCms user principal.
Parameters: id - the unique id of the new user Parameters: name - the fully qualified name of the new user Parameters: password - the password of the user Parameters: firstname - the first name Parameters: lastname - the last name Parameters: email - the email address Parameters: lastlogin - time stamp Parameters: flags - flags Parameters: dateCreated - the creation date Parameters: additionalInfo - user related information |
checkEmail | public static void checkEmail(String email)(Code) | | Validates an email address.
That means, the parameter should only be composed by digits and standard english letters, points, underscores and exact one "At" symbol.
Parameters: email - the email to validate |
checkZipCode | public static void checkZipCode(String zipcode)(Code) | | Validates a zip code.
That means, the parameter should only be composed by digits and standard english letters.
Parameters: zipcode - the zip code to validate |
deleteAdditionalInfo | public void deleteAdditionalInfo(String key)(Code) | | Deletes a value from this users "additional information" storage map.
Parameters: key - the additional user information to delete See Also: CmsUser.getAdditionalInfo() |
getAdditionalInfo | public Map getAdditionalInfo()(Code) | | Returns this users complete "additional information" storage map.
The "additional information" storage map is a simple
java.util.Map that can be used to store any key / value pairs for the user.
Some information parts of the users address are stored in this map
by default.
this users complete "additional information" storage map |
getAdditionalInfo | public Object getAdditionalInfo(String key)(Code) | | Returns a value from this users "additional information" storage map,
or null if no value for the given key is available.
Parameters: key - selects the value to return from the "additional information" storage map the selected value from this users "additional information" storage map See Also: CmsUser.getAdditionalInfo() |
getAddress | public String getAddress()(Code) | | Returns the address line of this user.
the address line of this user |
getDateCreated | public long getDateCreated()(Code) | | Returns the creation date.
the creation date |
getDescription | public String getDescription(Locale locale)(Code) | | Returns the description of this organizational unit.
Parameters: locale - the locale the description of this organizational unit |
getEmail | public String getEmail()(Code) | | Returns the email address of this user.
the email address of this user |
getFirstname | public String getFirstname()(Code) | | Returns the first name of this user.
the first name of this user |
getFullName | public static String getFullName(CmsUser user)(Code) | | Returns the "full" name of the given user in the format "{firstname} {lastname} ({username})" ,
or the empty String "" if the user is null.
Parameters: user - the user to get the full name from the "full" name the user See Also: CmsUser.getFullName() See Also: |
getFullName | public String getFullName()(Code) | | Returns the "full" name of the this user in the format "{firstname} {lastname} ({username})" .
the "full" name this user |
getLastlogin | public long getLastlogin()(Code) | | Returns the time of the last login of this user.
the time of the last login of this user |
getLastname | public String getLastname()(Code) | | Returns the last name of this user.
the last name of this user |
getPassword | public String getPassword()(Code) | | Returns the encrypted user password.
the encrypted user password |
isGuestUser | public boolean isGuestUser()(Code) | | Returns true if this user is the default guest user.
true if this user is the default guest user |
isManaged | public boolean isManaged()(Code) | | Returns true if this user is not able to manage itself.
true if this user is not able to manage itself |
isSystemUser | public static boolean isSystemUser(int type)(Code) | | Returns true if the provided user type indicates a system user.
Parameters: type - the user type to check true if the provided user type indicates a system user |
isTouched | public boolean isTouched()(Code) | | Returns true if this user was touched.
boolean true if this user was touched |
isWebuser | public boolean isWebuser()(Code) | | Checks if the user is marked as webuser.
true if the user is marked as webuser |
setAdditionalInfo | public void setAdditionalInfo(Map additionalInfo)(Code) | | Sets this users complete "additional information" storage map to the given value.
Parameters: additionalInfo - the complete "additional information" map to set See Also: CmsUser.getAdditionalInfo() |
setAdditionalInfo | public void setAdditionalInfo(String key, Object value)(Code) | | Stores a value in this users "additional information" storage map with the given access key.
Parameters: key - the key to store the value under Parameters: value - the value to store in the users "additional information" storage map See Also: CmsUser.getAdditionalInfo() |
setAddress | public void setAddress(String address)(Code) | | Sets the address line of this user.
Parameters: address - the address line to set |
setCity | public void setCity(String city)(Code) | | Sets the city information of this user.
Parameters: city - the city information to set |
setCountry | public void setCountry(String country)(Code) | | Sets the country information of this user.
Parameters: country - the city information to set |
setEmail | public void setEmail(String email)(Code) | | Sets the email address of this user.
Parameters: email - the email address to set |
setFirstname | public void setFirstname(String firstname)(Code) | | Sets the first name of this user.
Parameters: firstname - the name to set |
setLastlogin | public void setLastlogin(long value)(Code) | | Sets the last login time stamp of this user.
Parameters: value - the last login time stamp to set |
setLastname | public void setLastname(String lastname)(Code) | | Sets the last name of this user.
Parameters: lastname - the name to set |
setManaged | public void setManaged(boolean value)(Code) | | Sets the managed flag for this user to the given value.
Parameters: value - the value to set |
setPassword | public void setPassword(String value)(Code) | | Sets the password of this user.
Parameters: value - the password to set |
setZipcode | public void setZipcode(String zipcode)(Code) | | Sets the zip code information of this user.
Parameters: zipcode - the zip code information to set |
touch | public void touch()(Code) | | Sets the "touched" status of this user to true .
|
|
|