summaryrefslogtreecommitdiff
path: root/addons/document/nodes.py
diff options
context:
space:
mode:
authorP. Christeas <p_christ@hol.gr>2010-07-12 22:28:08 +0300
committerP. Christeas <p_christ@hol.gr>2010-07-12 22:28:08 +0300
commit385aaa2467e8b3f355adba2c5d192a45e33b78ba (patch)
treea360dbebe11044515a8f16eb68c6eadcc6102843 /addons/document/nodes.py
parent831a292458eb0aedfaa67715bc4401af3737fd63 (diff)
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
Diffstat (limited to 'addons/document/nodes.py')
-rw-r--r--addons/document/nodes.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/addons/document/nodes.py b/addons/document/nodes.py
index d710db37c15..d40886846aa 100644
--- a/addons/document/nodes.py
+++ b/addons/document/nodes.py
@@ -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")