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