Back to index

plone3  3.1.7
IReferenceFactories.py
Go to the documentation of this file.
00001 #########################################################################
00002 # Copyright (c) 2005 Gregoire Weber. 
00003 # All Rights Reserved.
00004 # 
00005 # This file is part of CMFEditions.
00006 # 
00007 # CMFEditions is free software; you can redistribute it and/or modify
00008 # it under the terms of the GNU General Public License as published by
00009 # the Free Software Foundation; either version 2 of the License, or
00010 # (at your option) any later version.
00011 # 
00012 # CMFEditions is distributed in the hope that it will be useful,
00013 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 # GNU General Public License for more details.
00016 # 
00017 # You should have received a copy of the GNU General Public License
00018 # along with CMFEditions; if not, write to the Free Software
00019 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00020 #########################################################################
00021 """Manages Reference Factories.
00022 
00023 $Id: $
00024 """
00025 
00026 from Interface import Interface
00027 
00028 
00029 class IReferenceFactories(Interface):
00030     """Contains Factories knowing how and where to instantiate an object.
00031     
00032     Caution: 
00033     
00034     - This interface is in flux and probably will change when implementing 
00035       Archteypes reference support.
00036     - The source parameter will disappear as soon as on save the back 
00037       references are save with the object.
00038     """
00039 
00040     def invokeFactory(repo_clone, source, selector=None):
00041         """Invokes the right factory for the object in a history.
00042         
00043         Returns the attached object and it's id.
00044         """
00045 
00046     def hasBeenMoved(obj, source):
00047         """Returns True if the object has been moved away from ``source``.
00048         """