Back to index

plone3  3.1.7
Classes | Functions | Variables
ZopeVersionControl.nonversioned Namespace Reference

Classes

class  StandardNonVersionedDataAdapter
class  ObjectManagerNonVersionedDataAdapter

Functions

def isProxyOrReference
def getNonVersionedDataAdapter
def listNonVersionedObjects
def getNonVersionedData
def removeNonVersionedData
def restoreNonVersionedData

Variables

 isProxyOrReference = None

Function Documentation

Definition at line 67 of file nonversioned.py.

Here is the call graph for this function:

Here is the caller graph for this function:

Returns an INonVersionedData adapter for any object.

This is a super-simplistic adapter implementation.

Definition at line 40 of file nonversioned.py.

00040 
00041 def getNonVersionedDataAdapter(obj):
00042     """Returns an INonVersionedData adapter for any object.
00043 
00044     This is a super-simplistic adapter implementation.
00045     """
00046     base = aq_base(obj)
00047     # If the object implements INonVersionedData, let it say
00048     # what its items are.
00049     if INonVersionedData.isImplementedBy(base):
00050         return obj
00051     # If the object is an ObjectManager, use the ObjectManager adapter.
00052     try:
00053         is_obj_mgr = isinstance(base, ObjectManager)
00054     except TypeError:
00055         # Python 2.1 isinstance() dislikes ExtensionClass instances.
00056         # This is an adequate workaround.
00057         pass
00058     else:
00059         if is_obj_mgr:
00060             return ObjectManagerNonVersionedDataAdapter(obj)
00061     # Otherwise use the standard adapter.
00062     return StandardNonVersionedDataAdapter(obj)
00063 

Here is the caller graph for this function:

Definition at line 32 of file nonversioned.py.

00032 
00033     def isProxyOrReference(obj):
00034         if proxyBase(obj) is not aq_base(obj):
00035             return 1
00036         if isinstance(obj, PathReference):
00037             return 1
00038         return 0
00039 

Definition at line 64 of file nonversioned.py.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 70 of file nonversioned.py.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 73 of file nonversioned.py.

00073 
00074 def restoreNonVersionedData(obj, dict):
00075     getNonVersionedDataAdapter(obj).restoreNonVersionedData(dict)
00076 
00077 

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 30 of file nonversioned.py.