Mercurial > libervia-pubsub
annotate idavoll/memory_backend.py @ 94:bbebadd71d35
Remove hardcoded nodes.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Wed, 17 Nov 2004 21:08:29 +0000 |
parents | 0e642e5b4fb2 |
children | e7349d94d0c3 |
rev | line source |
---|---|
27 | 1 from twisted.application import service |
2 from twisted.internet import defer | |
3 from twisted.protocols.jabber import jid | |
4 import backend | |
5 | |
6 class Subscription: | |
30
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
7 def __init__(self, state): |
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
8 self.state = state |
27 | 9 |
10 class NodeConfiguration: | |
30
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
11 def __init__(self): |
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
12 self.persist_items = False |
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
13 self.deliver_payloads = False |
27 | 14 |
15 class Node: | |
30
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
16 def __init__(self, id): |
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
17 self.id = id |
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
18 self.configuration = NodeConfiguration() |
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
19 self.subscriptions = {} |
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
20 self.affiliations = {} |
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
21 self.items = {} |
27 | 22 |
43
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
23 class Storage: |
30
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
24 def __init__(self): |
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
25 self.nodes = {} |
27 | 26 |
43
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
27 def get_node_configuration(self, node_id): |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
28 try: |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
29 node = self.nodes[node_id] |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
30 except KeyError: |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
31 raise backend.NodeNotFound |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
32 else: |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
33 c = self.nodes[node_id].configuration |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
34 return defer.succeed({'persist_items': c.persist_items, |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
35 'deliver_payloads': c.deliver_payloads}) |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
36 |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
37 def get_affiliation(self, node_id, entity): |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
38 try: |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
39 node = self.nodes[node_id] |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
40 except KeyError: |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
41 raise backend.NodeNotFound |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
42 else: |
59
0fa161c00ed9
Use jid.JIDs everywhere in the backend.
Ralph Meijer <ralphm@ik.nu>
parents:
54
diff
changeset
|
43 return defer.succeed(node.affiliations.get(entity.full(), None)) |
43
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
44 |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
45 def get_subscribers(self, node_id): |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
46 try: |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
47 node = self.nodes[node_id] |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
48 except KeyError: |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
49 raise backend.NodeNotFound |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
50 else: |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
51 subscriptions = self.nodes[node_id].subscriptions |
59
0fa161c00ed9
Use jid.JIDs everywhere in the backend.
Ralph Meijer <ralphm@ik.nu>
parents:
54
diff
changeset
|
52 subscribers = [jid.JID(s) for s in subscriptions |
43
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
53 if subscriptions[s].state == 'subscribed'] |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
54 return defer.succeed(subscribers) |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
55 |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
56 def store_items(self, node_id, items, publisher): |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
57 for item in items: |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
58 self.nodes[node_id].items[item["id"]] = (item, publisher) |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
59 return defer.succeed(None) |
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
40
diff
changeset
|
60 |
50
64f0986d8b35
Implement add_subscription() and remove_subscription() for Storage, remove
Ralph Meijer <ralphm@ik.nu>
parents:
46
diff
changeset
|
61 def add_subscription(self, node_id, subscriber, state): |
30
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
62 try: |
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
63 node = self.nodes[node_id] |
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
64 except KeyError: |
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
65 raise backend.NodeNotFound |
27 | 66 |
50
64f0986d8b35
Implement add_subscription() and remove_subscription() for Storage, remove
Ralph Meijer <ralphm@ik.nu>
parents:
46
diff
changeset
|
67 try: |
59
0fa161c00ed9
Use jid.JIDs everywhere in the backend.
Ralph Meijer <ralphm@ik.nu>
parents:
54
diff
changeset
|
68 subscription = node.subscriptions[subscriber.full()] |
50
64f0986d8b35
Implement add_subscription() and remove_subscription() for Storage, remove
Ralph Meijer <ralphm@ik.nu>
parents:
46
diff
changeset
|
69 except: |
64f0986d8b35
Implement add_subscription() and remove_subscription() for Storage, remove
Ralph Meijer <ralphm@ik.nu>
parents:
46
diff
changeset
|
70 subscription = Subscription(state) |
59
0fa161c00ed9
Use jid.JIDs everywhere in the backend.
Ralph Meijer <ralphm@ik.nu>
parents:
54
diff
changeset
|
71 node.subscriptions[subscriber.full()] = subscription |
27 | 72 |
50
64f0986d8b35
Implement add_subscription() and remove_subscription() for Storage, remove
Ralph Meijer <ralphm@ik.nu>
parents:
46
diff
changeset
|
73 return defer.succeed({'node': node_id, |
64f0986d8b35
Implement add_subscription() and remove_subscription() for Storage, remove
Ralph Meijer <ralphm@ik.nu>
parents:
46
diff
changeset
|
74 'jid': subscriber, |
64f0986d8b35
Implement add_subscription() and remove_subscription() for Storage, remove
Ralph Meijer <ralphm@ik.nu>
parents:
46
diff
changeset
|
75 'subscription': subscription.state}) |
27 | 76 |
50
64f0986d8b35
Implement add_subscription() and remove_subscription() for Storage, remove
Ralph Meijer <ralphm@ik.nu>
parents:
46
diff
changeset
|
77 def remove_subscription(self, node_id, subscriber): |
37
9aa20efac203
Fix get_notification_list() to only return JIDs for subscriptions in the
Ralph Meijer <ralphm@ik.nu>
parents:
30
diff
changeset
|
78 try: |
9aa20efac203
Fix get_notification_list() to only return JIDs for subscriptions in the
Ralph Meijer <ralphm@ik.nu>
parents:
30
diff
changeset
|
79 node = self.nodes[node_id] |
9aa20efac203
Fix get_notification_list() to only return JIDs for subscriptions in the
Ralph Meijer <ralphm@ik.nu>
parents:
30
diff
changeset
|
80 except KeyError: |
9aa20efac203
Fix get_notification_list() to only return JIDs for subscriptions in the
Ralph Meijer <ralphm@ik.nu>
parents:
30
diff
changeset
|
81 raise backend.NodeNotFound |
9aa20efac203
Fix get_notification_list() to only return JIDs for subscriptions in the
Ralph Meijer <ralphm@ik.nu>
parents:
30
diff
changeset
|
82 |
9aa20efac203
Fix get_notification_list() to only return JIDs for subscriptions in the
Ralph Meijer <ralphm@ik.nu>
parents:
30
diff
changeset
|
83 try: |
59
0fa161c00ed9
Use jid.JIDs everywhere in the backend.
Ralph Meijer <ralphm@ik.nu>
parents:
54
diff
changeset
|
84 del node.subscriptions[subscriber.full()] |
37
9aa20efac203
Fix get_notification_list() to only return JIDs for subscriptions in the
Ralph Meijer <ralphm@ik.nu>
parents:
30
diff
changeset
|
85 except KeyError: |
9aa20efac203
Fix get_notification_list() to only return JIDs for subscriptions in the
Ralph Meijer <ralphm@ik.nu>
parents:
30
diff
changeset
|
86 raise backend.NotSubscribed |
9aa20efac203
Fix get_notification_list() to only return JIDs for subscriptions in the
Ralph Meijer <ralphm@ik.nu>
parents:
30
diff
changeset
|
87 |
9aa20efac203
Fix get_notification_list() to only return JIDs for subscriptions in the
Ralph Meijer <ralphm@ik.nu>
parents:
30
diff
changeset
|
88 return defer.succeed(None) |
9aa20efac203
Fix get_notification_list() to only return JIDs for subscriptions in the
Ralph Meijer <ralphm@ik.nu>
parents:
30
diff
changeset
|
89 |
54
62fdb37234e5
Make NodeCreationService a subclass of backend.NodeCreationService.
Ralph Meijer <ralphm@ik.nu>
parents:
50
diff
changeset
|
90 def create_node(self, node_id, owner): |
62fdb37234e5
Make NodeCreationService a subclass of backend.NodeCreationService.
Ralph Meijer <ralphm@ik.nu>
parents:
50
diff
changeset
|
91 if node_id in self.nodes: |
62fdb37234e5
Make NodeCreationService a subclass of backend.NodeCreationService.
Ralph Meijer <ralphm@ik.nu>
parents:
50
diff
changeset
|
92 raise backend.NodeExists |
62fdb37234e5
Make NodeCreationService a subclass of backend.NodeCreationService.
Ralph Meijer <ralphm@ik.nu>
parents:
50
diff
changeset
|
93 |
62fdb37234e5
Make NodeCreationService a subclass of backend.NodeCreationService.
Ralph Meijer <ralphm@ik.nu>
parents:
50
diff
changeset
|
94 node = Node(node_id) |
59
0fa161c00ed9
Use jid.JIDs everywhere in the backend.
Ralph Meijer <ralphm@ik.nu>
parents:
54
diff
changeset
|
95 node.affiliations[owner.full()] = 'owner' |
54
62fdb37234e5
Make NodeCreationService a subclass of backend.NodeCreationService.
Ralph Meijer <ralphm@ik.nu>
parents:
50
diff
changeset
|
96 self.nodes[node_id] = node |
62fdb37234e5
Make NodeCreationService a subclass of backend.NodeCreationService.
Ralph Meijer <ralphm@ik.nu>
parents:
50
diff
changeset
|
97 |
62fdb37234e5
Make NodeCreationService a subclass of backend.NodeCreationService.
Ralph Meijer <ralphm@ik.nu>
parents:
50
diff
changeset
|
98 return defer.succeed(None) |
62fdb37234e5
Make NodeCreationService a subclass of backend.NodeCreationService.
Ralph Meijer <ralphm@ik.nu>
parents:
50
diff
changeset
|
99 |
74
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
100 def get_affiliations(self, entity): |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
101 affiliations = [] |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
102 for node in self.nodes.itervalues(): |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
103 if entity.full() in node.affiliations: |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
104 affiliations.append((node.id, |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
105 node.affiliations[entity.full()])) |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
106 |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
107 return defer.succeed(affiliations) |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
108 |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
109 def get_subscriptions(self, entity): |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
110 subscriptions = [] |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
111 for node in self.nodes.itervalues(): |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
112 for subscriber, subscription in node.subscriptions.iteritems(): |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
113 subscriber_jid = jid.JID(subscriber) |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
114 if subscriber_jid.userhostJID() == entity: |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
115 subscriptions.append((node.id, subscriber_jid, |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
116 subscription.state)) |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
117 return defer.succeed(subscriptions) |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
118 |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
119 def get_node_type(self, node_id): |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
120 if node_id not in self.nodes: |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
121 raise backend.NodeNotFound |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
122 |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
123 return defer.succeed('leaf') |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
124 |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
125 def get_nodes(self): |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
126 return defer.succeed(self.nodes.keys()) |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
127 |
50
64f0986d8b35
Implement add_subscription() and remove_subscription() for Storage, remove
Ralph Meijer <ralphm@ik.nu>
parents:
46
diff
changeset
|
128 class BackendService(backend.BackendService): |
64f0986d8b35
Implement add_subscription() and remove_subscription() for Storage, remove
Ralph Meijer <ralphm@ik.nu>
parents:
46
diff
changeset
|
129 pass |
64f0986d8b35
Implement add_subscription() and remove_subscription() for Storage, remove
Ralph Meijer <ralphm@ik.nu>
parents:
46
diff
changeset
|
130 |
54
62fdb37234e5
Make NodeCreationService a subclass of backend.NodeCreationService.
Ralph Meijer <ralphm@ik.nu>
parents:
50
diff
changeset
|
131 class NodeCreationService(backend.NodeCreationService): |
62fdb37234e5
Make NodeCreationService a subclass of backend.NodeCreationService.
Ralph Meijer <ralphm@ik.nu>
parents:
50
diff
changeset
|
132 pass |
30
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
133 |
46
979e53b54267
Redefined several classes as subclasses of the implementations in backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
43
diff
changeset
|
134 class PublishService(backend.PublishService): |
979e53b54267
Redefined several classes as subclasses of the implementations in backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
43
diff
changeset
|
135 pass |
27 | 136 |
30
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
137 class NotificationService(backend.NotificationService): |
46
979e53b54267
Redefined several classes as subclasses of the implementations in backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
43
diff
changeset
|
138 pass |
30
ff7c73b253bf
Recode backend to match interaces: one big Service that handles everything
Ralph Meijer <ralphm@ik.nu>
parents:
27
diff
changeset
|
139 |
50
64f0986d8b35
Implement add_subscription() and remove_subscription() for Storage, remove
Ralph Meijer <ralphm@ik.nu>
parents:
46
diff
changeset
|
140 class SubscriptionService(backend.SubscriptionService): |
64f0986d8b35
Implement add_subscription() and remove_subscription() for Storage, remove
Ralph Meijer <ralphm@ik.nu>
parents:
46
diff
changeset
|
141 pass |
74
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
142 |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
143 class AffiliationsService(backend.AffiliationsService): |
0e642e5b4fb2
Add get_affiliations(), get_subscriptions(), get_node_type() and get_nodes()
Ralph Meijer <ralphm@ik.nu>
parents:
59
diff
changeset
|
144 pass |