root/gaphor/tags/release-0.10.2/gaphor/interfaces.py

Revision 1201, 0.9 kB (checked in by arj..@yirdis.nl, 2 years ago)

Updated drawing of items.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 """
2 Top level interface definitions for Gaphor.
3 """
4
5 from zope import interface
6
7
8 class IService(interface.Interface):
9     """
10     Base interface for all services in Gaphor.
11     """
12
13     def init(self, application):
14         """
15         Initialize the service, this method is called after all services
16         are instantiated.
17         """
18
19
20 class IServiceEvent(interface.Interface):
21     """
22     An event emitted by a service.
23     """
24     service = interface.Attribute("The service that emits the event")
25
26
27 class ITransaction(interface.Interface):
28     """
29     The methods each transaction should adhere.
30     """
31
32     def commit(self):
33         """
34         Commit the transaction.
35         """
36
37     def rollback(self):
38         """
39         Roll back the transaction.
40         """
41
42
43 class ITransactionEvent(interface.Interface):
44     """
45     Events related to transaction workflow (begin/commit/rollback) implements
46     this interface.
47     """
48
49
50 # vim:sw=4:et
Note: See TracBrowser for help on using the browser.