Java Doc for UserRegistrationBean.java in  » Workflow-Engines » bonita-v3.1 » hero » session » 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 » Workflow Engines » bonita v3.1 » hero.session 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   hero.session.UserRegistrationBean

UserRegistrationBean
public class UserRegistrationBean implements SessionBean(Code)
The User Registration Bean, is an stateless session bean that provides the API to create users in Bonita database (new user account). This API allows some functionalities oriented to user configuration: set authorization roles, set Bonita roles, set preferences...

The following lines shows a sample code to use this API in your application:


First of all you have to import the User Registration files:

import hero.interfaces.UserRegistrationLocalHome;
import hero.interfaces.UserRegistrationLocal;
import hero.interfaces.UserRegistrationHome;
import hero.interfaces.UserRegistration;
import hero.interfaces.UserRegistrationUtil;

Now, it is time to create the User Registration instance:

Like this if you want to use local interfaces:

hero.interfaces.UserRegistrationLocalHome userh = (UserRegistrationLocalHome)hero.interfaces.UserRegistrationUtil.getLocalHome();
hero.interfaces.UserRegistrationLocal user = userh.create();

or like this if you use remote interfaces:

hero.interfaces.UserRegistrationHome userh = (UserRegistrationHome)hero.interfaces.UserRegistrationUtil.getHome();
hero.interfaces.UserRegistration user = userh.create();

Now, we can create a new user account by using userCreate methods (with or without the instant messaging address).

user.userCreate(name,password,email);
or user.userCreate(name,password,email,jabber);

author:
   Miguel Valdes




Method Summary
public  voidassertUserSecurityRoleExists()
    
public  voiddeleteUser(String userName)
     Detete a user from Bonita database.
public  voidejbActivate()
     Internal Enterprise Java Beans method.
public  voidejbCreate()
     Create the User Session Bean.
public  voidejbPassivate()
     Internal Enterprise Java Beans method.
public  voidejbRemove()
     Internal Enterprise Java Beans method.
public  voidroleCreate(String name, String roleGroup)
     Creates a new authorization role to the system.
public  voidsetSessionContext(javax.ejb.SessionContext context)
     Internal Enterprise Java Beans method.
public  voidsetUserProperty(String userName, String key, String value)
     Set a new property to the user.
public  voidsetUserRole(String userName, String roleName)
     Set a new authorization role to the user.
public  voidunsetSessionContext()
     Internal Enterprise Java Beans method.
public  BnUserLocaluserCreate(String name)
     Creates user account.
public  voiduserCreate(String name, String password, String email)
     Creates user account.
public  voiduserCreate(String name, String password, String email, String jabber)
     Creates user account with an instant messaging address.



Method Detail
assertUserSecurityRoleExists
public void assertUserSecurityRoleExists() throws HeroException(Code)
Create the role BONITAUSER if it doesn't exist
throws:
  HeroException - , (catch : FinderException)



deleteUser
public void deleteUser(String userName) throws HeroException(Code)
Detete a user from Bonita database. If the user is included in active projects this methods throws an exception.
Parameters:
  userName - the name of the user
throws:
  HeroException -



ejbActivate
public void ejbActivate() throws java.rmi.RemoteException(Code)
Internal Enterprise Java Beans method.



ejbCreate
public void ejbCreate() throws CreateException(Code)
Create the User Session Bean. This method is the first one to invoke in order to creates a new user account.
throws:
  CreateException -



ejbPassivate
public void ejbPassivate() throws java.rmi.RemoteException(Code)
Internal Enterprise Java Beans method.



ejbRemove
public void ejbRemove() throws java.rmi.RemoteException(Code)
Internal Enterprise Java Beans method.



roleCreate
public void roleCreate(String name, String roleGroup) throws HeroException(Code)
Creates a new authorization role to the system. This kind of role is used to control the user access to different APIs. You have to call this method after "create" call (this API is an stateles session bean).
Parameters:
  name - name of the new role
Parameters:
  roleGroup - the name of the group
throws:
  HeroException -



setSessionContext
public void setSessionContext(javax.ejb.SessionContext context) throws RemoteException(Code)
Internal Enterprise Java Beans method.



setUserProperty
public void setUserProperty(String userName, String key, String value) throws HeroException(Code)
Set a new property to the user. User properties will be used to define user preferences. You have to call this method after "create" call (this API is an stateles session bean).
Parameters:
  userName - the name of the user
Parameters:
  key - the key of user property
Parameters:
  value - the value of user property
throws:
  HeroException -



setUserRole
public void setUserRole(String userName, String roleName) throws HeroException(Code)
Set a new authorization role to the user. You have to call this method after "create" call (this API is an stateles session bean).
Parameters:
  username - name of the user
Parameters:
  rolename - name of the role
throws:
  HeroException -



unsetSessionContext
public void unsetSessionContext() throws RemoteException(Code)
Internal Enterprise Java Beans method.



userCreate
public BnUserLocal userCreate(String name) throws HeroException(Code)
Creates user account. You have to call this method after "create" call (this API is an stateles session bean). This method is oriented to Bonita external users configuration
Parameters:
  name - name of the new user
throws:
  HeroException -



userCreate
public void userCreate(String name, String password, String email) throws HeroException(Code)
Creates user account. You have to call this method after "create" call (this API is an stateles session bean).
Parameters:
  name - name of the new user
Parameters:
  password - password of the new user
Parameters:
  email - email of the new user
throws:
  HeroException -



userCreate
public void userCreate(String name, String password, String email, String jabber) throws HeroException(Code)
Creates user account with an instant messaging address. You have to call this method after "create" call (this API is an stateles session bean).
Parameters:
  name - name of the new user
Parameters:
  password - password of the new user
Parameters:
  email - email of the new user
Parameters:
  jabber - jabber address of the new user
throws:
  HeroException -



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.