com.stratelia.silverpeas.domains.ldapdriver
Class LDAPUser

java.lang.Object
  extended by com.stratelia.silverpeas.domains.ldapdriver.LDAPUser

public class LDAPUser
extends Object

This class reads user infos from the LDAP DB and translate it into the UserDetail format

Author:
tleroi

Field Summary
protected  DomainDriver driverParent
           
 
Constructor Summary
LDAPUser()
           
 
Method Summary
 void beginSynchronization()
          Called when Admin starts the synchronization
 String endSynchronization()
          Called when Admin ends the synchronization
 UserDetail[] getAllUsers(String lds, String extraFilter)
          Return all users found in the baseDN tree
 AbstractLDAPTimeStamp getMaxTimeStamp(String lds, String minTimeStamp)
           
 UserDetail getUser(String lds, String id)
          Return a UserDetail object filled with the infos of the user having ID = id NOTE : the DomainID and the ID are not set.
 String[] getUserAttributes()
           
 UserDetail getUserByLogin(String lds, String loginUser)
           
 UserFull getUserFull(String lds, String id, int domainId)
          Return a UserDetail object filled with the infos of the user having ID = id NOTE : the DomainID and the ID are not set.
 void init(LDAPSettings driverSettings, DomainDriver driverParent, LDAPSynchroCache synchroCache)
          Initialize the settings from the read ones
 UserDetail translateUser(String lds, com.novell.ldap.LDAPEntry userEntry)
          Translate a LDAP user entry into a UserDetail structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

driverParent

protected DomainDriver driverParent
Constructor Detail

LDAPUser

public LDAPUser()
Method Detail

init

public void init(LDAPSettings driverSettings,
                 DomainDriver driverParent,
                 LDAPSynchroCache synchroCache)
Initialize the settings from the read ones

Parameters:
driverSettings - the settings retreived from the property file

beginSynchronization

public void beginSynchronization()
                          throws Exception
Called when Admin starts the synchronization

Throws:
Exception

endSynchronization

public String endSynchronization()
                          throws Exception
Called when Admin ends the synchronization

Throws:
Exception

getAllUsers

public UserDetail[] getAllUsers(String lds,
                                String extraFilter)
                         throws AdminException
Return all users found in the baseDN tree

Parameters:
lds - the LDAP connection
Returns:
all founded users
Throws:
AdminException - if an error occur during LDAP operations

getUserFull

public UserFull getUserFull(String lds,
                            String id,
                            int domainId)
                     throws AdminException
Return a UserDetail object filled with the infos of the user having ID = id NOTE : the DomainID and the ID are not set.

Parameters:
lds - the LDAP connection
id - the user id
Returns:
the user object
Throws:
AdminException - if an error occur during LDAP operations or if the user is not found

getUser

public UserDetail getUser(String lds,
                          String id)
                   throws AdminException
Return a UserDetail object filled with the infos of the user having ID = id NOTE : the DomainID and the ID are not set.

Parameters:
lds - the LDAP connection
id - the user id
Returns:
the user object
Throws:
AdminException - if an error occur during LDAP operations or if the user is not found

getUserByLogin

public UserDetail getUserByLogin(String lds,
                                 String loginUser)
                          throws AdminException
Throws:
AdminException

translateUser

public UserDetail translateUser(String lds,
                                com.novell.ldap.LDAPEntry userEntry)
                         throws AdminException
Translate a LDAP user entry into a UserDetail structure. NOTE : the DomainID and the ID are not set.

Parameters:
userEntry - the LDAP user object
Returns:
the user object
Throws:
AdminException - if an error occur during LDAP operations or if there is no userEntry object

getMaxTimeStamp

public AbstractLDAPTimeStamp getMaxTimeStamp(String lds,
                                             String minTimeStamp)
                                      throws AdminException
Throws:
AdminException

getUserAttributes

public String[] getUserAttributes()


Copyright © 2016 Silverpeas. All Rights Reserved.