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

java.lang.Object
  extended by fr.paris.lutece.plugins.selfregistration.business.LdapUserDAO
All Implemented Interfaces:
ILdapUserDAO

public class LdapUserDAO
extends java.lang.Object
implements ILdapUserDAO

LdapUserDAO Class


Constructor Summary
LdapUserDAO()
           
 
Method Summary
 boolean checkOldPassword(java.lang.String strUid, java.lang.String strOldPassword)
          check if the Old Password equals the password associete to the uid
 void closeConnexion(javax.naming.directory.DirContext ldapContext)
          Close connexion to the ldap
 java.lang.String getContextFactory()
           
 java.util.Properties getLdapAttributes()
           
 LdapUser getLdapUserByUid(javax.servlet.http.HttpServletRequest request, java.lang.String strUid)
          Return the ldapuser if exist
 java.lang.String getLogin()
           
 java.lang.String getOu()
           
 java.lang.String getPassword()
           
 java.lang.String getPoolMaxSize()
           
 java.lang.String getPoolPrefSize()
           
 java.lang.String getPoolTimeout()
           
 java.lang.String getProviderUrl()
           
 java.lang.String getSecurityAuthentication()
           
 void modification(LdapUser ldapUser)
          Modify the attribute of the ldapUser in the ldap
 javax.naming.directory.DirContext openConnexion()
          Open connexion to the ldap
 void registration(LdapUser ldapUser)
          Add an user into the ldap
 void setContextFactory(java.lang.String strContextFactory)
           
 void setLdapAttributes(java.util.Properties ldapAttributes)
           
 void setLogin(java.lang.String strLogin)
           
 void setOu(java.lang.String strOu)
           
 void setPassword(java.lang.String strPassword)
           
 void setPoolMaxSize(java.lang.String strPoolMaxSize)
           
 void setPoolPrefSize(java.lang.String strPoolPrefSize)
           
 void setPoolTimeout(java.lang.String strPoolTimeout)
           
 void setProviderUrl(java.lang.String strProviderUrl)
           
 void setSecurityAuthentication(java.lang.String strSecurityAuthentication)
           
 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
 

Constructor Detail

LdapUserDAO

public LdapUserDAO()
Method Detail

openConnexion

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

Specified by:
openConnexion in interface ILdapUserDAO
Returns:
the ldap context
Throws:
javax.naming.NamingException - the namming exception

closeConnexion

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

Specified by:
closeConnexion in interface ILdapUserDAO
Parameters:
ldapContext - the ldap context
Throws:
javax.naming.NamingException - the namming exception

registration

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

Specified by:
registration in interface ILdapUserDAO
Parameters:
ldapUser - the user to add in ldap
Throws:
javax.naming.NamingException - the namming exception

uidExit

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

Specified by:
uidExit in interface ILdapUserDAO
Parameters:
strUid - the uid of user
Returns:
true if user exist
Throws:
javax.naming.NamingException - the namming exception

checkOldPassword

public 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

Specified by:
checkOldPassword in interface ILdapUserDAO
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 namming exception

getLdapUserByUid

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

Specified by:
getLdapUserByUid in interface ILdapUserDAO
Parameters:
strUid - the uid of user
request - the http request
Returns:
the ldap user if exist null other
Throws:
javax.naming.NamingException - the namming exception

modification

public void modification(LdapUser ldapUser)
                  throws javax.naming.NamingException
Modify the attribute of the ldapUser in the ldap

Specified by:
modification in interface ILdapUserDAO
Parameters:
ldapUser - the ldapUser
Throws:
javax.naming.NamingException - the namming exception

getLogin

public java.lang.String getLogin()
Returns:
the _strLogin

setLogin

public void setLogin(java.lang.String strLogin)
Parameters:
strLogin - the _strLogin to set

getPassword

public java.lang.String getPassword()
Returns:
the _strPassword

setPassword

public void setPassword(java.lang.String strPassword)
Parameters:
strPassword - the _strPassword to set

getContextFactory

public java.lang.String getContextFactory()
Returns:
the _strContextFactory

setContextFactory

public void setContextFactory(java.lang.String strContextFactory)
Parameters:
strContextFactory - the _strContextFactory to set

getPoolMaxSize

public java.lang.String getPoolMaxSize()
Returns:
the _strPoolMaxSize

setPoolMaxSize

public void setPoolMaxSize(java.lang.String strPoolMaxSize)
Parameters:
strPoolMaxSize - the _strPoolMaxSize to set

getPoolPrefSize

public java.lang.String getPoolPrefSize()
Returns:
the _strPoolPrefSize

setPoolPrefSize

public void setPoolPrefSize(java.lang.String strPoolPrefSize)
Parameters:
strPoolPrefSize - the _strPoolPrefSize to set

getPoolTimeout

public java.lang.String getPoolTimeout()
Returns:
the _strPoolTimeout

setPoolTimeout

public void setPoolTimeout(java.lang.String strPoolTimeout)
Parameters:
strPoolTimeout - the _strPoolTimeout to set

getProviderUrl

public java.lang.String getProviderUrl()
Returns:
the _strProviderUrl

setProviderUrl

public void setProviderUrl(java.lang.String strProviderUrl)
Parameters:
strProviderUrl - the _strProviderUrl to set

getSecurityAuthentication

public java.lang.String getSecurityAuthentication()
Returns:
the _strSecurityAuthentication

setSecurityAuthentication

public void setSecurityAuthentication(java.lang.String strSecurityAuthentication)
Parameters:
strSecurityAuthentication - the _strSecurityAuthentication to set

getOu

public java.lang.String getOu()
Returns:
the _strOu

setOu

public void setOu(java.lang.String strOu)
Parameters:
strOu - the _strOu to set

getLdapAttributes

public java.util.Properties getLdapAttributes()
Returns:
the ldapAttributes

setLdapAttributes

public void setLdapAttributes(java.util.Properties ldapAttributes)
Parameters:
ldapAttributes - the ldapAttributes to set


Copyright © 2008 Mairie de Paris. All Rights Reserved.