Java Doc for SecurityBean.java in  » Groupware » ivatagroupware » com » ivata » groupware » admin » security » 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 » Groupware » ivatagroupware » com.ivata.groupware.admin.security 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ivata.groupware.admin.security.SecurityBean

SecurityBean
public class SecurityBean implements SessionBean(Code)

The security bean is responsible for adding, removing and amending users to the system, and for logging in in the first place.


since:
   2002-09-08
author:
   Colin MacLeod
author:
   colin.macleod@ivata.com
version:
   $Revision: 1.3 $


Field Summary
 SessionContextsessionContext
    


Method Summary
public  voidcheckPassword(SecuritySession securitySession, String password)
    
public  voidejbActivate()
    
public  voidejbCreate()
    

Called by the container just after the bean has been created.


exception:
  CreateException - if any error occurs.
public  voidejbPassivate()
    

Called by the container to notify the entity object it will be deactivated.

public  voidejbRemove()
    

This method is called by the container when the bean is about to be removed.

This method will be called after a client calls the remove method of the remote/local home interface.


throws:
  RemoveException - if any error occurs.
public  UserDOfindUserByName(SecuritySession securitySession, String userName)
     Find a user given the user name.
final public  StringgetSystemUserName(SecuritySession securitySession, String userName)
    
final public  StringgetUserNameFromSystemUserName(SecuritySession securitySession, String systemUserName)
    
public  booleanisUserEnabled(SecuritySession securitySession, String userName)
    

Find out if a user is currently enabled
Parameters:
  userName -
throws:
  InvalidFieldValueException - if userName isnull.

public  SecuritySessionlogin(UserDO user, String password)
    

Login to the system.

public  StringloginAgain(SecuritySession securitySession, String userName)
    
public  voidremoveUser(SecuritySession securitySession, String userNameRemove)
    

Remove a user from the system.

public  voidrestoreUser(SecuritySession securitySession, String restoreUserName)
    
final public  voidsetPassword(SecuritySession securitySession, String userNamePassword, String password)
    

Set the password of a user.


Parameters:
  userName - the name of the user who is changing the password in thesystem.
final public  voidsetSessionContext(SessionContext sessionContext)
    

Set up the context for this entity object.


Field Detail
sessionContext
SessionContext sessionContext(Code)

Provides the session bean with container-specific information.






Method Detail
checkPassword
public void checkPassword(SecuritySession securitySession, String password) throws SystemException(Code)

Check a password is correct for a user.


Parameters:
  userName -
Parameters:
  password -
throws:
  InvalidFieldValueException - if any of the parameters arenull.
throws:
  InvalidFieldValueException - if any of the parameters arenull.



ejbActivate
public void ejbActivate()(Code)

Called by the container to notify an entity object it has been activated.




ejbCreate
public void ejbCreate() throws CreateException(Code)

Called by the container just after the bean has been created.


exception:
  CreateException - if any error occurs. Never thrown by thisclass.



ejbPassivate
public void ejbPassivate()(Code)

Called by the container to notify the entity object it will be deactivated. Called just before deactivation.




ejbRemove
public void ejbRemove()(Code)

This method is called by the container when the bean is about to be removed.

This method will be called after a client calls the remove method of the remote/local home interface.


throws:
  RemoveException - if any error occurs. Currently never thrown bythis class.



findUserByName
public UserDO findUserByName(SecuritySession securitySession, String userName) throws SystemException(Code)
Find a user given the user name.
Parameters:
  securitySession - valid security session.
Parameters:
  userName - name of the user to find.



getSystemUserName
final public String getSystemUserName(SecuritySession securitySession, String userName) throws SystemException(Code)

This method add prefix to username.


Parameters:
  userName - prefix_userName



getUserNameFromSystemUserName
final public String getUserNameFromSystemUserName(SecuritySession securitySession, String systemUserName) throws SystemException(Code)

This method is converting SystemUserName to userName, it's oposite method to getSystemUserName.


Parameters:
  systemUserName -



isUserEnabled
public boolean isUserEnabled(SecuritySession securitySession, String userName) throws SystemException(Code)

Find out if a user is currently enabled
Parameters:
  userName -
throws:
  InvalidFieldValueException - if userName isnull. true if the user is currently enabled, otherwisefalse.




login
public SecuritySession login(UserDO user, String password) throws SystemException(Code)

Login to the system. This method confirms the user name and password against system settings and logs the user into the mail server, if this is the desired form of authentication.


Parameters:
  userName - this user name is used to log into the remote system.
Parameters:
  password - the clear-text password to log into the remote system.
throws:
  EJBException - if the person cannot log in. the mail server used to access the mail system, ornull if another form of authentication is being used.



loginAgain
public String loginAgain(SecuritySession securitySession, String userName) throws SystemException(Code)

if userName briezky is trying login -> find first admin .


Parameters:
  userName -



removeUser
public void removeUser(SecuritySession securitySession, String userNameRemove) throws SystemException(Code)

Remove a user from the system. Note: this can have dire consequences and will delete all entries this user has ever made in the system. Consider using enableUser instead.


Parameters:
  userName - the name of the user who is doing the removing. Thisis not the name of the user to be removed!
Parameters:
  userNameRemove - the name of the user to be removed.
See Also:   SecurityBean.enableUser
throws:
  InvalidFieldValueException - if any of the parameters arenull.



restoreUser
public void restoreUser(SecuritySession securitySession, String restoreUserName) throws SystemException(Code)

Restore user is he was delted.


Parameters:
  userName - who is doing this operation
Parameters:
  restoreUserName - who is going to be restored



setPassword
final public void setPassword(SecuritySession securitySession, String userNamePassword, String password) throws SystemException(Code)

Set the password of a user.


Parameters:
  userName - the name of the user who is changing the password in thesystem. This is not be the user name whose password is to bechanged!
Parameters:
  userNamePassword - the name of the user for whom to change thepassword.
Parameters:
  password - the new value of the password (unencrypted) for the user.
throws:
  InvalidFieldValueException - if any of the parameters arenull.



setSessionContext
final public void setSessionContext(SessionContext sessionContext)(Code)

Set up the context for this entity object. The session bean stores the context for later use.


Parameters:
  sessionContext - the new context which the session object shouldstore.



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.