Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Private Attributes
CMFEditions.ArchivistTool.VersionAwareReference Class Reference
Inheritance diagram for CMFEditions.ArchivistTool.VersionAwareReference:
Inheritance graph
[legend]
Collaboration diagram for CMFEditions.ArchivistTool.VersionAwareReference:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def setReference

Public Attributes

 history_id
 version_id
 location_id
 info

Static Private Attributes

tuple __implements__ = (IVersionAwareReference, )

Detailed Description

A Reference that is version aware (and in future also location aware).

Definition at line 111 of file ArchivistTool.py.


Constructor & Destructor Documentation

Definition at line 116 of file ArchivistTool.py.

00116 
00117     def __init__(self, **info):
00118         self.history_id = None
00119         self.version_id = None
00120         self.location_id = None
00121         self.info = info
        

Member Function Documentation

def CMFEditions.ArchivistTool.VersionAwareReference.setReference (   self,
  target_obj,
  remove_info = True 
)
See IVersionAwareReference

Definition at line 122 of file ArchivistTool.py.

00122 
00123     def setReference(self, target_obj, remove_info=True):
00124         """See IVersionAwareReference
00125         """
00126         storage = getToolByName(target_obj, 'portal_historiesstorage')
00127         
00128         # save as much information as possible
00129         # it may be that the target object is not yet registered with the 
00130         # storage (aka not under version control)
00131         target_obj, self.history_id = dereference(target_obj)
00132         if storage.isRegistered(self.history_id):
00133             self.version_id = target_obj.version_id
00134             # XXX the location id has to be gotten from the object directly
00135             self.location_id = 0 # XXX only one location possible currently
00136             # XXX store the information if the referenced working copy
00137             # was unchanged since the last checkin. In this case the 
00138             # the exact state of the referenced object may be retrieved also.
00139             # XXX we really need a isUpToDate/isChanged methods!
00140             
00141         if remove_info and hasattr(self, 'info'):
00142             del self.info
00143 

Here is the call graph for this function:


Member Data Documentation

tuple CMFEditions.ArchivistTool.VersionAwareReference.__implements__ = (IVersionAwareReference, ) [static, private]

Definition at line 114 of file ArchivistTool.py.

Definition at line 117 of file ArchivistTool.py.

Definition at line 120 of file ArchivistTool.py.

Definition at line 119 of file ArchivistTool.py.

Definition at line 118 of file ArchivistTool.py.


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