Back to index

plone3  3.1.7
Public Member Functions | Static Private Attributes
CMFEditions.StandardModifiers.RetainATRefs Class Reference

List of all members.

Public Member Functions

def beforeSaveModifier
def afterRetrieveModifier

Static Private Attributes

tuple __implements__ = (ISaveRetrieveModifier, )

Detailed Description

Modifier which ensures the Archetypes references of the working
   copy are preserved when reverting to a previous version

Definition at line 593 of file StandardModifiers.py.


Member Function Documentation

def CMFEditions.StandardModifiers.RetainATRefs.afterRetrieveModifier (   self,
  obj,
  repo_clone,
  preserve = () 
)

Definition at line 603 of file StandardModifiers.py.

00603 
00604     def afterRetrieveModifier(self, obj, repo_clone, preserve=()):
00605         # check if the modifier is called with a valid working copy
00606         if obj is None:
00607             return [], [], {}
00608 
00609         if not WRONG_AT:
00610             if IReferenceable.isImplementedBy(obj) \
00611                 and hasattr(aq_base(obj), REFERENCE_ANNOTATION):
00612                 #Preserve AT references
00613                 orig_refs_container = getattr(aq_base(obj), REFERENCE_ANNOTATION)
00614                 setattr(repo_clone, REFERENCE_ANNOTATION, orig_refs_container)
00615         return [], [], {}
00616 
00617 InitializeClass(RetainATRefs)

Definition at line 600 of file StandardModifiers.py.

00600 
00601     def beforeSaveModifier(self, obj, clone):
00602         return {}, [], []


Member Data Documentation

tuple CMFEditions.StandardModifiers.RetainATRefs.__implements__ = (ISaveRetrieveModifier, ) [static, private]

Definition at line 598 of file StandardModifiers.py.


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