Back to index

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

List of all members.

Public Member Functions

def __init__
def getId
def saveState
def copyState
def stateCopy

Public Attributes

 id
 date_created

Static Public Attributes

string branch = 'mainline'
 prev = None
tuple next = ()
tuple security = ClassSecurityInfo()

Private Attributes

 _data

Detailed Description

A Version is a resource that contains a copy of a particular state
   (content and dead properties) of a version-controlled resource.  A
   version is created by checking in a checked-out resource. The state
   of a version of a version-controlled resource never changes.

Definition at line 66 of file Version.py.


Constructor & Destructor Documentation

def ZopeVersionControl.Version.Version.__init__ (   self,
  version_id,
  obj 
)

Definition at line 72 of file Version.py.

00072 
00073     def __init__(self, version_id, obj):
00074         self.id = version_id
00075         self.date_created = time.time()
00076         self._data = None


Member Function Documentation

Return an independent deep copy of the state of the version.

Definition at line 99 of file Version.py.

00099 
00100     def copyState(self):
00101         """Return an independent deep copy of the state of the version."""
00102         data = self.__dict__.get('_data')  # Avoid __of__ hooks
00103         return self.stateCopy(data, self)

Here is the call graph for this function:

Definition at line 89 of file Version.py.

00089 
00090     def getId(self):
00091         return self.id

Save the state of object as the state for this version of
   a version-controlled resource.

Definition at line 93 of file Version.py.

00093 
00094     def saveState(self, obj):
00095         """Save the state of object as the state for this version of
00096            a version-controlled resource."""
00097         self._data = self.stateCopy(obj, self)

Here is the call graph for this function:

def ZopeVersionControl.Version.Version.stateCopy (   self,
  obj,
  container 
)
Get a deep copy of the state of an object.

Breaks any database identity references.

Definition at line 105 of file Version.py.

00105 
00106     def stateCopy(self, obj, container):
00107         """Get a deep copy of the state of an object.
00108 
00109         Breaks any database identity references.
00110         """
00111         ignore = listNonVersionedObjects(obj)
00112         res = cloneByPickle(aq_base(obj), ignore)
00113         removeNonVersionedData(res)
00114         return res
00115 
00116 
00117 InitializeClass(Version)

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 75 of file Version.py.

string ZopeVersionControl.Version.Version.branch = 'mainline' [static]

Definition at line 82 of file Version.py.

Definition at line 74 of file Version.py.

Definition at line 73 of file Version.py.

Definition at line 84 of file Version.py.

Definition at line 83 of file Version.py.

tuple ZopeVersionControl.Version.Version.security = ClassSecurityInfo() [static]

Reimplemented in ZopeVersionControl.ZopeVersion.ZopeVersion.

Definition at line 86 of file Version.py.


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