Rev 36528 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.common.model;import com.spice.profitmandi.common.enumuration.MessageType;import com.spice.profitmandi.common.enumuration.NotificationCategory;import com.spice.profitmandi.common.enumuration.NotificationFormat;import java.time.LocalDateTime;import java.time.ZoneOffset;import java.util.List;import java.util.Objects;public class Notification {private String cid;private String title;private String type;private String message;private String imageUrl;private String url;private Boolean showImage;private String htmlUrl;private long created;public LocalDateTime getDate() {return LocalDateTime.ofEpochSecond(created / 1000, 0, ZoneOffset.ofHoursMinutes(5, 30));}private boolean expired;private boolean read;private MessageType messageType;private NotificationFormat format;private NotificationCategory category;// Pop-up config (only meaningful when format = IN_APP_POPUP)private String buttonLabel;private Boolean showCta;private Boolean showClose;private String showOnPage;private Integer autoCloseSeconds;private LocalDateTime liveFrom;private LocalDateTime liveUntil;private Integer documentId;private String documentName;/*** Products / schemes / offers attached to this notification. Tap = deep-link into that entity.*/private List<LinkedEntity> linkedEntities;// Story-specific (only meaningful when format = STORY)private List<String> storyCards;private String postInCategory;private Integer playDurationSeconds;public List<LinkedEntity> getLinkedEntities() {return linkedEntities;}public void setLinkedEntities(List<LinkedEntity> linkedEntities) {this.linkedEntities = linkedEntities;}public List<String> getStoryCards() {return storyCards;}public void setStoryCards(List<String> storyCards) {this.storyCards = storyCards;}public String getPostInCategory() {return postInCategory;}public void setPostInCategory(String postInCategory) {this.postInCategory = postInCategory;}public Integer getPlayDurationSeconds() {return playDurationSeconds;}public void setPlayDurationSeconds(Integer playDurationSeconds) {this.playDurationSeconds = playDurationSeconds;}public String getButtonLabel() {return buttonLabel;}public void setButtonLabel(String buttonLabel) {this.buttonLabel = buttonLabel;}public Boolean getShowCta() {return showCta;}public void setShowCta(Boolean showCta) {this.showCta = showCta;}public Boolean getShowClose() {return showClose;}public void setShowClose(Boolean showClose) {this.showClose = showClose;}public String getShowOnPage() {return showOnPage;}public void setShowOnPage(String showOnPage) {this.showOnPage = showOnPage;}public Integer getAutoCloseSeconds() {return autoCloseSeconds;}public void setAutoCloseSeconds(Integer autoCloseSeconds) {this.autoCloseSeconds = autoCloseSeconds;}public LocalDateTime getLiveFrom() {return liveFrom;}public void setLiveFrom(LocalDateTime liveFrom) {this.liveFrom = liveFrom;}public LocalDateTime getLiveUntil() {return liveUntil;}public void setLiveUntil(LocalDateTime liveUntil) {this.liveUntil = liveUntil;}public NotificationFormat getFormat() {return format;}public void setFormat(NotificationFormat format) {this.format = format;}public NotificationCategory getCategory() {return category;}public void setCategory(NotificationCategory category) {this.category = category;}public MessageType getMessageType() {return messageType;}public void setMessageType(MessageType messageType) {this.messageType = messageType;}public String getDocumentName() {return documentName;}public void setDocumentName(String documentName) {this.documentName = documentName;}public Integer getDocumentId() {return documentId;}public void setDocumentId(Integer documentId) {this.documentId = documentId;}public String getCid() {return cid;}public void setCid(String cid) {this.cid = cid;}public String getTitle() {return title;}@Overridepublic boolean equals(Object o) {if (this == o) return true;if (o == null || getClass() != o.getClass()) return false;Notification that = (Notification) o;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);}@Overridepublic int hashCode() {return Objects.hash(cid, title, type, message, imageUrl, url, showImage, htmlUrl, created, expired, messageType, format, category, documentId, documentName);}public String getHtmlUrl() {return htmlUrl;}public void setHtmlUrl(String htmlUrl) {this.htmlUrl = htmlUrl;}public void setTitle(String title) {this.title = title;}public String getType() {return type;}public void setType(String type) {this.type = type;}public String getMessage() {return message;}public void setMessage(String message) {this.message = message;}public String getUrl() {return url;}public void setUrl(String url) {this.url = url;}public boolean isExpired() {return expired;}public String getImageUrl() {return imageUrl;}public void setImageUrl(String imageUrl) {this.imageUrl = imageUrl;}public Boolean getShowImage() {return showImage;}public void setExpired(boolean expired) {this.expired = expired;}public boolean isRead() {return read;}public void setRead(boolean read) {this.read = read;}public long getCreated() {return created;}public void setCreated(long created) {this.created = created;}public Boolean isShowImage() {return showImage;}public void setShowImage(Boolean showImage) {this.showImage = showImage;}}