Back to index

plone3  3.1.7
_storage.py
Go to the documentation of this file.
00001 from zope.interface import Interface
00002 
00003 class IStorage(Interface):
00004     """Abstraction around the storage of field level data"""
00005 
00006     def getName():
00007         """return the storage name"""
00008 
00009     def get(name, instance, **kwargs):
00010         """lookup a value for a given instance stored under 'name'"""
00011 
00012     def set(name, instance, value, **kwargs):
00013         """set a value under the key 'name' for retrevial by/for
00014         instance"""
00015 
00016     # XXX all implementions have no 'value' argument
00017     #def unset(name, instance, value, **kwargs):
00018     def unset(name, instance, **kwargs):
00019         """unset a value under the key 'name'.
00020         used when changing storage for a field."""
00021 
00022 class ISQLStorage(IStorage):
00023     """ Marker interface for distinguishing ISQLStorages """
00024     pass