Document API: define node_class.create_child() and collection

Allow clients to call those fn()s for the wrong nodes, just to get an
NotImplementedError.

bzr revid: p_christ@hol.gr-20100712192808-d0x2qud1p5q26fb8
This commit is contained in:
P. Christeas
2010-07-12 22:28:08 +03:00
parent 831a292458
commit 385aaa2467
+11 -1
View File
@@ -306,7 +306,17 @@ class node_class(object):
Move operations, as instructed from APIs (eg. request from DAV) could
use this function.
"""
raise NotImplementedError
raise NotImplementedError()
def create_child(self, cr, path, data=None):
""" Create a regular file under this node
"""
raise NotImplementedError()
def create_child_collection(self, cr, objname):
""" Create a child collection (directory) under self
"""
raise NotImplementedError()
def rm(self, cr):
raise RuntimeError("Not Implemented")