You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.4 KiB
62 lines
1.4 KiB
package com.fr.plugin.dingding.webhook.entity; |
|
|
|
import com.fr.schedule.base.bean.output.BaseOutputAction; |
|
import com.fr.schedule.base.entity.AbstractScheduleEntity; |
|
import com.fr.schedule.base.type.RunType; |
|
import com.fr.third.fasterxml.jackson.annotation.JsonSubTypes; |
|
|
|
/** |
|
* @Author fr.open |
|
* @Date 2020/9/15 |
|
* @Description |
|
**/ |
|
@JsonSubTypes.Type(value = OutputWebHook.class, name = "OutputWebHook") |
|
public class OutputWebHook extends BaseOutputAction { |
|
|
|
private static final long serialVersionUID = 8921116228585639504L; |
|
|
|
private String hookUrl = null; |
|
|
|
public OutputWebHook() { |
|
super(); |
|
} |
|
|
|
@Override |
|
public boolean willExecuteByUser() { |
|
return false; |
|
} |
|
|
|
@Override |
|
public RunType runType() { |
|
return RunType.SEND_FILE; |
|
} |
|
|
|
@Override |
|
public Class<? extends AbstractScheduleEntity> outputActionEntityClass() { |
|
return WebHookEntity.class; |
|
} |
|
|
|
@Override |
|
public AbstractScheduleEntity createOutputActionEntity() { |
|
return (new WebHookEntity()).id(this.getId()).hookUrl(this.hookUrl); |
|
} |
|
|
|
@Override |
|
public OutputWebHook id(String id) { |
|
setId(id); |
|
return this; |
|
} |
|
|
|
public String getHookUrl() { |
|
return hookUrl; |
|
} |
|
|
|
public void setHookUrl(String hookUrl) { |
|
this.hookUrl = hookUrl; |
|
} |
|
|
|
public OutputWebHook hookUrl(String hookUrl) { |
|
setHookUrl(hookUrl); |
|
return this; |
|
} |
|
}
|
|
|