2 * ================================================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ================================================================================
20 package org.openecomp.portalapp.portal.transport;
22 import java.util.Date;
24 import javax.persistence.Entity;
25 import javax.persistence.Id;
27 import org.openecomp.portalsdk.core.domain.support.DomainVo;
30 * This is to handle notifications in user notifications and in notification history
34 * POJO that models a single notification with the org user ID (not integer
38 public class EpNotificationItemVO extends DomainVo {
40 private static final long serialVersionUID = 9095479701352339201L;
43 private Integer notificationId;
45 private Character isForOnlineUsers;
47 private Character isForAllRoles;
49 private Character activeYn;
51 private String msgHeader;
53 private String msgDescription;
55 private String msgSource;
57 private Date startTime;
61 private Integer priority;
63 private Integer creatorId;
65 private Date createdDate;
67 private String loginId;
69 private String notificationHyperlink;
73 * Answers whether the notification is expired.
75 * @return true if the end time is past the current time, else false.
77 public boolean isExpired() {
78 boolean result = false;
79 if (endTime != null) {
80 int expired = endTime.compareTo(new Date());
81 result = (expired == -1) ? true : false;
86 public String getLoginId() {
90 public void setLoginId(String loginId) {
91 this.loginId = loginId;
94 public Integer getNotificationId() {
95 return notificationId;
98 public void setNotificationId(Integer notificationId) {
99 this.notificationId = notificationId;
102 public Character getIsForOnlineUsers() {
103 return isForOnlineUsers;
106 public void setIsForOnlineUsers(Character isForOnlineUsers) {
107 this.isForOnlineUsers = isForOnlineUsers;
110 public Character getIsForAllRoles() {
111 return isForAllRoles;
114 public void setIsForAllRoles(Character isForAllRoles) {
115 this.isForAllRoles = isForAllRoles;
118 public Character getActiveYn() {
122 public void setActiveYn(Character activeYn) {
123 this.activeYn = activeYn;
126 public String getMsgHeader() {
130 public void setMsgHeader(String msgHeader) {
131 this.msgHeader = msgHeader;
134 public String getMsgDescription() {
135 return msgDescription;
138 public void setMsgDescription(String msgDescription) {
139 this.msgDescription = msgDescription;
142 public Date getStartTime() {
146 public void setStartTime(Date startTime) {
147 this.startTime = startTime;
150 public Date getEndTime() {
154 public void setEndTime(Date endTime) {
155 this.endTime = endTime;
158 public Integer getPriority() {
162 public void setPriority(Integer priority) {
163 this.priority = priority;
166 public Integer getCreatorId() {
170 public void setCreatorId(Integer creatorId) {
171 this.creatorId = creatorId;
174 public Date getCreatedDate() {
178 public void setCreatedDate(Date createdDate) {
179 this.createdDate = createdDate;
182 public static long getSerialversionuid() {
183 return serialVersionUID;
187 public String getMsgSource() {
191 public void setMsgSource(String msgSource) {
192 this.msgSource = msgSource;
195 public String getNotificationHyperlink() {
196 return notificationHyperlink;
199 public void setNotificationHyperlink(String notificationHyperlink) {
200 this.notificationHyperlink = notificationHyperlink;