Commit bd01de54 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

initial implementation of several methods.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30821 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 58116e43
......@@ -39,3 +39,56 @@ class MovementCollectionDiff(object):
"""
# Declarative interfaces
zope.interface.implements(interfaces.IMovementCollectionDiff,)
def __init__(self):
self._deletable_movement_list = []
self._new_movement_list = []
self._updatable_movement_list = []
def getDeletableMovementList(self):
"""
Returns the list of movements which need
to be deleted.
"""
return self._deletable_movement_list
def addDeletableMovement(self, movement):
"""
Add a deletable movement to the diff definition
"""
self._deletable_movement_list.append(movement)
def getNewMovementList(self):
"""
Returns a list temp movements which represent new
movements to add to an existing IMovementCollection.
"""
return self._new_movement_list
def addNewMovement(self, movement):
"""
Add a new movement to the diff definition
"""
self._new_movement_list.append(movement)
def getUpdatableMovementList(self):
"""
Returns the list of movements which need
to be updated.
"""
return self._updatable_movement_list
def getMovementPropertyDict(self, movement):
"""
Returns a dict of all properties and values
to update an existing movement or to
create a new movement.
"""
def addUpdatableMovement(self, movement, property_dict):
"""
Add an updatable movement to the diff definition
property_dict -- properties to update
"""
self._updatable_movement_list.append(movement)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment