32 ENTITIES_HOOKS = ('before_add_entity', 'after_add_entity', |
32 ENTITIES_HOOKS = ('before_add_entity', 'after_add_entity', |
33 'before_update_entity', 'after_update_entity', |
33 'before_update_entity', 'after_update_entity', |
34 'before_delete_entity', 'after_delete_entity') |
34 'before_delete_entity', 'after_delete_entity') |
35 RELATIONS_HOOKS = ('before_add_relation', 'after_add_relation' , |
35 RELATIONS_HOOKS = ('before_add_relation', 'after_add_relation' , |
36 'before_delete_relation','after_delete_relation') |
36 'before_delete_relation','after_delete_relation') |
37 SYSTEM_HOOKS = ('server_startup', 'server_shutdown', |
37 SYSTEM_HOOKS = ('server_backup', 'server_restore', |
|
38 'server_startup', 'server_shutdown', |
38 'session_open', 'session_close') |
39 'session_open', 'session_close') |
39 |
40 |
40 ALL_HOOKS = frozenset(ENTITIES_HOOKS + RELATIONS_HOOKS + SYSTEM_HOOKS) |
41 ALL_HOOKS = frozenset(ENTITIES_HOOKS + RELATIONS_HOOKS + SYSTEM_HOOKS) |
41 |
42 |
42 class HooksManager(object): |
43 class HooksManager(object): |