fr.paris.lutece.plugins.mylutece.modules.ldapdatabase.authentication.business
Class LdapDatabaseHome

java.lang.Object
  extended by fr.paris.lutece.plugins.mylutece.modules.ldapdatabase.authentication.business.LdapDatabaseHome

public final class LdapDatabaseHome
extends java.lang.Object

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


Method Summary
static void addRoleForUser(int nIdUser, java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Assign a role to user
static LDAPDatabaseUser findLuteceUserByGuid(java.lang.String strLdapGuid, fr.paris.lutece.portal.service.plugin.Plugin plugin, fr.paris.lutece.portal.service.security.LuteceAuthentication authenticationService)
          Find users by guid
static java.util.ArrayList<java.lang.String> findUserGuidFromRole(java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find user's guid by role key
static java.util.ArrayList<java.lang.String> findUserRolesFromGuid(java.lang.String strGuid, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find user's roles by guid
static java.util.Collection<LDAPDatabaseUser> findUsersList(fr.paris.lutece.portal.service.plugin.Plugin plugin, fr.paris.lutece.portal.service.security.LuteceAuthentication authenticationService)
          Returns a collection of LdapUser objects
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
 

Method Detail

findLuteceUserByGuid

public static LDAPDatabaseUser findLuteceUserByGuid(java.lang.String strLdapGuid,
                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                                    fr.paris.lutece.portal.service.security.LuteceAuthentication authenticationService)
Find users by guid

Parameters:
strLdapGuid - the Ldap guid
plugin - The Plugin using this data access service
authenticationService - the LuteceAuthentication object
Returns:
LdapDatabaseUser the user corresponding to the guid

findUserRolesFromGuid

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

Parameters:
strGuid - the Ldap guid
plugin - The Plugin using this data access service
Returns:
ArrayList the role key list corresponding to the guid

findUserGuidFromRole

public static java.util.ArrayList<java.lang.String> findUserGuidFromRole(java.lang.String strRoleKey,
                                                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find user's guid by role key

Parameters:
strRoleKey - the Lutece Role Key
plugin - The Plugin using this data access service
Returns:
ArrayList the guid key list corresponding to the role

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

findUsersList

public static java.util.Collection<LDAPDatabaseUser> findUsersList(fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                                                   fr.paris.lutece.portal.service.security.LuteceAuthentication authenticationService)
Returns a collection of LdapUser objects

Parameters:
plugin - The current plugin using this method
authenticationService - the LuteceAuthentication object
Returns:
A collection of LdapUser


Copyright © 2010 Mairie de Paris. All Rights Reserved.