X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Fmv%2Fmv_plugin.rb;h=5a3192356e7b033dbe35cd3c695c45c2fd378e7b;hp=76fad8395cf6454666d3caf1b3ed3e7401dce0cb;hb=HEAD;hpb=616d9c0f3260f4d8e9bf26140fa6032c3eabca8b diff --git a/lib/mv/mv_plugin.rb b/lib/mv/mv_plugin.rb index 76fad83..5a31923 100644 --- a/lib/mv/mv_plugin.rb +++ b/lib/mv/mv_plugin.rb @@ -1,15 +1,39 @@ +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 self.runner() + return MvRunner + 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