Привел в соответствие с новой версией автоответчика
Добавил новый класс вложения
This commit is contained in:
parent
0eda787b44
commit
1436331d61
@ -1,5 +1,8 @@
|
||||
package org.sadtech.bot.core.domain;
|
||||
|
||||
import org.sadtech.bot.core.domain.attachment.Attachment;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class Mail extends Content {
|
||||
@ -7,6 +10,7 @@ public class Mail extends Content {
|
||||
private Integer id;
|
||||
private Integer date;
|
||||
private String message;
|
||||
private List<Attachment> attachments;
|
||||
|
||||
public Mail() {
|
||||
|
||||
@ -63,4 +67,12 @@ public class Mail extends Content {
|
||||
public int hashCode() {
|
||||
return Objects.hash(super.hashCode(), id, date, message);
|
||||
}
|
||||
|
||||
public List<Attachment> getAttachments() {
|
||||
return attachments;
|
||||
}
|
||||
|
||||
public void setAttachments(List<Attachment> attachments) {
|
||||
this.attachments = attachments;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,10 @@
|
||||
package org.sadtech.bot.core.domain.attachment;
|
||||
|
||||
public abstract class Attachment {
|
||||
|
||||
AttachmentType type;
|
||||
|
||||
public AttachmentType getType() {
|
||||
return type;
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package org.sadtech.bot.core.domain.attachment;
|
||||
|
||||
public enum AttachmentType {
|
||||
AUDIO_MESSAGE
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.sadtech.bot.core.domain.attachment;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
public class AudioMessage extends Attachment {
|
||||
|
||||
private URL linkOdd;
|
||||
|
||||
public AudioMessage() {
|
||||
type = AttachmentType.AUDIO_MESSAGE;
|
||||
}
|
||||
|
||||
public URL getLinkOdd() {
|
||||
return linkOdd;
|
||||
}
|
||||
|
||||
public void setLinkOdd(URL linkOdd) {
|
||||
this.linkOdd = linkOdd;
|
||||
}
|
||||
}
|
9
src/main/java/org/sadtech/bot/core/filter/Filter.java
Normal file
9
src/main/java/org/sadtech/bot/core/filter/Filter.java
Normal file
@ -0,0 +1,9 @@
|
||||
package org.sadtech.bot.core.filter;
|
||||
|
||||
import org.sadtech.bot.core.domain.Content;
|
||||
|
||||
public interface Filter<T extends Content> {
|
||||
|
||||
void doFilter(T content);
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user