Move the Runner selection into the plugin.
[mailshears.git] / lib / prune / prune_plugin.rb
1 require 'rm/rm_plugin'
2
3 module PrunePlugin
4 include RmPlugin
5
6 #
7 # Plugins for the removal of leftover non-PostfixAdmin users,
8 # i.e. after an user has been removed from the PostfixAdmin
9 # database.
10 #
11
12 def PrunePlugin.included(c)
13 # Callback, called whenever another class or module includes this
14 # one. The parameter given is the name of the class or module
15 # that included us.
16 @includers ||= []
17 @includers << c
18 end
19
20 def PrunePlugin.includers
21 return @includers
22 end
23
24 def runner()
25 return PruneRunner
26 end
27
28 def dummy_runner
29 return PruneDummyRunner
30 end
31
32 def get_leftover_domains(db_domains)
33 # Given a list of domains, determine which domains belonging to
34 # this plugin are not contained in the given list.
35 raise NotImplementedError
36 end
37
38 def get_leftover_users(db_users)
39 # Given a list of users, determine which users belonging to
40 # this plugin are not contained in the given list.
41 raise NotImplementedError
42 end
43 end