Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
plone.app.iterate.relation.NoCopyReferenceAdapter Class Reference

List of all members.

Public Member Functions

def __init__
def checkin
def checkout

Public Attributes

 context

Static Public Attributes

 checkoutBackReferences = checkinBackReferencescheckout

Detailed Description

an adapter for references that does not copy them to the wc on checkout.

additionally custom reference state is kept when the wc is checked in.

Definition at line 87 of file relation.py.


Constructor & Destructor Documentation

Definition at line 96 of file relation.py.

00096 
00097     def __init__(self, context):
00098         self.context = context
    

Here is the caller graph for this function:


Member Function Documentation

def plone.app.iterate.relation.NoCopyReferenceAdapter.checkin (   self,
  baseline,
  wc,
  refs,
  storage 
)

Definition at line 99 of file relation.py.

00099 
00100     def checkin( self, baseline, wc, refs, storage ):
00101         # move the references from the baseline to the wc
00102 
00103         # one note, on checkin the wc uid is not yet changed to match that of the baseline
00104         ref_ids = [r.getId() for r in refs]
00105 
00106         baseline_ref_container = getattr( baseline, atconf.REFERENCE_ANNOTATION )
00107         clipboard = baseline_ref_container.manage_cutObjects( ref_ids )
00108 
00109         wc_ref_container = getattr( wc, atconf.REFERENCE_ANNOTATION )
00110 
00111         # references aren't globally addable w/ associated perm which default copysupport
00112         # wants to check, temporarily monkey around the issue.
00113         def _verifyObjectPaste( *args, **kw ): pass
00114         wc_ref_container._verifyObjectPaste = _verifyObjectPaste
00115         try:
00116             wc_ref_container.manage_pasteObjects( clipboard )
00117         finally:
00118             del wc_ref_container._verifyObjectPaste

Definition at line 119 of file relation.py.

00119 
00120     def checkout( self, *args ):
00121         pass
        

Member Data Documentation

Definition at line 122 of file relation.py.

Definition at line 97 of file relation.py.


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