first commit
Some checks failed
SonarQube Scan / SonarQube Trigger (push) Failing after 20s

This commit is contained in:
Namu
2025-09-23 13:14:23 +02:00
commit 3479d5dcee
22 changed files with 367 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package entities;
import utils.NotificationState;
import utils.SendNotificationStrategy;
public abstract class Notification {
protected String content;
protected User user;
protected NotificationState state;
protected SendNotificationStrategy strategy;
public Notification(String content, User user, SendNotificationStrategy strategy) {
this.content = content;
this.user = user;
this.state = NotificationState.PENDING;
this.strategy = strategy;
}
protected boolean isSendable() {
return this.state != NotificationState.SENT && this.state != NotificationState.READ;
}
public abstract void send();
}