Java Doc for CmsUser.java in  » Content-Management-System » opencms » org » opencms » file » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » opencms » org.opencms.file 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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:   




Constructor Summary
public  CmsUser()
    
public  CmsUser(CmsUUID id, String name, String password, String firstname, String lastname, String email, long lastlogin, int flags, long dateCreated, Map additionalInfo)
    

Method Summary
public static  voidcheckEmail(String email)
    
public  voidcheckName(String name)
    
public static  voidcheckZipCode(String zipcode)
    
public  Objectclone()
    
public  voiddeleteAdditionalInfo(String key)
    
public  MapgetAdditionalInfo()
     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.

public  ObjectgetAdditionalInfo(String key)
    
public  StringgetAddress()
    
public  StringgetCity()
    
public  StringgetCountry()
    
public  longgetDateCreated()
    
public  StringgetDescription()
    
public  StringgetDescription(Locale locale)
    
public  booleangetDisabled()
    
public  StringgetDisplayName(CmsObject cms, Locale locale)
    
public  StringgetEmail()
    
public  StringgetFirstname()
    
public static  StringgetFullName(CmsUser user)
    
public  StringgetFullName()
    
public  longgetLastlogin()
    
public  StringgetLastname()
    
public  StringgetPassword()
    
public  StringgetZipcode()
    
public  booleanisGroup()
    
public  booleanisGuestUser()
    
public  booleanisManaged()
    
public static  booleanisSystemUser(int type)
    
public  booleanisTouched()
    
public  booleanisUser()
    
public  booleanisWebuser()
    
public  voidsetAdditionalInfo(Map additionalInfo)
    
public  voidsetAdditionalInfo(String key, Object value)
    
public  voidsetAddress(String address)
    
public  voidsetCity(String city)
    
public  voidsetCountry(String country)
    
public  voidsetDescription(String description)
    
public  voidsetDisabled()
    
public  voidsetEmail(String email)
    
public  voidsetEnabled()
    
public  voidsetFirstname(String firstname)
    
public  voidsetLastlogin(long value)
    
public  voidsetLastname(String lastname)
    
public  voidsetManaged(boolean value)
    
public  voidsetPassword(String value)
    
public  voidsetZipcode(String zipcode)
    
public  StringtoString()
    
public  voidtouch()
    


Constructor Detail
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





Method Detail
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




checkName
public void checkName(String name) throws CmsIllegalArgumentException(Code)
Checks if the provided user name is a valid user name and can be used as an argument value for CmsUser.setName(String) .


Parameters:
  name - the user name to check
throws:
  CmsIllegalArgumentException - if the check fails




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




clone
public Object clone()(Code)

See Also:   java.lang.Object.clone



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




getCity
public String getCity()(Code)
Returns the city information of this user.

This information is stored in the "additional information" storage map using the key CmsUserSettings.ADDITIONAL_INFO_CITY .

the city information of this user




getCountry
public String getCountry()(Code)
Returns the country information of this user.

This information is stored in the "additional information" storage map using the key CmsUserSettings.ADDITIONAL_INFO_COUNTRY .

the country information of this user




getDateCreated
public long getDateCreated()(Code)
Returns the creation date.

the creation date




getDescription
public String getDescription()(Code)

See Also:   org.opencms.security.CmsPrincipal.getDescription



getDescription
public String getDescription(Locale locale)(Code)
Returns the description of this organizational unit.


Parameters:
  locale - the locale the description of this organizational unit




getDisabled
public boolean getDisabled()(Code)
Returns true if this user is disabled.

true if this user is disabledCmsPrincipal.isEnabled




getDisplayName
public String getDisplayName(CmsObject cms, Locale locale) throws CmsException(Code)

See Also:   org.opencms.security.CmsPrincipal.getDisplayName(org.opencms.file.CmsObjectjava.util.Locale)



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




getZipcode
public String getZipcode()(Code)
Returns the zip code information of this user.

This information is stored in the "additional information" storage map using the key CmsUserSettings.ADDITIONAL_INFO_ZIPCODE .

the zip code information of this user




isGroup
public boolean isGroup()(Code)

See Also:   org.opencms.security.I_CmsPrincipal.isGroup



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




isUser
public boolean isUser()(Code)

See Also:   org.opencms.security.I_CmsPrincipal.isUser



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




setDescription
public void setDescription(String description)(Code)

See Also:   org.opencms.security.CmsPrincipal.setDescription(java.lang.String)



setDisabled
public void setDisabled()(Code)
Disables this user.

CmsPrincipal.setEnabled(boolean)




setEmail
public void setEmail(String email)(Code)
Sets the email address of this user.


Parameters:
  email - the email address to set




setEnabled
public void setEnabled()(Code)
Enables this user.

CmsPrincipal.setEnabled(boolean)




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




toString
public String toString()(Code)

See Also:   java.lang.Object.toString



touch
public void touch()(Code)
Sets the "touched" status of this user to true.




Fields inherited from org.opencms.security.CmsPrincipal
protected String m_description(Code)(Java Doc)
protected int m_flags(Code)(Java Doc)
protected CmsUUID m_id(Code)(Java Doc)
protected String m_name(Code)(Java Doc)

Methods inherited from org.opencms.security.CmsPrincipal
public int compareTo(Object obj)(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
public static List filterCore(List principals)(Code)(Java Doc)
public static List filterCoreFlag(List principals, int flag)(Code)(Java Doc)
public static List filterFlag(List principals, int flag)(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
public String getDisplayName(CmsObject cms, Locale locale) throws CmsException(Code)(Java Doc)
public int getFlags()(Code)(Java Doc)
public CmsUUID getId()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public String getOuFqn()(Code)(Java Doc)
public static String getPrefixedGroup(String name)(Code)(Java Doc)
public String getPrefixedName()(Code)(Java Doc)
public static String getPrefixedUser(String name)(Code)(Java Doc)
public String getSimpleName()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public boolean isEnabled()(Code)(Java Doc)
public boolean isGroup()(Code)(Java Doc)
public boolean isUser()(Code)(Java Doc)
public static I_CmsPrincipal readPrefixedPrincipal(CmsObject cms, String name) throws CmsException(Code)(Java Doc)
public static I_CmsPrincipal readPrincipal(CmsObject cms, CmsUUID id) throws CmsException(Code)(Java Doc)
public static I_CmsPrincipal readPrincipal(CmsObject cms, String type, String name) throws CmsException(Code)(Java Doc)
public static I_CmsPrincipal readPrincipalIncludingHistory(CmsObject cms, CmsUUID id) throws CmsException(Code)(Java Doc)
public void setDescription(String description)(Code)(Java Doc)
public void setEnabled(boolean enabled)(Code)(Java Doc)
public void setFlags(int value)(Code)(Java Doc)
public void setName(String name)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.