Back to index

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

List of all members.

Public Member Functions

def computeDiff
def testChanges
def applyChanges
def getDiffs
def getSubDiffs
def getAddedItems
def getRemovedItems

Static Public Attributes

tuple same = Attribute('same', 'True if the fields are the "same"')

Detailed Description

And interface representing all of the differences between two objects

Definition at line 9 of file IChangeSet.py.


Member Function Documentation

Apply the computed changes to the specified object

Definition at line 29 of file IChangeSet.py.

00029 
00030     def applyChanges(ob):
00031         """Apply the computed changes to the specified object"""
        
def CMFDiffTool.interfaces.IChangeSet.IChangeSet.computeDiff (   ob1,
  ob2,
  recursive = 1,
  exclude = [] 
)
Compute the differences from ob1 to ob2 (ie. ob2 - ob1).

If resursive is 1, compute differences between subobjects of
ob1 and ob2 as well, excluding any subobjects whose IDs are
listed in exclude

The results can be accessed through getDiffs()

Definition at line 14 of file IChangeSet.py.

00014 
00015     def computeDiff(ob1, ob2, recursive=1, exclude=[]):
00016         """Compute the differences from ob1 to ob2 (ie. ob2 - ob1).
00017 
00018         If resursive is 1, compute differences between subobjects of
00019         ob1 and ob2 as well, excluding any subobjects whose IDs are
00020         listed in exclude
00021 
00022         The results can be accessed through getDiffs()"""

If the ChangeSet was computed recursively, returns the list
of IDs of items that were added.

A copy of these items is available as a cubject of the ChangeSet

Definition at line 45 of file IChangeSet.py.

00045 
00046     def getAddedItems():
00047         """If the ChangeSet was computed recursively, returns the list
00048         of IDs of items that were added.
00049 
00050         A copy of these items is available as a cubject of the ChangeSet
00051         """

Returns the list of differences between the two objects.

Each difference is a single object implementing the IDifference interface

Definition at line 32 of file IChangeSet.py.

00032 
00033     def getDiffs():
00034         """Returns the list of differences between the two objects.
00035 
00036         Each difference is a single object implementing the IDifference interface"""

If the ChangeSet was computed recursively, returns the list
of IDs of items that were removed

Definition at line 52 of file IChangeSet.py.

00052 
00053     def getRemovedItems():
00054         """If the ChangeSet was computed recursively, returns the list
00055         of IDs of items that were removed"""
00056     
If the ChangeSet was computed recursively, returns a list
   of ChangeSet objects representing subobject differences

   Each ChangeSet will have the same ID as the objects whose
   difference it represents.

Definition at line 37 of file IChangeSet.py.

00037 
00038     def getSubDiffs():
00039         """If the ChangeSet was computed recursively, returns a list
00040            of ChangeSet objects representing subobject differences
00041 
00042            Each ChangeSet will have the same ID as the objects whose
00043            difference it represents.
00044            """

Test the specified object to determine if the change set will apply cleanly.

Returns None if there would be no erros

Definition at line 23 of file IChangeSet.py.

00023 
00024     def testChanges(ob):
00025         """Test the specified object to determine if the change set will apply cleanly.
00026 
00027         Returns None if there would be no erros
00028         """


Member Data Documentation

tuple CMFDiffTool.interfaces.IChangeSet.IChangeSet.same = Attribute('same', 'True if the fields are the "same"') [static]

Definition at line 12 of file IChangeSet.py.


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