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