Back to index

plone3  3.1.7
Classes | Public Member Functions | Static Public Attributes
CMFDiffTool.interfaces.IChangeSet Class Reference

def getCharDiffs(): """Return a list of character differences on a line-by-line basis. More...

Inheritance diagram for CMFDiffTool.interfaces.IChangeSet:
Inheritance graph
[legend]
Collaboration diagram for CMFDiffTool.interfaces.IChangeSet:
Collaboration graph
[legend]

List of all members.

Classes

class  IChangeSet

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

def getCharDiffs(): """Return a list of character differences on a line-by-line basis.

For every line in the field being compared, return a list of character differences """

And interface representing all of the differences between two objects

Definition at line 82 of file __init__.py.


Member Function Documentation

Apply the computed changes to the specified object

Definition at line 102 of file __init__.py.

00102 
00103     def applyChanges(ob):
00104         """Apply the computed changes to the specified object"""
        
def CMFDiffTool.interfaces.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 87 of file __init__.py.

00087 
00088     def computeDiff(ob1, ob2, recursive=1, exclude=[]):
00089         """Compute the differences from ob1 to ob2 (ie. ob2 - ob1).
00090 
00091         If resursive is 1, compute differences between subobjects of
00092         ob1 and ob2 as well, excluding any subobjects whose IDs are
00093         listed in exclude
00094 
00095         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 118 of file __init__.py.

00118 
00119     def getAddedItems():
00120         """If the ChangeSet was computed recursively, returns the list
00121         of IDs of items that were added.
00122 
00123         A copy of these items is available as a cubject of the ChangeSet
00124         """

Returns the list of differences between the two objects.

Each difference is a single object implementing the IDifference interface

Definition at line 105 of file __init__.py.

00105 
00106     def getDiffs():
00107         """Returns the list of differences between the two objects.
00108 
00109         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 125 of file __init__.py.

00125 
00126     def getRemovedItems():
00127         """If the ChangeSet was computed recursively, returns the list
00128         of IDs of items that were removed"""

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 110 of file __init__.py.

00110 
00111     def getSubDiffs():
00112         """If the ChangeSet was computed recursively, returns a list
00113            of ChangeSet objects representing subobject differences
00114 
00115            Each ChangeSet will have the same ID as the objects whose
00116            difference it represents.
00117            """

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

Returns None if there would be no erros

Definition at line 96 of file __init__.py.

00096 
00097     def testChanges(ob):
00098         """Test the specified object to determine if the change set will apply cleanly.
00099 
00100         Returns None if there would be no erros
00101         """


Member Data Documentation

tuple CMFDiffTool.interfaces.IChangeSet.same = Attribute('same', 'True if the fields are the "same"') [static]
And interface representing all of the differences between two objects

Definition at line 85 of file __init__.py.


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