cz.muni.fi.rtc.teacherWorkbench.importer
Class PeopleImporter

java.lang.Object
  extended by cz.muni.fi.rtc.teacherWorkbench.importer.PeopleImporter

public class PeopleImporter
extends java.lang.Object

Author:
honza Class for importing people into LDAP

Constructor Summary
PeopleImporter(ImporterConfiguration conf)
          Constructs new Importer using the configuration passed as argument
 
Method Summary
 void importUsers(java.util.Collection<ImportedPerson> users)
          Inserts the users to the LDAP database and creates their account in RTC assigning them default licence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeopleImporter

public PeopleImporter(ImporterConfiguration conf)
               throws ImporterException
Constructs new Importer using the configuration passed as argument

Parameters:
conf - Configuration of the importer
Throws:
ImporterException - If the configuration values are not correct or connection to some services fails
Method Detail

importUsers

public void importUsers(java.util.Collection<ImportedPerson> users)
                 throws ImporterException
Inserts the users to the LDAP database and creates their account in RTC assigning them default licence. LDAP exceptions are not thrown but logger as ERROR instead.

Parameters:
users -
Throws:
ImporterException - Thrown when: - Class not configured correctly - Mandatory fields of some users are not filled (checked before writting to LDAP -- atomic fail)