+require 'common/plugin.rb'
+
+# Plugins for moving (renaming) users. Moving domains is not supported.
+#
module MvPlugin
+
+ # Absorb the subclass run() magic from the Plugin::Run module.
+ extend Plugin::Run
+
+ # The runner class associated with move plugins.
#
- # Plugins for moving (renaming) accounts.
+ # @return [Class] the {MvRunner} class.
#
-
- def MvPlugin.included(c)
- # Callback, called whenever another class or module includes this
- # one. The parameter given is the name of the class or module
- # that included us.
- @includers ||= []
- @includers << c
+ def self.runner()
+ return MvRunner
end
- def MvPlugin.includers
- return @includers
- end
- def mv_domain(from, to)
- # Rename the given domain.
- raise NotImplementedError
+ # The "dummy" runner class associated with move plugins.
+ #
+ # @return [Class] the {MvDummyRunner} class.
+ #
+ def self.dummy_runner()
+ return MvDummyRunner
end
- def mv_account(from, to)
- # Rename the given account.
+
+ # The interface for the "move a user" operation. Subclasses need to
+ # implement this method so that it moves (renames) the user *src* to
+ # the user *dst*.
+ #
+ # @param src [User] the source user to be moved.
+ #
+ # @param dst [User] the destination user to which we'll move *src*.
+ #
+ def mv_user(src, dst)
raise NotImplementedError
end