2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ===================================================================
8 * Unless otherwise specified, all software contained herein is licensed
9 * under the Apache License, Version 2.0 (the "License");
10 * you may not use this software except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
21 * Unless otherwise specified, all documentation contained herein is licensed
22 * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
23 * you may not use this documentation except in compliance with the License.
24 * You may obtain a copy of the License at
26 * https://creativecommons.org/licenses/by/4.0/
28 * Unless required by applicable law or agreed to in writing, documentation
29 * distributed under the License is distributed on an "AS IS" BASIS,
30 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31 * See the License for the specific language governing permissions and
32 * limitations under the License.
34 * ============LICENSE_END============================================
38 package org.onap.portalapp.portal.transport;
40 import java.util.Date;
42 import javax.persistence.Entity;
43 import javax.persistence.Id;
45 import org.onap.portalsdk.core.domain.support.DomainVo;
48 * This is to handle notifications in user notifications and in notification history
52 * POJO that models a single notification with the org user ID (not integer
56 public class EpNotificationItemVO extends DomainVo {
58 private static final long serialVersionUID = 9095479701352339201L;
61 private Integer notificationId;
63 private Character isForOnlineUsers;
65 private Character isForAllRoles;
67 private Character activeYn;
69 private String msgHeader;
71 private String msgDescription;
73 private String msgSource;
75 private Date startTime;
79 private Integer priority;
81 private Integer creatorId;
83 private Date createdDate;
85 private String loginId;
87 private String notificationHyperlink;
91 * Answers whether the notification is expired.
93 * @return true if the end time is past the current time, else false.
95 public boolean isExpired() {
96 boolean result = false;
97 if (endTime != null) {
98 int expired = endTime.compareTo(new Date());
99 result = (expired == -1) ? true : false;
104 public String getLoginId() {
108 public void setLoginId(String loginId) {
109 this.loginId = loginId;
112 public Integer getNotificationId() {
113 return notificationId;
116 public void setNotificationId(Integer notificationId) {
117 this.notificationId = notificationId;
120 public Character getIsForOnlineUsers() {
121 return isForOnlineUsers;
124 public void setIsForOnlineUsers(Character isForOnlineUsers) {
125 this.isForOnlineUsers = isForOnlineUsers;
128 public Character getIsForAllRoles() {
129 return isForAllRoles;
132 public void setIsForAllRoles(Character isForAllRoles) {
133 this.isForAllRoles = isForAllRoles;
136 public Character getActiveYn() {
140 public void setActiveYn(Character activeYn) {
141 this.activeYn = activeYn;
144 public String getMsgHeader() {
148 public void setMsgHeader(String msgHeader) {
149 this.msgHeader = msgHeader;
152 public String getMsgDescription() {
153 return msgDescription;
156 public void setMsgDescription(String msgDescription) {
157 this.msgDescription = msgDescription;
160 public Date getStartTime() {
164 public void setStartTime(Date startTime) {
165 this.startTime = startTime;
168 public Date getEndTime() {
172 public void setEndTime(Date endTime) {
173 this.endTime = endTime;
176 public Integer getPriority() {
180 public void setPriority(Integer priority) {
181 this.priority = priority;
184 public Integer getCreatorId() {
188 public void setCreatorId(Integer creatorId) {
189 this.creatorId = creatorId;
192 public Date getCreatedDate() {
196 public void setCreatedDate(Date createdDate) {
197 this.createdDate = createdDate;
201 public String getMsgSource() {
205 public void setMsgSource(String msgSource) {
206 this.msgSource = msgSource;
209 public String getNotificationHyperlink() {
210 return notificationHyperlink;
213 public void setNotificationHyperlink(String notificationHyperlink) {
214 this.notificationHyperlink = notificationHyperlink;