Subversion Repositories SmartDukaan

Rev

Rev 36528 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36528 Rev 37508
Line 1... Line 1...
1
package com.spice.profitmandi.common.model;
1
package com.spice.profitmandi.common.model;
2
 
2
 
3
import com.spice.profitmandi.common.enumuration.MessageType;
3
import com.spice.profitmandi.common.enumuration.MessageType;
-
 
4
import com.spice.profitmandi.common.enumuration.NotificationCategory;
-
 
5
import com.spice.profitmandi.common.enumuration.NotificationFormat;
4
 
6
 
5
import java.time.LocalDateTime;
7
import java.time.LocalDateTime;
6
import java.time.ZoneOffset;
8
import java.time.ZoneOffset;
-
 
9
import java.util.List;
7
import java.util.Objects;
10
import java.util.Objects;
8
 
11
 
9
public class Notification {
12
public class Notification {
10
	private String cid;
13
	private String cid;
11
	private String title;
14
	private String title;
Line 24... Line 27...
24
	private boolean expired;
27
	private boolean expired;
25
	private boolean read;
28
	private boolean read;
26
 
29
 
27
	private MessageType messageType;
30
	private MessageType messageType;
28
 
31
 
-
 
32
	private NotificationFormat format;
-
 
33
	private NotificationCategory category;
-
 
34
 
-
 
35
	// Pop-up config (only meaningful when format = IN_APP_POPUP)
-
 
36
	private String buttonLabel;
-
 
37
	private Boolean showCta;
-
 
38
	private Boolean showClose;
-
 
39
	private String showOnPage;
-
 
40
	private Integer autoCloseSeconds;
-
 
41
	private LocalDateTime liveFrom;
-
 
42
	private LocalDateTime liveUntil;
-
 
43
 
29
	private Integer documentId;
44
	private Integer documentId;
30
	private String documentName;
45
	private String documentName;
31
 
46
 
-
 
47
	/**
-
 
48
	 * Products / schemes / offers attached to this notification. Tap = deep-link into that entity.
-
 
49
	 */
-
 
50
	private List<LinkedEntity> linkedEntities;
-
 
51
 
-
 
52
	// Story-specific (only meaningful when format = STORY)
-
 
53
	private List<String> storyCards;
-
 
54
	private String postInCategory;
-
 
55
	private Integer playDurationSeconds;
-
 
56
 
-
 
57
	public List<LinkedEntity> getLinkedEntities() {
-
 
58
		return linkedEntities;
-
 
59
	}
-
 
60
 
-
 
61
	public void setLinkedEntities(List<LinkedEntity> linkedEntities) {
-
 
62
		this.linkedEntities = linkedEntities;
-
 
63
	}
-
 
64
 
-
 
65
	public List<String> getStoryCards() {
-
 
66
		return storyCards;
-
 
67
	}
-
 
68
 
-
 
69
	public void setStoryCards(List<String> storyCards) {
-
 
70
		this.storyCards = storyCards;
-
 
71
	}
-
 
72
 
-
 
73
	public String getPostInCategory() {
-
 
74
		return postInCategory;
-
 
75
	}
-
 
76
 
-
 
77
	public void setPostInCategory(String postInCategory) {
-
 
78
		this.postInCategory = postInCategory;
-
 
79
	}
-
 
80
 
-
 
81
	public Integer getPlayDurationSeconds() {
-
 
82
		return playDurationSeconds;
-
 
83
	}
-
 
84
 
-
 
85
	public void setPlayDurationSeconds(Integer playDurationSeconds) {
-
 
86
		this.playDurationSeconds = playDurationSeconds;
-
 
87
	}
-
 
88
 
-
 
89
	public String getButtonLabel() {
-
 
90
		return buttonLabel;
-
 
91
	}
-
 
92
 
-
 
93
	public void setButtonLabel(String buttonLabel) {
-
 
94
		this.buttonLabel = buttonLabel;
-
 
95
	}
-
 
96
 
-
 
97
	public Boolean getShowCta() {
-
 
98
		return showCta;
-
 
99
	}
-
 
100
 
-
 
101
	public void setShowCta(Boolean showCta) {
-
 
102
		this.showCta = showCta;
-
 
103
	}
-
 
104
 
-
 
105
	public Boolean getShowClose() {
-
 
106
		return showClose;
-
 
107
	}
-
 
108
 
-
 
109
	public void setShowClose(Boolean showClose) {
-
 
110
		this.showClose = showClose;
-
 
111
	}
-
 
112
 
-
 
113
	public String getShowOnPage() {
-
 
114
		return showOnPage;
-
 
115
	}
-
 
116
 
-
 
117
	public void setShowOnPage(String showOnPage) {
-
 
118
		this.showOnPage = showOnPage;
-
 
119
	}
-
 
120
 
-
 
121
	public Integer getAutoCloseSeconds() {
-
 
122
		return autoCloseSeconds;
-
 
123
	}
-
 
124
 
-
 
125
	public void setAutoCloseSeconds(Integer autoCloseSeconds) {
-
 
126
		this.autoCloseSeconds = autoCloseSeconds;
-
 
127
	}
-
 
128
 
-
 
129
	public LocalDateTime getLiveFrom() {
-
 
130
		return liveFrom;
-
 
131
	}
-
 
132
 
-
 
133
	public void setLiveFrom(LocalDateTime liveFrom) {
-
 
134
		this.liveFrom = liveFrom;
-
 
135
	}
-
 
136
 
-
 
137
	public LocalDateTime getLiveUntil() {
-
 
138
		return liveUntil;
-
 
139
	}
-
 
140
 
-
 
141
	public void setLiveUntil(LocalDateTime liveUntil) {
-
 
142
		this.liveUntil = liveUntil;
-
 
143
	}
-
 
144
 
-
 
145
	public NotificationFormat getFormat() {
-
 
146
		return format;
-
 
147
	}
-
 
148
 
-
 
149
	public void setFormat(NotificationFormat format) {
-
 
150
		this.format = format;
-
 
151
	}
-
 
152
 
-
 
153
	public NotificationCategory getCategory() {
-
 
154
		return category;
-
 
155
	}
-
 
156
 
-
 
157
	public void setCategory(NotificationCategory category) {
-
 
158
		this.category = category;
-
 
159
	}
-
 
160
 
32
	public MessageType getMessageType() {
161
	public MessageType getMessageType() {
33
		return messageType;
162
		return messageType;
34
	}
163
	}
35
 
164
 
36
	public void setMessageType(MessageType messageType) {
165
	public void setMessageType(MessageType messageType) {
Line 68... Line 197...
68
	@Override
197
	@Override
69
	public boolean equals(Object o) {
198
	public boolean equals(Object o) {
70
		if (this == o) return true;
199
		if (this == o) return true;
71
		if (o == null || getClass() != o.getClass()) return false;
200
		if (o == null || getClass() != o.getClass()) return false;
72
		Notification that = (Notification) o;
201
		Notification that = (Notification) o;
73
		return created == that.created && expired == that.expired && Objects.equals(cid, that.cid) && Objects.equals(title, that.title) && Objects.equals(type, that.type) && Objects.equals(message, that.message) && Objects.equals(imageUrl, that.imageUrl) && Objects.equals(url, that.url) && Objects.equals(showImage, that.showImage) && Objects.equals(htmlUrl, that.htmlUrl) && messageType == that.messageType && Objects.equals(documentId, that.documentId) && Objects.equals(documentName, that.documentName);
202
		return created == that.created && expired == that.expired && Objects.equals(cid, that.cid) && Objects.equals(title, that.title) && Objects.equals(type, that.type) && Objects.equals(message, that.message) && Objects.equals(imageUrl, that.imageUrl) && Objects.equals(url, that.url) && Objects.equals(showImage, that.showImage) && Objects.equals(htmlUrl, that.htmlUrl) && messageType == that.messageType && format == that.format && category == that.category && Objects.equals(documentId, that.documentId) && Objects.equals(documentName, that.documentName);
74
	}
203
	}
75
 
204
 
76
	@Override
205
	@Override
77
	public int hashCode() {
206
	public int hashCode() {
78
		return Objects.hash(cid, title, type, message, imageUrl, url, showImage, htmlUrl, created, expired, messageType, documentId, documentName);
207
		return Objects.hash(cid, title, type, message, imageUrl, url, showImage, htmlUrl, created, expired, messageType, format, category, documentId, documentName);
79
	}
208
	}
80
 
209
 
81
	public String getHtmlUrl() {
210
	public String getHtmlUrl() {
82
		return htmlUrl;
211
		return htmlUrl;
83
	}
212
	}