diff --git a/notify-core/src/main/java/com/cicdi/notify/template/Template.java b/notify-core/src/main/java/com/cicdi/notify/template/Template.java index 4e69ad9..779bfe9 100644 --- a/notify-core/src/main/java/com/cicdi/notify/template/Template.java +++ b/notify-core/src/main/java/com/cicdi/notify/template/Template.java @@ -1,9 +1,12 @@ package com.cicdi.notify.template; +import com.cicdi.notify.NotifierProvider; + import java.io.Serializable; /** * 通知模板 + *

不同的服务商{@link TemplateProvider},{@link NotifierProvider}需要实现对应的模板

* * @author xueye */ diff --git a/notify-core/src/main/java/com/cicdi/notify/template/TemplateProperties.java b/notify-core/src/main/java/com/cicdi/notify/template/TemplateProperties.java index 222f9da..17ba6a8 100644 --- a/notify-core/src/main/java/com/cicdi/notify/template/TemplateProperties.java +++ b/notify-core/src/main/java/com/cicdi/notify/template/TemplateProperties.java @@ -1,26 +1,33 @@ package com.cicdi.notify.template; +import com.cicdi.notify.NotifierProvider; +import com.cicdi.notify.NotifyType; + import java.io.Serializable; /** - * 模板属性 + * 通知模板配置属性 * * @author xueye */ public class TemplateProperties implements Serializable { /** - * 模板类型 + * 通知模板类型 + * + * @see NotifyType */ private String type; /** - * 模板提供商 + * 通知模板服务商 + * + * @see NotifierProvider */ private String provider; /** - * 模板 + * 通知模板的JSON字符串 */ private String template; @@ -47,4 +54,5 @@ public class TemplateProperties implements Serializable { public void setTemplate(String template) { this.template = template; } + } diff --git a/notify-core/src/main/java/com/cicdi/notify/template/TemplateProvider.java b/notify-core/src/main/java/com/cicdi/notify/template/TemplateProvider.java index 295a49a..3f82c0b 100644 --- a/notify-core/src/main/java/com/cicdi/notify/template/TemplateProvider.java +++ b/notify-core/src/main/java/com/cicdi/notify/template/TemplateProvider.java @@ -1,29 +1,38 @@ package com.cicdi.notify.template; +import com.cicdi.notify.DefaultNotifyType; import com.cicdi.notify.NotifyType; import com.cicdi.notify.Provider; /** - * 模板提供商 + * 通知模板服务商 + *

模板服务商用于生成对应服务商支持的通知模板

* * @author xueye + * @see Template */ public interface TemplateProvider { /** * @return 通知类型 * @see NotifyType + * @see DefaultNotifyType */ NotifyType getType(); /** - * @return 通知提供商 + * 获取模板的服务商 + * + * @return 模板服务商 */ Provider getProvider(); /** - * @param properties 模板属性 - * @return 模板 + * 根据通知模板配置属性生成通知模板 + * + * @param properties 通知模板配置属性 + * @return 通知模板 */ Template createTemplate(TemplateProperties properties); + }