Document EmailArguments
While adding the javadoc I was wondering why this class is not a singleton. Adding a todo to check this later. Change-Id: Ie7639e2d4fff62972873e4c6457e7d00f3606d84 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -50,6 +50,19 @@ import java.util.List;
|
||||
import org.eclipse.jgit.lib.Config;
|
||||
import org.eclipse.jgit.lib.PersonIdent;
|
||||
|
||||
/**
|
||||
* Arguments used for sending notification emails.
|
||||
*
|
||||
* <p>Notification emails are sent by out by {@link OutgoingEmail} and it's subclasses, so called
|
||||
* senders. To construct an email the sender class needs to get various other classes injected.
|
||||
* Instead of injecting these classes into the sender classes directly, they only get {@code
|
||||
* EmailArguments} injected and {@code EmailArguments} provides them all dependencies that they
|
||||
* need.
|
||||
*
|
||||
* <p>This class is public because plugins need access to it for sending emails.
|
||||
*/
|
||||
// TODO(ekempin): Can we make this class a singleton so that we don't need to instantiate it for
|
||||
// each and every email?
|
||||
@UsedAt(UsedAt.Project.PLUGINS_ALL)
|
||||
public class EmailArguments {
|
||||
final GitRepositoryManager server;
|
||||
|
||||
Reference in New Issue
Block a user