Changeset 363


Ignore:
Timestamp:
7 Aug 2006, 15:47:52 (18 years ago)
Author:
lregebro
Message:

Accomodation mapping storage tool.

Location:
WAeUP_SRP/trunk
Files:
5 added
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/exportimport.py

    r351 r363  
    5555    pm = site.portal_membership
    5656    pm.setLocalGroupRoles(site,['role:Authenticated',],'SectionReader')
     57
     58    importObjects(site.portal_accomodation, '', context)
     59   
    5760##    if hasattr(site,'campus'):
    5861##        pm.setLocalGroupRoles(site.campus,['role:Authenticated',],'SectionReader')
    5962    #setupStructure(site,context)
    6063    #import pdb; pdb.set_trace()
    61     pass
    6264    #site = context.getSite()
    6365    #tool = getToolByName(site, TOOL)
    6466    #importObjects(tool, '', context)
    6567
     68
     69from Products.GenericSetup.ZCatalog.exportimport import ZCatalogXMLAdapter
     70
     71from interfaces import IWAeUPTable
     72
     73class WAeUPTableXMLAdapter(ZCatalogXMLAdapter):
     74   
     75    __used_for__ = IWAeUPTable
     76
     77    _LOGGER_ID = 'waeup_table'
     78
     79    name = 'accomodation'
    6680
    6781# This the XMLAdapter itself. It encodes the im- / export logic that is specific
  • WAeUP_SRP/trunk/interfaces.py

    r274 r363  
    1616    """WAeUP_SRP
    1717    """
     18
     19class IWAeUPTable(Interface):
     20    """Tables to store object relational data
     21    """
     22
     23    def addRecord(**data):
     24        """Adds a record, with the data expressed in the data mapping.
     25       
     26        Raises an error if the uid exists.
     27        """
     28   
     29    def deleteRecord(uid):
     30        """Deletes the record specified by the uid"""
     31   
     32    def modifyRecord(uid, **data):
     33        """Modifies a record, with the data expressed in the data mapping.
     34       
     35        Raises an error if the uid does not exist.
     36        """
     37       
Note: See TracChangeset for help on using the changeset viewer.