fr.paris.lutece.plugins.selfregistration.business
Class LdapUserHome

java.lang.Object
  extended by fr.paris.lutece.plugins.selfregistration.business.LdapUserHome

public final class LdapUserHome
extends java.lang.Object

LdapUserHome Class


Method Summary
static boolean checkOldPassword(java.lang.String strUid, java.lang.String strOldPassword)
          check if the Old Password equals the password associete to the uid
static void closeConnexion(javax.naming.directory.DirContext ldapContext)
          Close connexion to the ldap
static LdapUser getLdapUserByUid(javax.servlet.http.HttpServletRequest request, java.lang.String strUid)
          Return the ldapuser if exist
static void modification(LdapUser ldapUser)
          Modify the attributes user into the ldap
static javax.naming.directory.DirContext openConnexion()
          Open connexion to the ldap
static void registration(LdapUser ldapUser)
          Add an user into the ldap
static boolean uidExit(java.lang.String strUid)
          Test if user exist
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

openConnexion

public static javax.naming.directory.DirContext openConnexion()
                                                       throws javax.naming.NamingException
Open connexion to the ldap

Returns:
the ldap context
Throws:
javax.naming.NamingException - the naming exception

closeConnexion

public static void closeConnexion(javax.naming.directory.DirContext ldapContext)
                           throws javax.naming.NamingException
Close connexion to the ldap

Parameters:
ldapContext - the ldap context
Throws:
javax.naming.NamingException - the naming exception

registration

public static void registration(LdapUser ldapUser)
                         throws javax.naming.NamingException
Add an user into the ldap

Parameters:
ldapUser - the user to add in ldap
Throws:
javax.naming.NamingException - the naming exception

uidExit

public static boolean uidExit(java.lang.String strUid)
                       throws javax.naming.NamingException
Test if user exist

Parameters:
strUid - the uid of user
Returns:
true if user exist
Throws:
javax.naming.NamingException - the naming exception

checkOldPassword

public static boolean checkOldPassword(java.lang.String strUid,
                                       java.lang.String strOldPassword)
                                throws javax.naming.NamingException
check if the Old Password equals the password associete to the uid

Parameters:
strUid - the uid of user
strOldPassword - the password to check
Returns:
true if the Old Password equals the password associete to the uid
Throws:
javax.naming.NamingException - the naming exception

getLdapUserByUid

public static LdapUser getLdapUserByUid(javax.servlet.http.HttpServletRequest request,
                                        java.lang.String strUid)
                                 throws javax.naming.NamingException
Return the ldapuser if exist

Parameters:
request - the http request
strUid - the uid of user
Returns:
the ldap user if exist null other
Throws:
javax.naming.NamingException - the naming exception

modification

public static void modification(LdapUser ldapUser)
                         throws javax.naming.NamingException
Modify the attributes user into the ldap

Parameters:
ldapUser - the user to add in ldap
Throws:
javax.naming.NamingException - the naming exception


Copyright © 2008 Mairie de Paris. All Rights Reserved.