Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Private Attributes
CMFEditions.ArchivistTool.PreparedObject Class Reference

List of all members.

Public Member Functions

def __init__
def copyVersionIdFromClone

Public Attributes

 history_id
 original
 clone
 referenced_data
 metadata
 is_registered

Static Private Attributes

tuple __implements__ = (IPreparedObject, )

Detailed Description

Definition at line 375 of file ArchivistTool.py.


Constructor & Destructor Documentation

def CMFEditions.ArchivistTool.PreparedObject.__init__ (   self,
  history_id,
  original,
  clone,
  referenced_data,
  app_metadata,
  sys_metadata,
  is_registered,
  approxSize 
)

Definition at line 381 of file ArchivistTool.py.

00381 
00382                  app_metadata, sys_metadata, is_registered, approxSize):
00383         
00384         # parent reference (register the parent with the unique id handler)
00385         # register with sys_metadata as there is no other possibility
00386         obj = original.object
00387         parent = aq_parent(aq_inner(obj))
00388         portal_uidhandler = getToolByName(obj, 'portal_historyidhandler')
00389         
00390         # set defaults if missing
00391         sys_metadata['comment'] = sys_metadata.get('comment', '')
00392         sys_metadata['timestamp'] = sys_metadata.get('timestamp', 
00393                                                      int(time.time()))
00394         sys_metadata['originator'] = sys_metadata.get('originator', None)
00395         sys_metadata['principal'] = getUserId()
00396         sys_metadata['approxSize'] = approxSize
00397         sys_metadata['parent'] = {
00398             'history_id': portal_uidhandler.register(parent),
00399             'version_id': getattr(parent, "version_id", None),
00400             'location_id': getattr(parent, "location_id", None),
00401         }
00402         
00403         # bundle application and system metadata in different namespaces
00404         metadata = {
00405             'sys_metadata': sys_metadata,
00406             'app_metadata': app_metadata,
00407         }
00408         
00409         self.history_id = history_id
00410         self.original = original
00411         self.clone = clone
00412         self.referenced_data = referenced_data
00413         self.metadata = metadata
00414         self.is_registered = is_registered

Here is the call graph for this function:


Member Function Documentation

Definition at line 415 of file ArchivistTool.py.

00415 
00416     def copyVersionIdFromClone(self):
00417         self.original.object.version_id = self.clone.object.version_id
00418 


Member Data Documentation

tuple CMFEditions.ArchivistTool.PreparedObject.__implements__ = (IPreparedObject, ) [static, private]

Definition at line 378 of file ArchivistTool.py.

Definition at line 410 of file ArchivistTool.py.

Definition at line 408 of file ArchivistTool.py.

Definition at line 413 of file ArchivistTool.py.

Definition at line 412 of file ArchivistTool.py.

Definition at line 409 of file ArchivistTool.py.

Definition at line 411 of file ArchivistTool.py.


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