Привел в соответствие с новой версией автоответчика

Добавил новый класс вложения
This commit is contained in:
Mark Struchkov 2019-05-15 22:34:01 +03:00
parent 0eda787b44
commit 1436331d61
5 changed files with 56 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -0,0 +1,10 @@
package org.sadtech.bot.core.domain.attachment;
public abstract class Attachment {
AttachmentType type;
public AttachmentType getType() {
return type;
}
}

View File

@ -0,0 +1,5 @@
package org.sadtech.bot.core.domain.attachment;
public enum AttachmentType {
AUDIO_MESSAGE
}

View File

@ -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;
}
}

View 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);
}