net.myvietnam.mvnplugin.mvnforum.auth
Class OnlineUserManager

java.lang.Object
  |
  +--net.myvietnam.mvnplugin.mvnforum.auth.OnlineUserManager

public class OnlineUserManager
extends java.lang.Object


Method Summary
 void addOnlineUserListener(OnlineUserListener l)
           
protected  void fireDataChanged(OnlineUserEvent e)
           
static OnlineUserManager getInstance()
           
 OnlineUser getOnlineUser(javax.servlet.http.HttpServletRequest request)
           
 java.util.Collection getOnlineUserActions(int sortOption)
           
 OnlineUser login(javax.servlet.http.HttpServletRequest request, java.lang.String memberName, java.lang.String encodedPassword)
          NOTE: This method MUST be the only way to authenticate a user
 void logout(javax.servlet.http.HttpServletRequest request)
           
 void processLogin(javax.servlet.http.HttpServletRequest request)
          Util method to be called from Processor.
 void removeOnlineUserListener(OnlineUserListener l)
          Event method
 void updateOnlineUserAction(javax.servlet.http.HttpServletRequest request, Action action)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static OnlineUserManager getInstance()

processLogin

public void processLogin(javax.servlet.http.HttpServletRequest request)
                  throws AuthenticationException,
                         net.myvietnam.mvncore.exception.AssertionException,
                         net.myvietnam.mvncore.exception.DatabaseException,
                         net.myvietnam.mvncore.exception.BadInputException
Util method to be called from Processor. It assumes that to input parameters are MemberName for username MemberMatkhau for password

AuthenticationException
net.myvietnam.mvncore.exception.AssertionException
net.myvietnam.mvncore.exception.DatabaseException
net.myvietnam.mvncore.exception.BadInputException

login

public OnlineUser login(javax.servlet.http.HttpServletRequest request,
                        java.lang.String memberName,
                        java.lang.String encodedPassword)
                 throws AuthenticationException,
                        net.myvietnam.mvncore.exception.DatabaseException,
                        net.myvietnam.mvncore.exception.AssertionException
NOTE: This method MUST be the only way to authenticate a user

AuthenticationException
net.myvietnam.mvncore.exception.DatabaseException
net.myvietnam.mvncore.exception.AssertionException

logout

public void logout(javax.servlet.http.HttpServletRequest request)
            throws net.myvietnam.mvncore.exception.DatabaseException,
                   net.myvietnam.mvncore.exception.AssertionException
net.myvietnam.mvncore.exception.DatabaseException
net.myvietnam.mvncore.exception.AssertionException

getOnlineUser

public OnlineUser getOnlineUser(javax.servlet.http.HttpServletRequest request)
                         throws AuthenticationException,
                                net.myvietnam.mvncore.exception.DatabaseException,
                                net.myvietnam.mvncore.exception.AssertionException
AuthenticationException
net.myvietnam.mvncore.exception.DatabaseException
net.myvietnam.mvncore.exception.AssertionException

getOnlineUserActions

public java.util.Collection getOnlineUserActions(int sortOption)

updateOnlineUserAction

public void updateOnlineUserAction(javax.servlet.http.HttpServletRequest request,
                                   Action action)
                            throws net.myvietnam.mvncore.exception.AssertionException,
                                   net.myvietnam.mvncore.exception.DatabaseException,
                                   AuthenticationException
net.myvietnam.mvncore.exception.AssertionException
net.myvietnam.mvncore.exception.DatabaseException
AuthenticationException

removeOnlineUserListener

public void removeOnlineUserListener(OnlineUserListener l)
Event method


addOnlineUserListener

public void addOnlineUserListener(OnlineUserListener l)

fireDataChanged

protected void fireDataChanged(OnlineUserEvent e)