Back to index

plone3  3.1.7
Public Member Functions
CMFEditions.interfaces.IStorage.IPurgeSupport Class Reference
Inheritance diagram for CMFEditions.interfaces.IStorage.IPurgeSupport:
Inheritance graph
[legend]
Collaboration diagram for CMFEditions.interfaces.IStorage.IPurgeSupport:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def purge
def retrieve
def getHistory
def getModificationDate

Detailed Description

Storage Purge Support

Purging a version from the storage removes that version irrevocably.

Adds ``purge`` and extends the signature of ``retrieve``, ``getHistory``
and ``getModificationDate``. The defaults of the extended methods
mimique the standard behaviour of the original methods.

With the introduction of purging two selection scheme exist for
retrieving versions. Either purged versions are taken into account
or not:

- By passing ``countPurged=True`` purged versions are taken into
  account when accessing a version. When a purged version is accessed
  the storage tool decides what to do.
- By passing ``countPurged=False`` purged versions are **not taken into
  account** when accessing a version.

Example:

An object got saved ten times. Two versions got purged in earlier
calls. The history looks like this (``s`` means: depends on storage,
``e`` means: exception raised)::

  countPurged==True:

    selector:          0, 1, 2, 3, 4, 5, 6, 7, 8, 9
    version retrieved: 0, 1, 2, s, s, 5, 6, 7, 8, 9

  countPurged==False:

    selector:          0, 1, 2, 3, 4, 5, 6, 7, 8, 9
    version retrieved: 0, 1, 2, 5, 6, 7, 8, 9, e, e

Definition at line 109 of file IStorage.py.


Member Function Documentation

def CMFEditions.interfaces.IStorage.IPurgeSupport.getHistory (   history_id,
  countPurged = True,
  substitute = True 
)
Return the history of an object by the given history id.

If ``countPurged`` is ``True`` purged versions are returned also.
If ``False`` purged versions aren't returned.

If ``substitute`` is ``True`` a substitute is returned in case
the requested version was purged before.

Return a ``IHistory`` object.

Definition at line 170 of file IStorage.py.

00170 
00171     def getHistory(history_id, countPurged=True, substitute=True):
00172         """Return the history of an object by the given history id.
00173 
00174         If ``countPurged`` is ``True`` purged versions are returned also.
00175         If ``False`` purged versions aren't returned.
00176 
00177         If ``substitute`` is ``True`` a substitute is returned in case
00178         the requested version was purged before.
00179 
00180         Return a ``IHistory`` object.
00181         """

Here is the caller graph for this function:

def CMFEditions.interfaces.IStorage.IPurgeSupport.getModificationDate (   history_id,
  selector = None,
  countPurged = True,
  substitute = True 
)
Returns the modification date of the selected version of object
    which has the given history id.

If ``countPurged`` is ``True`` purged versions are returned also.
If ``False`` purged versions aren't returned.

If ``substitute`` is ``True`` a substitute is returned in case
the requested version was purged before.

If selected is None, the most recent version (HEAD) is taken.

Definition at line 183 of file IStorage.py.

00183 
00184                             substitute=True):
00185         """ Returns the modification date of the selected version of object
00186             which has the given history id.
00187 
00188         If ``countPurged`` is ``True`` purged versions are returned also.
00189         If ``False`` purged versions aren't returned.
00190 
00191         If ``substitute`` is ``True`` a substitute is returned in case
00192         the requested version was purged before.
00193 
00194         If selected is None, the most recent version (HEAD) is taken.
00195         """
00196 

def CMFEditions.interfaces.IStorage.IPurgeSupport.purge (   history_id,
  selector,
  metadata = {},
  countPurged = True 
)
Storage Purge Support

Purging a version from the storage removes that version irrevocably.

Adds ``purge`` and extends the signature of ``retrieve``, ``getHistory``
and ``getModificationDate``. The defaults of the extended methods
mimique the standard behaviour of the original methods.

With the introduction of purging two selection scheme exist for
retrieving versions. Either purged versions are taken into account
or not:

- By passing ``countPurged=True`` purged versions are taken into
  account when accessing a version. When a purged version is accessed
  the storage tool decides what to do.
- By passing ``countPurged=False`` purged versions are **not taken into
  account** when accessing a version.

Example:

An object got saved ten times. Two versions got purged in earlier
calls. The history looks like this (``s`` means: depends on storage,
``e`` means: exception raised)::

  countPurged==True:

selector:          0, 1, 2, 3, 4, 5, 6, 7, 8, 9
version retrieved: 0, 1, 2, s, s, 5, 6, 7, 8, 9

  countPurged==False:

selector:          0, 1, 2, 3, 4, 5, 6, 7, 8, 9
version retrieved: 0, 1, 2, 5, 6, 7, 8, 9, e, e
Purge a Version from a Resources History

If ``countPurged`` is ``True`` version numbering counts purged
versions also. If ``False`` purged versiona are not taken into
account.

Purge the given version from the given history. The metadata
passed may be used to store informations about the reasons of
the purging.

Definition at line 145 of file IStorage.py.

00145 
00146     def purge(history_id, selector, metadata={}, countPurged=True):
00147         """Purge a Version from a Resources History
00148 
00149         If ``countPurged`` is ``True`` version numbering counts purged
00150         versions also. If ``False`` purged versiona are not taken into
00151         account.
00152 
00153         Purge the given version from the given history. The metadata
00154         passed may be used to store informations about the reasons of
00155         the purging.
00156         """

def CMFEditions.interfaces.IStorage.IPurgeSupport.retrieve (   history_id,
  selector,
  countPurged = True,
  substitute = True 
)
Return the Version of the Resource with the given History Id

If ``countPurged`` is ``True`` purged versions are taken into
account also. If ``False`` purged versions are ignored and not
taken into account in counting.

If ``substitute`` is ``True`` a substitute is returned in case
the requested version was purged before.

Return a ``IVersionData`` object.

Definition at line 157 of file IStorage.py.

00157 
00158     def retrieve(history_id, selector, countPurged=True, substitute=True):
00159         """Return the Version of the Resource with the given History Id
00160 
00161         If ``countPurged`` is ``True`` purged versions are taken into
00162         account also. If ``False`` purged versions are ignored and not
00163         taken into account in counting.
00164 
00165         If ``substitute`` is ``True`` a substitute is returned in case
00166         the requested version was purged before.
00167 
00168         Return a ``IVersionData`` object.
00169         """

Here is the caller graph for this function:


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