Index: main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py	(revision 15964)
+++ main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py	(revision 16012)
@@ -196,8 +196,30 @@
         raise NotImplementedError('method not implemented')
 
+    def checkCreateRequirements(self, parent, row, site):
+        """Checks requirements the parent object must fulfill when
+        a new subobject is being created.
+
+        This method is not used in case of updating or removing objects.
+
+        Returns error messages as strings in case of requirement
+        problems.
+        """
+        return None
+
     def checkUpdateRequirements(self, obj, row, site):
         """Checks requirements the object must fulfill when being updated.
 
         This method is not used in case of deleting or adding objects.
+
+        Returns error messages as strings in case of requirement
+        problems.
+        """
+        return None
+
+
+    def checkRemoveRequirements(self, obj, row, site):
+        """Checks requirements the object must fulfill when being removed.
+
+        This method is not used in case of updating or adding objects.
 
         Returns error messages as strings in case of requirement
@@ -329,4 +351,11 @@
            record is stored in the pending data file.
 
+           The `BatchProcessor.checkCreateRequirements` method checks additional
+           requirements the parent object must fulfill before a new sububject
+           is being added. These requirements are not imposed by the data
+           type but the context of the object. For example, the course results
+           of graduated students must not changed by import, neither by 
+           creating nor updating or removing course tickets.
+
            Now `doImport` tries to add the new object with the data
            from the conversion dictionary. In some cases this
@@ -359,4 +388,11 @@
            a ``no such entry`` warning message is raised and a record is
            stored in the pending data file.
+
+           The `BatchProcessor.checkRemoveRequirements` method checks additional
+           requirements the object must fulfill before being removed.
+           These requirements are not imposed by the data type but the context
+           of the object. For example, the course results of graduated students
+           must not changed by import, neither by creating nor updating or
+           removing course tickets.
 
            Finally, `doImport` removes the existing object.
@@ -425,4 +461,11 @@
                         "This object already exists.")
                     continue
+                parent = self.getParent(row, site)
+                create_errors = self.checkCreateRequirements(parent, row, site)
+                if create_errors is not None:
+                    num_warns += 1
+                    self.writeFailedRow(
+                        failed_writer, string_row, create_errors)
+                    continue
                 obj = self.callFactory()
                 # Override all values in row, also
@@ -453,4 +496,11 @@
                         failed_writer, string_row,
                         "Cannot remove: no such entry")
+                    continue
+                obj = self.getEntry(row, site)
+                remove_errors = self.checkRemoveRequirements(obj, row, site)
+                if remove_errors is not None:
+                    num_warns += 1
+                    self.writeFailedRow(
+                        failed_writer, string_row, remove_errors)
                     continue
                 self.delEntry(row, site)
