net.sf.jportlet.service.login
Class LoginServiceImpl

java.lang.Object
  |
  +--net.sf.jportlet.service.PortletServiceAdapter
        |
        +--net.sf.jportlet.service.login.LoginServiceImpl
All Implemented Interfaces:
LoginService, PortletService

public class LoginServiceImpl
extends PortletServiceAdapter
implements LoginService

Implementation of LoginService

Author:
Herve Tchepannou

Field Summary
 
Fields inherited from class net.sf.jportlet.service.PortletServiceAdapter
_log, _serviceConfig, _serviceContext
 
Fields inherited from interface net.sf.jportlet.service.login.LoginService
NAME, PASSWORD, USER_ID
 
Constructor Summary
LoginServiceImpl()
           
 
Method Summary
 java.lang.String getServiceName()
          Returns the name of the service
 boolean login(net.sf.jportlet.portlet.PortletRequest request)
          Authenticate a user.
 void logout(net.sf.jportlet.portlet.PortletRequest request)
          Logs the current user out of the portal.
 
Methods inherited from class net.sf.jportlet.service.PortletServiceAdapter
destroy, getInitParameter, getInitParameter, getServiceConfig, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jportlet.service.PortletService
destroy, getServiceConfig, init
 

Constructor Detail

LoginServiceImpl

public LoginServiceImpl()
Method Detail

login

public boolean login(net.sf.jportlet.portlet.PortletRequest request)
              throws PortletException
Description copied from interface: LoginService
Authenticate a user. This methods expects from the request the following form parameters:
  1. LoginService.USER_ID: the ID of the user
  2. LoginService.PASSWORD: The user's password.
If the user is authenticated, this method will notify all the portlet by calling net.sf.jportlet.portlet.Portlet#login()

Specified by:
login in interface LoginService
Parameters:
request -
Returns:
true if the user is logged in
PortletException
See Also:
LoginService.login(net.sf.jportlet.portlet.PortletRequest)

logout

public void logout(net.sf.jportlet.portlet.PortletRequest request)
            throws PortletException
Description copied from interface: LoginService
Logs the current user out of the portal.

Specified by:
logout in interface LoginService
Parameters:
request -
Throws:
PortletException - if any error occurs
See Also:
LoginService.logout(net.sf.jportlet.portlet.PortletRequest)

getServiceName

public java.lang.String getServiceName()
Description copied from interface: PortletService
Returns the name of the service

Specified by:
getServiceName in interface PortletService
Returns:
String
See Also:
PortletService.getServiceName()


Copyright © 2002 Herve Tchepannou. All Rights Reserved.