fr.paris.lutece.plugins.mylutece.modules.openiddatabase.authentication.business
Class OpenIdDatabaseDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.mylutece.modules.openiddatabase.authentication.business.OpenIdDatabaseDAO
All Implemented Interfaces:
IManageUsers

public class OpenIdDatabaseDAO
extends java.lang.Object
implements IManageUsers

This class provides Data Access methods for authentication (role retrieval).


Constructor Summary
OpenIdDatabaseDAO()
           
 
Method Summary
 void createGroupForUser(int nIdUser, java.lang.String strGroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Assign a group to user
 void createRoleForUser(int nIdUser, java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Assign a role to user
 void deleteGroupsForUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete groups for a user
 void deleteRolesForUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete roles for a user
 BaseUser selectLuteceUserByLogin(java.lang.String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin, fr.paris.lutece.portal.service.security.LuteceAuthentication authenticationService)
          Find DatabaseUser by login
 java.util.Collection<BaseUser> selectLuteceUserList(fr.paris.lutece.portal.service.plugin.Plugin plugin, fr.paris.lutece.portal.service.security.LuteceAuthentication authenticationService)
          Load the list of BaseUser
 java.util.ArrayList<java.lang.String> selectUserGroupsFromLogin(java.lang.String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find user's groups by login
 java.util.ArrayList<java.lang.String> selectUserRolesFromLogin(java.lang.String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find user's roles by login
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenIdDatabaseDAO

public OpenIdDatabaseDAO()
Method Detail

selectLuteceUserByLogin

public BaseUser selectLuteceUserByLogin(java.lang.String strLogin,
                                        fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                        fr.paris.lutece.portal.service.security.LuteceAuthentication authenticationService)
Find DatabaseUser by login

Specified by:
selectLuteceUserByLogin in interface IManageUsers
Parameters:
strLogin - the login
plugin - The Plugin using this data access service
authenticationService - the LuteceAuthentication object
Returns:
DatabaseUser the user corresponding to the login

selectLuteceUserList

public java.util.Collection<BaseUser> selectLuteceUserList(fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                                           fr.paris.lutece.portal.service.security.LuteceAuthentication authenticationService)
Load the list of BaseUser

Specified by:
selectLuteceUserList in interface IManageUsers
Parameters:
plugin - The Plugin using this data access service
Returns:
The Collection of the BaseUser

selectUserRolesFromLogin

public java.util.ArrayList<java.lang.String> selectUserRolesFromLogin(java.lang.String strLogin,
                                                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find user's roles by login

Specified by:
selectUserRolesFromLogin in interface IManageUsers
Parameters:
strLogin - the login
plugin - The Plugin using this data access service
Returns:
ArrayList the roles key list corresponding to the login

deleteRolesForUser

public void deleteRolesForUser(int nIdUser,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete roles for a user

Specified by:
deleteRolesForUser in interface IManageUsers
Parameters:
nIdUser - The id of the user
plugin - The Plugin using this data access service

createRoleForUser

public void createRoleForUser(int nIdUser,
                              java.lang.String strRoleKey,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Assign a role to user

Specified by:
createRoleForUser in interface IManageUsers
Parameters:
nIdUser - The id of the user
strRoleKey - The key of the role
plugin - The Plugin using this data access service

selectUserGroupsFromLogin

public java.util.ArrayList<java.lang.String> selectUserGroupsFromLogin(java.lang.String strLogin,
                                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find user's groups by login

Specified by:
selectUserGroupsFromLogin in interface IManageUsers
Parameters:
strLogin - The login
plugin - The Plugin using this data access service
Returns:
ArrayList the group key list corresponding to the login

deleteGroupsForUser

public void deleteGroupsForUser(int nIdUser,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete groups for a user

Specified by:
deleteGroupsForUser in interface IManageUsers
Parameters:
nIdUser - The id of the user
plugin - The Plugin using this data access service

createGroupForUser

public void createGroupForUser(int nIdUser,
                               java.lang.String strGroupKey,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Assign a group to user

Specified by:
createGroupForUser in interface IManageUsers
Parameters:
nIdUser - The id of the user
strGroupKey - The key of the group
plugin - The Plugin using this data access service


Copyright © 2010 Mairie de Paris. All Rights Reserved.