Index: /main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/jambtables.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/jambtables.py	(revision 5721)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/jambtables.py	(revision 5722)
@@ -34,5 +34,8 @@
 from BTrees.Length import Length
 
-from waeup.sirp.applicants.jambtables.interfaces import IJAMBDataTable
+from waeup.sirp.interfaces import IWAeUPSIRPPluggable
+from waeup.sirp.applicants.jambtables.interfaces import (
+    IJAMBDataTable, IJAMBDataRoot
+    )
 
 #: The header fields required for a valid JAMB table CSV file.
@@ -180,2 +183,59 @@
             os.mkdir(jambtable_storage)
         return os.path.abspath(jambtable_storage)
+
+class JAMBDataRoot(grok.Container):
+    grok.implements(IJAMBDataRoot)
+    
+class JAMBDataPlugin(grok.GlobalUtility):
+    """A WAeUPSIRPPlugin that creates a JAMB data root in portal.
+
+    This plugin should be called by a typical
+    `waeup.sirp.app.Universtiy` instance on creation time. The
+    :meth:`update` method normally can also be triggered manually over
+    the main site configuration.
+
+    Implements :class:`waeup.sirp.interfaces.IWAeUPSIRPPluggable`
+    """
+    grok.name('jambdata')
+    grok.implements(IWAeUPSIRPPluggable)
+    log_prefix = 'JAMBDataPlugin'
+
+    def setup(self, site, name, logger):
+        """Create a new :class:`ApplicantsRoot` instance in `site`.
+        """
+        site['jambdata'] = JAMBDataRoot()
+        logger.info(
+            '%s: Installed JAMB data root.' % (self.log_prefix,)
+            )
+        return
+
+    def update(self, site, name, logger):
+        """Update site wide ``jambdata`` root.
+
+        If the site already contains a suitable ``jambdata`` root,
+        leave it that way. If not create one and delete the old one if
+        appropriate.
+        """
+        jamb_folder = site.get('jambdata', None)
+        site_name = getattr(site, '__name__', '<Unnamed Site>')
+        if IJAMBDataRoot.providedBy(jamb_folder):
+            # JAMB data storage up to date. Return.
+            logger.info(
+                '%s: Updating site at %s: Nothing to do.' % (
+                    self.log_prefix, site_name,)
+                )
+            return
+        elif jamb_folder is not None:
+            # JAMB data storage needs update. Remove old instance.
+            logger.warn(
+                '%s: Outdated JAMB data folder detected at site %s.'
+                'Removing it.' % (self.log_prefix, site_name)
+                    )
+            del site['jambdata']
+        # Add new applicants.
+        logger.info(
+            '%s: Updating site at %s. Installing '
+            'JAMB data folder.' % (self.log_prefix, site_name,)
+            )
+        self.setup(site, name, logger)
+        return
