| | |
| | | |
| | | import java.util.Collection; |
| | | |
| | | public interface INotificationManager { |
| | | import com.gitblit.models.Mailing; |
| | | |
| | | public interface INotificationManager extends IManager { |
| | | |
| | | /** |
| | | * Returns true if the email service is configured and ready to send notifications. |
| | | * |
| | | * @return true if the email service is operational |
| | | * @since 1.6.0 |
| | | */ |
| | | boolean isSendingMail(); |
| | | |
| | | /** |
| | | * Notify the administrators by email. |
| | | * |
| | | * @param subject |
| | | * @param message |
| | | * @since 1.4.0 |
| | | */ |
| | | void sendMailToAdministrators(String subject, String message); |
| | | |
| | |
| | | * @param subject |
| | | * @param message |
| | | * @param toAddresses |
| | | * @since 1.4.0 |
| | | */ |
| | | void sendMail(String subject, String message, Collection<String> toAddresses); |
| | | |
| | |
| | | * @param subject |
| | | * @param message |
| | | * @param toAddresses |
| | | */ |
| | | void sendMail(String subject, String message, String... toAddresses); |
| | | |
| | | /** |
| | | * Notify users by email of something. |
| | | * |
| | | * @param subject |
| | | * @param message |
| | | * @param toAddresses |
| | | * @since 1.4.0 |
| | | */ |
| | | void sendHtmlMail(String subject, String message, Collection<String> toAddresses); |
| | | |
| | | /** |
| | | * Notify users by email of something. |
| | | * |
| | | * @param subject |
| | | * @param message |
| | | * @param toAddresses |
| | | * @param mailing |
| | | * @return the mail message object |
| | | * @since 1.4.0 |
| | | */ |
| | | void sendHtmlMail(String subject, String message, String... toAddresses); |
| | | void send(Mailing mailing); |
| | | |
| | | } |