[CMF-checkins] CVS: CMF/CMFCore/interfaces - referenceable.py:1.1.2.1

Benjamin Saller bcsaller at yahoo.com
Wed Mar 24 12:02:34 EST 2004


Update of /cvs-repository/CMF/CMFCore/interfaces
In directory cvs.zope.org:/tmp/cvs-serv9302/interfaces

Added Files:
      Tag: at_reference_backport
	referenceable.py 
Log Message:
*reference engine backport from Archetypes


=== Added File CMF/CMFCore/interfaces/referenceable.py ===
from Interface import Attribute

try:
    from Interface import Interface
except ImportError:
    # for Zope versions before 2.6.0
    from Interface import Base as Interface

class IReferenceable(Interface):
    """this object is referenceable"""
    
    def UID():
        """ Unique ID """

    def getRefs():
        """get all the referenced objects for this object"""

    def getBRefs():
        """get all the back referenced objects for this object"""

    def reference_url():
        """like absoluteURL, but return a link to the object with this UID"""

    def hasRelationshipTo(target, relationship=None):
        """test is a relationship exists between objects"""

    def addReference(target, relationship=None, **kwargs):
        """add a reference to target. kwargs are metadata"""

    def deleteReference(target, relationship=None):
        """delete a ref to target"""

    def deleteReferences(relationship=None):
        """delete all references from this object"""

    def getRelationships():
        """list all the relationship types this object has refs for"""




More information about the CMF-checkins mailing list