2 * ================================================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 AT&T Intellectual Property
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ================================================================================
\r
20 package org.openecomp.portalapp.portal.transport;
\r
22 import java.util.Date;
\r
24 import javax.persistence.Entity;
\r
25 import javax.persistence.Id;
\r
27 import org.openecomp.portalsdk.core.domain.support.DomainVo;
\r
30 * This is to handle notifications in user notifications and in notification history
\r
34 * POJO that models a single notification with the org user ID (not integer
\r
38 public class EpNotificationItemVO extends DomainVo {
\r
40 private static final long serialVersionUID = 9095479701352339201L;
\r
43 private Integer notificationId;
\r
45 private Character isForOnlineUsers;
\r
47 private Character isForAllRoles;
\r
49 private Character activeYn;
\r
51 private String msgHeader;
\r
53 private String msgDescription;
\r
55 private String msgSource;
\r
57 private Date startTime;
\r
59 private Date endTime;
\r
61 private Integer priority;
\r
63 private Integer creatorId;
\r
65 private Date createdDate;
\r
67 private String loginId;
\r
70 * Answers whether the notification is expired.
\r
72 * @return true if the end time is past the current time, else false.
\r
74 public boolean isExpired() {
\r
75 boolean result = false;
\r
76 if (endTime != null) {
\r
77 int expired = endTime.compareTo(new Date());
\r
78 result = (expired == -1) ? true : false;
\r
83 public String getLoginId() {
\r
87 public void setLoginId(String loginId) {
\r
88 this.loginId = loginId;
\r
91 public Integer getNotificationId() {
\r
92 return notificationId;
\r
95 public void setNotificationId(Integer notificationId) {
\r
96 this.notificationId = notificationId;
\r
99 public Character getIsForOnlineUsers() {
\r
100 return isForOnlineUsers;
\r
103 public void setIsForOnlineUsers(Character isForOnlineUsers) {
\r
104 this.isForOnlineUsers = isForOnlineUsers;
\r
107 public Character getIsForAllRoles() {
\r
108 return isForAllRoles;
\r
111 public void setIsForAllRoles(Character isForAllRoles) {
\r
112 this.isForAllRoles = isForAllRoles;
\r
115 public Character getActiveYn() {
\r
119 public void setActiveYn(Character activeYn) {
\r
120 this.activeYn = activeYn;
\r
123 public String getMsgHeader() {
\r
127 public void setMsgHeader(String msgHeader) {
\r
128 this.msgHeader = msgHeader;
\r
131 public String getMsgDescription() {
\r
132 return msgDescription;
\r
135 public void setMsgDescription(String msgDescription) {
\r
136 this.msgDescription = msgDescription;
\r
139 public Date getStartTime() {
\r
143 public void setStartTime(Date startTime) {
\r
144 this.startTime = startTime;
\r
147 public Date getEndTime() {
\r
151 public void setEndTime(Date endTime) {
\r
152 this.endTime = endTime;
\r
155 public Integer getPriority() {
\r
159 public void setPriority(Integer priority) {
\r
160 this.priority = priority;
\r
163 public Integer getCreatorId() {
\r
167 public void setCreatorId(Integer creatorId) {
\r
168 this.creatorId = creatorId;
\r
171 public Date getCreatedDate() {
\r
172 return createdDate;
\r
175 public void setCreatedDate(Date createdDate) {
\r
176 this.createdDate = createdDate;
\r
179 public static long getSerialversionuid() {
\r
180 return serialVersionUID;
\r
184 public String getMsgSource() {
\r
188 public void setMsgSource(String msgSource) {
\r
189 this.msgSource = msgSource;
\r