Index: /waeup/branches/ulif-rewrite/src/waeup/university/facultycontainer.py
===================================================================
--- /waeup/branches/ulif-rewrite/src/waeup/university/facultycontainer.py	(revision 4249)
+++ /waeup/branches/ulif-rewrite/src/waeup/university/facultycontainer.py	(revision 4250)
@@ -80,4 +80,40 @@
                 setattr(new_item, key, val)
             self.receiver.addFaculty(new_item)
+        return
+
+class IDepartmentCSVFile(ICSVFile):
+    """A CSV file that contains department data.
+    """
+
+class DepartmentCSVFile(CSVFile):
+    """An abstraction of a CSV file containing faculties.
+    """
+    grok.implements(IDepartmentCSVFile)
+    grok.provides(IDepartmentCSVFile)
+    required_fields = ['code', 'title', 'title_prefix', 'faculty_code']
+
+class DepartmentCSVImporter(CSVImporter):
+    """Shuffle data from department CSV files into faculty containers.
+    """
+    # Tell, what kinds of objects we connect...
+    grok.adapts(IDepartmentCSVFile, IFacultyContainer)
+    # Tell the world, that we are an importer...
+    grok.implements(IWAeUPCSVImporter)
+    grok.provides(IWAeUPCSVImporter)
+
+    datatype = u'Department Importer'
+
+    def doImport(self, clear_old_data=True, overwrite=True):
+        # CSVImporter instances have a `csvfile` and a `receiver`
+        # object defined which refer to the CSV file and the container.
+        for row in self.csvfile.getData():
+            new_item = createObject(u'waeup.Department')
+            #data = row.items()
+            faculty_code = row['faculty_code']
+            faculty = self.receiver[faculty_code]
+            del row['faculty_code']
+            for key, val in row.items():
+                setattr(new_item, key, val)
+            faculty.addDepartment(new_item)
         return
 
