Java Doc for User.java in  » Forum » yazd » com » Yasna » forum » 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 » Forum » yazd » com.Yasna.forum 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.Yasna.forum.User

All known Subclasses:   com.Yasna.forum.database.DbUser,  com.Yasna.forum.UserProxy,
User
public interface User (Code)
The User interface provides information about and services for users of the forum system. Users can be identified by a unique id or username. Users can also be organized into Groups for easier management of permissions at the forum level.

The name and email field will normally be required fields when creating user accounts for most implementations of forums. However, some users may wish to keep that information private. Therefore, there are two flags to set if the name and email fields should be made visible to other users. If the flags are set to deny access, getName() and getEmail() will throw UnauthorizedExceptions to users that don't have ADMIN permissions.

Security for User objects is provide by UserProxy protection proxy objects.
See Also:   Group





Method Summary
public  StringgetEmail()
     Returns the user's email address.
public  intgetID()
     Returns the user's id.
public  CalendargetLastLogin()
     Returns the user's last login date.
public  CalendargetLastPost()
     Returns the date that the user posted his last message.
public  StringgetName()
     Returns the user's name.
public  StringgetPasswordHash()
     Returns the user's password in hashed form.
abstract public  ForumPermissionsgetPermissions(Authorization authorization)
     Returns the permissions for the user that correspond to the passed-in Authorization.
public  StringgetProperty(String name)
     Returns an extended property of the user.
public  booleangetThreadSubscribe()
     Shows if user wants to subscribe to the threads he posts messages in.
public  LocalegetUserLocale()
     Returns the user's preferred locale.
public  TimeZonegetUserTimeZone()
     Returns the user's Time Zone.
public  StringgetUsername()
     Returns the user's username.
public  booleanhasPermission(int type)
     Returns true if the handle on the object has the permission specified. A list of possible permissions can be found in the ForumPermissions class.
public  booleanisAnonymous()
     Returns true if the User object is an anonymous user object.
public  booleanisEmailVisible()
     Returns true if the user has chosen to make her email visible to other users.
public  booleanisNameVisible()
     Returns true if the user has chosen to make her name visible to other users.
public  EnumerationpropertyNames()
     Returns an Enumeration of all the names of the extended user properties.
public  voidsetEmail(String email)
     Sets the user's email address.
public  voidsetEmailVisible(boolean visible)
     Sets whether a user's email is visible to other users.
public  voidsetName(String name)
     Sets the user's name.
public  voidsetNameVisible(boolean visible)
     Sets whether a user's name is visible to other users.
public  voidsetPassword(String password)
     Sets the users's password.
public  voidsetPasswordHash(String passwordHash)
     Sets the user's password in hashed form.
public  voidsetProperty(String name, String value)
     Sets an extended property of the user.
public  voidsetThreadSubscribe(boolean emailReply)
     Boolean value to determin if user wants to subscribe to the threads that he posts messages in.
public  voidsetUserLocale(Locale locale)
     This would set the user's perferred locale.
public  voidsetUserTimeZone(String timezoneid)
     This would set the user's perferred Time Zone.



Method Detail
getEmail
public String getEmail()(Code)
Returns the user's email address. Email should be considered to be a required field of a user account since it is critical to many user operations performing. If the user sets emailVisible to false, this method will always return null. the email address of the user.



getID
public int getID()(Code)
Returns the user's id. All ids must be unique in the system. the user's id.



getLastLogin
public Calendar getLastLogin()(Code)
Returns the user's last login date. This date is updated in the DbAuthorizationFactory after the user successfully is validated. the last date that user successfully logged in



getLastPost
public Calendar getLastPost()(Code)
Returns the date that the user posted his last message. the last date that user posted his last message



getName
public String getName()(Code)
Returns the user's name. The user's name does not have to be to be unique in the system. Some users may opt to not let others see their name for privacy reasons. In that case, the user can set nameVisible to false. In that case, a call to this method will return null. the name of the user.



getPasswordHash
public String getPasswordHash() throws UnauthorizedException(Code)
Returns the user's password in hashed form. This method is only intended for system administration functions and can be ignored by skin writers. the hashed password.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



getPermissions
abstract public ForumPermissions getPermissions(Authorization authorization)(Code)
Returns the permissions for the user that correspond to the passed-in Authorization.
Parameters:
  authorization - the auth token to look up permissions with.



getProperty
public String getProperty(String name)(Code)
Returns an extended property of the user. Each user can have an arbitrary number of extended properties. This lets particular skins or filters provide enhanced functionality that is not part of the base interface.
Parameters:
  name - the name of the property to get. the value of the property



getThreadSubscribe
public boolean getThreadSubscribe()(Code)
Shows if user wants to subscribe to the threads he posts messages in. true if user wants to receive mail on reply.



getUserLocale
public Locale getUserLocale()(Code)
Returns the user's preferred locale. This would drive how the Yazd forum would display the buttons and in which language.



getUserTimeZone
public TimeZone getUserTimeZone()(Code)
Returns the user's Time Zone. This would drive how the Yazd forum would display the dates and in which language. If there is no time zone set by the user, it returns the default time zone. TimeZone



getUsername
public String getUsername()(Code)
Returns the user's username. All usernames must be unique in the system. the username of the user.



hasPermission
public boolean hasPermission(int type)(Code)
Returns true if the handle on the object has the permission specified. A list of possible permissions can be found in the ForumPermissions class. Certain methods of this class are restricted to certain permissions as specified in the method comments.
See Also:   ForumPermissions



isAnonymous
public boolean isAnonymous()(Code)
Returns true if the User object is an anonymous user object. true if the user is anonymous.



isEmailVisible
public boolean isEmailVisible()(Code)
Returns true if the user has chosen to make her email visible to other users. If the email field is not visible, calling getEmail() will throw an UnauthorizedException. true if the name is visible to other users.



isNameVisible
public boolean isNameVisible()(Code)
Returns true if the user has chosen to make her name visible to other users. If the name is not visible, calling getName() will throw an UnauthorizedException. true if the name is visible to other users.



propertyNames
public Enumeration propertyNames()(Code)
Returns an Enumeration of all the names of the extended user properties. an Enumeration of the property names.



setEmail
public void setEmail(String email) throws UnauthorizedException(Code)
Sets the user's email address. Email should be considered to be a required field of a user account since it is critical to many user operations performing.
Parameters:
  email - new email address for the user.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setEmailVisible
public void setEmailVisible(boolean visible) throws UnauthorizedException(Code)
Sets whether a user's email is visible to other users. If the field is set to not be visible, calling getEmail() will throw an UnauthorizedException.
Parameters:
  visible - boolean value to determin if the name should be visible.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setName
public void setName(String name) throws UnauthorizedException(Code)
Sets the user's name. The user's name does not have to be to be unique in the system.
Parameters:
  name - new name for the user.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setNameVisible
public void setNameVisible(boolean visible) throws UnauthorizedException(Code)
Sets whether a user's name is visible to other users. If the field is set to not be visible, calling getName() will throw an UnauthorizedException.
Parameters:
  visible - boolean value to determin if the name should be visible.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setPassword
public void setPassword(String password) throws UnauthorizedException(Code)
Sets the users's password. The password should be passed in as plain text. The way the password is stored is implementation dependent. However, it is recommended to at least hash passwords with an algorithm such as MD5.
Parameters:
  password - new password for the user.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setPasswordHash
public void setPasswordHash(String passwordHash) throws UnauthorizedException(Code)
Sets the user's password in hashed form. This method is only intended for system administration functions and can be ignored by skin writers.
Parameters:
  passwordHash - the hashedPassword for the user.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setProperty
public void setProperty(String name, String value)(Code)
Sets an extended property of the user. Each user can have an arbitrary number of extended properties. This lets particular skins or filters provide enhanced functionality that is not part of the base interface.
Parameters:
  name - the name of the property to set.
Parameters:
  value - the new value for the property.



setThreadSubscribe
public void setThreadSubscribe(boolean emailReply) throws UnauthorizedException(Code)
Boolean value to determin if user wants to subscribe to the threads that he posts messages in.
Parameters:
  emailReply - boolean value to determin if user wants toreceive email when a reply on his/her message occur.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setUserLocale
public void setUserLocale(Locale locale) throws UnauthorizedException(Code)
This would set the user's perferred locale.
Parameters:
  locale -
throws:
  UnauthorizedException -



setUserTimeZone
public void setUserTimeZone(String timezoneid) throws UnauthorizedException(Code)
This would set the user's perferred Time Zone.
Parameters:
  timezoneid -
throws:
  UnauthorizedException -



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