NotificationMessage.java 662 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package fr.jaquin.bdlg.planner.websockets;
  2. public class NotificationMessage {
  3. private String text;
  4. private MessageType type;
  5. public enum MessageType {
  6. info, success, warning, error,
  7. }
  8. public NotificationMessage(String text) {
  9. this.text = text;
  10. this.type = MessageType.info;
  11. }
  12. public NotificationMessage(String text, MessageType type) {
  13. this.text = text;
  14. this.type = type;
  15. }
  16. public String getText() {
  17. return this.text;
  18. }
  19. public void setText(String text) {
  20. this.text = text;
  21. }
  22. public MessageType getType() {
  23. return type;
  24. }
  25. public void setType(MessageType type) {
  26. this.type = type;
  27. }
  28. }