Back to index

plone3  3.1.7
Public Member Functions
Archetypes.references.FolderishReference Class Reference
Inheritance diagram for Archetypes.references.FolderishReference:
Inheritance graph
Collaboration diagram for Archetypes.references.FolderishReference:
Collaboration graph

List of all members.

Public Member Functions

def __init__
def beforeSourceDeleteInformTarget

Detailed Description

Used by reference folder under the covers of the folderish API

Definition at line 18 of file

Constructor & Destructor Documentation

def Archetypes.references.FolderishReference.__init__ (   self,
  relationship = FOLDERISH_REFERENCE,

Definition at line 22 of file

00023                  relationship=FOLDERISH_REFERENCE, **kwargs):
00024         Reference.__init__(self, id, sid, tid, relationship, **kwargs)

Here is the caller graph for this function:

Member Function Documentation

Definition at line 25 of file

00026     def beforeSourceDeleteInformTarget(self):
00027         # The idea is that a reference folder would be
00028         # incrementing the reference count on its children
00029         # but not actually, placefully contain the object.
00030         # if the count is not 1 (meaning the last reference)
00031         # then we reject the delete
00032         if len(self.getTargetObject().getBRefs(FOLDERISH_REFERENCE)) != 1:
00033             raise ReferenceException, ("Can't delete target, "
00034                                        "its held by %s" %
00035                                        self.getSourceObject().absolute_url())

Here is the call graph for this function:

The documentation for this class was generated from the following file: