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

java.lang.Object
  extended by fr.paris.lutece.plugins.mylutece.modules.openiddatabase.authentication.business.OpenIdDatabaseHome

public final class OpenIdDatabaseHome
extends java.lang.Object

This class provides instances management methods (create, find, ...) for databaseUser objects


Constructor Summary
OpenIdDatabaseHome()
           
 
Method Summary
static void addGroupForUser(int nIdUser, java.lang.String strGroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Assign a group to user
static void addRoleForUser(int nIdUser, java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Assign a role to user
static java.util.Collection<BaseUser> findDatabaseUsersList(fr.paris.lutece.portal.service.plugin.Plugin plugin, fr.paris.lutece.portal.service.security.LuteceAuthentication authenticationService)
          Load the list of BaseUser
static BaseUser findLuteceUserByLogin(java.lang.String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin, fr.paris.lutece.portal.service.security.LuteceAuthentication authenticationService)
          Find users by login
static java.util.ArrayList<java.lang.String> findUserGroupsFromLogin(java.lang.String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find user's groups by login
static java.util.ArrayList<java.lang.String> findUserRolesFromLogin(java.lang.String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find user's roles by login
static void removeGroupsForUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete groups for a user
static void removeRolesForUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete roles for a user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenIdDatabaseHome

public OpenIdDatabaseHome()
Method Detail

findLuteceUserByLogin

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

Parameters:
strLogin - the login
plugin - The Plugin using this data access service
authenticationService - the LuteceAuthentication object
Returns:
DatabaseUser the user corresponding to the login

findDatabaseUsersList

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

Parameters:
plugin - The Plugin using this data access service
Returns:
The Collection of the BaseUser

findUserRolesFromLogin

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

Parameters:
strLogin - the login
plugin - The Plugin using this data access service
Returns:
ArrayList the role key list corresponding to the login

removeRolesForUser

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

Parameters:
nIdUser - The id of the user
plugin - The Plugin using this data access service

addRoleForUser

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

Parameters:
nIdUser - The id of the user
strRoleKey - The key of the role
plugin - The Plugin using this data access service

findUserGroupsFromLogin

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

Parameters:
strLogin - the login
plugin - The Plugin using this data access service
Returns:
ArrayList the group key list corresponding to the login

removeGroupsForUser

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

Parameters:
nIdUser - The id of the user
plugin - The Plugin using this data access service

addGroupForUser

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

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.