Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
CMFEditions.interfaces.IArchivist.IVersionAwareReference Class Reference
Inheritance diagram for CMFEditions.interfaces.IArchivist.IVersionAwareReference:
Inheritance graph
[legend]
Collaboration diagram for CMFEditions.interfaces.IArchivist.IVersionAwareReference:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def setReference

Static Public Attributes

tuple history_id
tuple version_id
tuple location_id
tuple info

Detailed Description

A version aware reference references an object in the repository.

It is used to replace python references on save time and may be used 
to rebuild those at retrieve time.

Definition at line 419 of file IArchivist.py.


Constructor & Destructor Documentation

A version aware reference references an object in the repository.

It is used to replace python references on save time and may be used 
to rebuild those at retrieve time.
Store some info with the reference.

referencing scenarios:

 hid  | vid  | lid  | remarks
------+------+------+---------------------------------------------
 None | d.c. | d.c. | no reference stored (reference lost on save)
 True | None | None | reference to a non versionable resource or
      |      |      | or version and location information was not
      |      |      | known or was irrelevant at save time
 True | None | True | reference to a specific location of a 
      |      |      | resource (one of more working copies)
 True | True | None | impossible combination
 True | True | True | reference to s specific version of a 
      |      |      | resource at a specific location

abrev.: hid = history_id, vid = version_id, lid = location_id
"True" means "True value" in the above table.

Caution: The 'info' passed gets pickled. So take care not to 
 store deeply nested objects!!!

Definition at line 426 of file IArchivist.py.

00426 
00427     def __init__(**info):
00428         """Store some info with the reference.
00429         
00430         referencing scenarios:
00431         
00432          hid  | vid  | lid  | remarks
00433         ------+------+------+---------------------------------------------
00434          None | d.c. | d.c. | no reference stored (reference lost on save)
00435          True | None | None | reference to a non versionable resource or
00436               |      |      | or version and location information was not
00437               |      |      | known or was irrelevant at save time
00438          True | None | True | reference to a specific location of a 
00439               |      |      | resource (one of more working copies)
00440          True | True | None | impossible combination
00441          True | True | True | reference to s specific version of a 
00442               |      |      | resource at a specific location
00443         
00444         abrev.: hid = history_id, vid = version_id, lid = location_id
00445                 "True" means "True value" in the above table.
00446         
00447         Caution: The 'info' passed gets pickled. So take care not to 
00448                  store deeply nested objects!!!
00449         """


Member Function Documentation

def CMFEditions.interfaces.IArchivist.IVersionAwareReference.setReference (   target_obj,
  remove_info = True 
)
Set a reference to the given target object.

Definition at line 450 of file IArchivist.py.

00450 
00451     def setReference(target_obj, remove_info=True):
00452         """Set a reference to the given target object.
00453         """
    

Member Data Documentation

Initial value:
Attribute(
        """The history id of the referenced resource.Histories usually contain more than one version of a resource.May be None. In this case the reference isn't set yet or thetarget object isn't referenceable.""")

Definition at line 454 of file IArchivist.py.

Initial value:
Attribute(
        """The info stored alongside on instantiation time.May not exist.""")

Definition at line 475 of file IArchivist.py.

Initial value:
Attribute(
        """The location id of the working copy of the referenced resource.May be None. For the interpretation see above.""")

Definition at line 469 of file IArchivist.py.

Initial value:
Attribute(
        """The version id of the referenced resource.May be None. For the interpretation see above.""")

Definition at line 463 of file IArchivist.py.


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