| 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 $ |
Method Summary | |
public void | checkPassword(SecuritySession securitySession, String password) | public void | ejbActivate() | public void | ejbCreate() Called by the container just after the bean has been created.
exception: CreateException - if any error occurs. | public void | ejbPassivate() Called by the container to notify the entity object it will be
deactivated. | public void | ejbRemove() 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 UserDO | findUserByName(SecuritySession securitySession, String userName) Find a user given the user name. | final public String | getSystemUserName(SecuritySession securitySession, String userName) | final public String | getUserNameFromSystemUserName(SecuritySession securitySession, String systemUserName) | public boolean | isUserEnabled(SecuritySession securitySession, String userName) Find out if a user is currently enabled
Parameters: userName - throws: InvalidFieldValueException - if userName isnull . | public SecuritySession | login(UserDO user, String password) Login to the system. | public String | loginAgain(SecuritySession securitySession, String userName) | public void | removeUser(SecuritySession securitySession, String userNameRemove) Remove a user from the system. | public void | restoreUser(SecuritySession securitySession, String restoreUserName) | final public void | setPassword(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 void | setSessionContext(SessionContext sessionContext) Set up the context for this entity object. |
sessionContext | SessionContext sessionContext(Code) | | Provides the session bean with container-specific information.
|
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. |
|
|