|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthero.session.UserRegistrationBean
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);
Constructor Summary | |
UserRegistrationBean()
|
Method Summary | |
void |
assertUserSecurityRoleExists()
Create the role BONITAUSER if it doesn't exist |
void |
deleteUser(java.lang.String userName)
Detete a user from Bonita database. |
void |
ejbActivate()
Internal Enterprise Java Beans method. |
void |
ejbCreate()
Create the User Session Bean. |
void |
ejbPassivate()
Internal Enterprise Java Beans method. |
void |
ejbRemove()
Internal Enterprise Java Beans method. |
void |
roleCreate(java.lang.String name,
java.lang.String roleGroup)
Creates a new authorization role to the system. |
void |
setSessionContext(javax.ejb.SessionContext context)
Internal Enterprise Java Beans method. |
void |
setUserProperty(java.lang.String userName,
java.lang.String key,
java.lang.String value)
Set a new property to the user. |
void |
setUserRole(java.lang.String userName,
java.lang.String roleName)
Set a new authorization role to the user. |
void |
unsetSessionContext()
Internal Enterprise Java Beans method. |
BnUserLocal |
userCreate(java.lang.String name)
Creates user account. |
void |
userCreate(java.lang.String name,
java.lang.String password,
java.lang.String email)
Creates user account. |
void |
userCreate(java.lang.String name,
java.lang.String password,
java.lang.String email,
java.lang.String jabber)
Creates user account with an instant messaging address. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UserRegistrationBean()
Method Detail |
public void assertUserSecurityRoleExists() throws hero.util.HeroException
HeroException,
- (catch : FinderException)
hero.util.HeroException
public void ejbCreate() throws javax.ejb.CreateException
javax.ejb.CreateException
public BnUserLocal userCreate(java.lang.String name) throws hero.util.HeroException
name
- name of the new user
hero.util.HeroException
public void userCreate(java.lang.String name, java.lang.String password, java.lang.String email) throws hero.util.HeroException
name
- name of the new userpassword
- password of the new useremail
- email of the new user
hero.util.HeroException
public void userCreate(java.lang.String name, java.lang.String password, java.lang.String email, java.lang.String jabber) throws hero.util.HeroException
name
- name of the new userpassword
- password of the new useremail
- email of the new userjabber
- jabber address of the new user
hero.util.HeroException
public void deleteUser(java.lang.String userName) throws hero.util.HeroException
userName
- the name of the user
hero.util.HeroException
public void roleCreate(java.lang.String name, java.lang.String roleGroup) throws hero.util.HeroException
name
- name of the new roleroleGroup
- the name of the group
hero.util.HeroException
public void setUserRole(java.lang.String userName, java.lang.String roleName) throws hero.util.HeroException
hero.util.HeroException
public void setUserProperty(java.lang.String userName, java.lang.String key, java.lang.String value) throws hero.util.HeroException
userName
- the name of the userkey
- the key of user propertyvalue
- the value of user property
hero.util.HeroException
public void setSessionContext(javax.ejb.SessionContext context) throws java.rmi.RemoteException
setSessionContext
in interface javax.ejb.SessionBean
java.rmi.RemoteException
public void unsetSessionContext() throws java.rmi.RemoteException
java.rmi.RemoteException
public void ejbRemove() throws java.rmi.RemoteException
ejbRemove
in interface javax.ejb.SessionBean
java.rmi.RemoteException
public void ejbActivate() throws java.rmi.RemoteException
ejbActivate
in interface javax.ejb.SessionBean
java.rmi.RemoteException
public void ejbPassivate() throws java.rmi.RemoteException
ejbPassivate
in interface javax.ejb.SessionBean
java.rmi.RemoteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |