package com.qianwen.core.notify.executor; import com.qianwen.core.notify.DefaultNotifyType; import org.springframework.util.Assert; public class RuleNotifierProperties { private DefaultNotifyType notifyType; private String notifierId; private String templateId; public RuleNotifierProperties setNotifyType(final DefaultNotifyType notifyType) { this.notifyType = notifyType; return this; } public RuleNotifierProperties setNotifierId(final String notifierId) { this.notifierId = notifierId; return this; } public RuleNotifierProperties setTemplateId(final String templateId) { this.templateId = templateId; return this; } public DefaultNotifyType getNotifyType() { return this.notifyType; } public String getNotifierId() { return this.notifierId; } public String getTemplateId() { return this.templateId; } public void validate() { Assert.notNull(this.notifyType, "notifyType can not be null"); Assert.hasText(this.notifierId, "notifierId can not be empty"); } }