comparison idavoll/storage.py @ 107:d252d793f0ed

Initial revision.
author Ralph Meijer <ralphm@ik.nu>
date Fri, 08 Apr 2005 10:15:02 +0000
parents
children 30c580286d27
comparison
equal deleted inserted replaced
106:dc36882d2620 107:d252d793f0ed
1 from zope.interface import Interface
2
3 class Error(Exception):
4 msg = None
5
6 class NodeNotFound(Error):
7 pass
8
9
10 class NodeExists(Error):
11 pass
12
13
14 class IStorage(Interface):
15 """ """
16
17 def get_node(self, node_id):
18 """ """
19
20 def get_node_ids(self):
21 """ """
22
23 def create_node(self, node_id, owner, config = None, type='leaf'):
24 """ """
25
26 def delete_node(self, node_id):
27 """ """
28
29 def get_affiliations(self, entity):
30 """ """
31
32 def get_subscriptions(self, entity):
33 """ """
34
35
36 class INode(Interface):
37 """ """
38 def get_type(self):
39 """ """
40
41 def get_configuration(self):
42 """ """
43
44 def get_meta_data(self):
45 """ """
46
47 def set_configuration(self, options):
48 """ """
49
50 def get_affiliation(self, entity):
51 """ """
52
53 def add_subscription(self, subscriber, state):
54 """ """
55
56 def remove_subscription(self, subscriber):
57 """ """
58
59 def get_subscribers(self):
60 """ """
61
62 def is_subscribed(self, subscriber):
63 """ """
64
65
66 class ILeafNode(Interface):
67 """ """
68 def store_items(self, items, publisher):
69 """ """
70
71 def remove_items(self, item_ids):
72 """ """
73
74 def get_items(self, max_items=None):
75 """ """
76
77 def get_items_by_id(self, item_ids):
78 """ """
79
80 def purge(self):
81 """ """
82
83
84 class ISubscription(Interface):
85 """ """