8bc4a1903f51a572d4caab44a24758a5d5af0fbc
[portal/sdk.git] /
1 /*
2  * ============LICENSE_START==========================================
3  * ONAP Portal SDK
4  * ===================================================================
5  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * ===================================================================
7  *
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
12  *
13  *             http://www.apache.org/licenses/LICENSE-2.0
14  *
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.
20  *
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
25  *
26  *             https://creativecommons.org/licenses/by/4.0/
27  *
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.
33  *
34  * ============LICENSE_END============================================
35  *
36  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
37  */
38 package org.onap.portalsdk.analytics.system.fusion.domain;
39
40 import java.util.Date;
41
42 import org.onap.portalsdk.analytics.system.Globals;
43 import org.onap.portalsdk.core.domain.support.DomainVo;;
44
45 public class RaptorSearch extends DomainVo {
46
47         private Long repId;
48         private String title;
49         private String descr;
50         private String ownerName;
51         private Date createDate;
52         private String canEdit;
53         private String readOnly;
54         private String schedule;
55         // private Long countRows;
56
57         /**
58          * @return the repId
59          */
60         public Long getRepId() {
61                 return repId;
62         }
63
64         /**
65          * @param repId
66          *            the repId to set
67          */
68         public void setRepId(Long repId) {
69                 this.repId = repId;
70         }
71
72         /**
73          * @return the title
74          */
75         public String getTitle() {
76                 return title;
77         }
78
79         /**
80          * @param title
81          *            the title to set
82          */
83         public void setTitle(String title) {
84                 this.title = title;
85         }
86
87         /**
88          * @return the descr
89          */
90         public String getDescr() {
91                 return descr;
92         }
93
94         /**
95          * @param descr
96          *            the descr to set
97          */
98         public void setDescr(String descr) {
99                 this.descr = descr;
100         }
101
102         /**
103          * @return the createDate
104          */
105         public Date getCreateDate() {
106                 return createDate;
107         }
108
109         /**
110          * @param createDate
111          *            the createDate to set
112          */
113         public void setCreateDate(Date createDate) {
114                 this.createDate = createDate;
115         }
116
117         /**
118          * @return the ownerName
119          */
120         public String getOwnerName() {
121                 return ownerName;
122         }
123
124         /**
125          * @param ownerName
126          *            the ownerName to set
127          */
128         public void setOwnerName(String ownerName) {
129                 this.ownerName = ownerName;
130         }
131
132         /**
133          * @return the schedule
134          */
135         public String getSchedule() {
136                 return schedule;
137         }
138
139         /**
140          * @param schedule
141          *            the schedule to set
142          */
143         public void setSchedule(String schedule) {
144                 this.schedule = schedule;
145         }
146
147         /**
148          * @return the canEdit
149          */
150         public String getCanEdit() {
151                 return canEdit;
152         }
153
154         /**
155          * @param canEdit
156          *            the canEdit to set
157          */
158         public void setCanEdit(String canEdit) {
159                 this.canEdit = canEdit;
160         }
161
162         /**
163          * @return the canDelete
164          */
165         public boolean canDelete() {
166                 String s = getCanEdit();
167                 if (s != null && s.length() > 0 && s.equals("Y")) {
168                         return true;
169                 }
170                 return false;
171         }
172
173         /**
174          * @return the canCopy
175          */
176         public boolean canCopy() {
177                 String s = getReadOnly();
178                 if (returnTrueOrFalse(s)) {
179                         return Globals.getCanCopyOnReadOnly() ? true : returnTrueOrFalse(getCanEdit());
180                 }
181                 return true;
182         }
183
184         /**
185          * @return the readOnly
186          */
187         public String getReadOnly() {
188                 return readOnly;
189         }
190
191         /**
192          * @param readOnly
193          *            the readOnly to set
194          */
195         public void setReadOnly(String readOnly) {
196                 this.readOnly = readOnly;
197         }
198
199         private boolean returnTrueOrFalse(String s) {
200                 if (s != null && s.length() > 0 && s.equals("Y")) {
201                         return true;
202                 }
203                 return false;
204         }
205
206 }