Back to index

plone3  3.1.7
_referenceengine.py
Go to the documentation of this file.
00001 from zope.interface import Interface
00002 
00003 class IReference(Interface):
00004     """ Reference """
00005 
00006     def UID():
00007         """the uid method for compat"""
00008 
00009     # Convenience methods
00010     def getSourceObject():
00011         """ returns the source end as object """
00012 
00013     def getTargetObject():
00014         """ returns the source end as object """
00015 
00016     # Catalog support
00017     def targetId():
00018         """ gives the id of the target object """
00019 
00020     def targetTitle():
00021         """ gives the title of the target object """
00022 
00023 
00024     # Policy hooks, subclass away
00025     def addHook(tool, sourceObject=None, targetObject=None):
00026         """gets called after reference object has been annotated to the object
00027         to reject the reference being added raise a ReferenceException """
00028 
00029     def delHook(tool, sourceObject=None, targetObject=None):
00030         """gets called before reference object gets deleted
00031         to reject the delete raise a ReferenceException """
00032 
00033     ###
00034     # OFS Operations Policy Hooks
00035     # These Hooks are experimental and subject to change
00036     def beforeTargetDeleteInformSource():
00037         """called before target object is deleted so
00038         the source can have a say"""
00039 
00040     def beforeSourceDeleteInformTarget():
00041         """called when the refering source Object is
00042         about to be deleted"""
00043 
00044     def _getURL():
00045         """the url used as the relative path based uid in the catalogs"""
00046 
00047 
00048 class IContentReference(IReference):
00049     '''Subclass of Reference to support contentish objects inside references '''
00050 
00051     def getContentObject():
00052         """ gives the contentish object attached to the reference"""
00053 
00054 class IReferenceCatalog(Interface):
00055     """Marker interface for reference catalog
00056     """
00057 
00058 class IUIDCatalog(Interface):
00059     """Marker interface for uid catalog
00060     """