2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright © 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============================================
36 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
38 package org.onap.portalsdk.analytics.model.search;
40 public class SearchResultColumn extends org.onap.portalsdk.analytics.RaptorObject {
41 private String columnId = "";
42 private String columnTitle = "";
44 private String columnWidth = "";
46 private String alignment = "Left";
48 private String linkURL = null; // if not null => display link instead of
51 private String linkTitle = null; // if img => hint, otherwise link
54 private String linkForm = null; // if not null => displays input submit
57 private String linkConfirmMsg = null; // if not null => display conf. box
60 private String linkImg = null; // if not null => link shows image, not text
62 private String linkImgWidth = null; // optional
64 private String linkImgHeight = null; // optional
66 private boolean copyLink = false; // optional
68 private boolean editLink = false; // optional
70 private boolean deleteLink = false; // optional
72 private boolean scheduleLink = false; // optional
74 public SearchResultColumn(String columnId, String columnTitle) {
76 setColumnId(columnId);
77 setColumnTitle(columnTitle);
78 } // SearchResultColumn
80 public SearchResultColumn(String columnId, String columnTitle, String columnWidth, String alignment) {
82 setColumnId(columnId);
83 setColumnTitle(columnTitle);
84 setColumnWidth(columnWidth);
85 setAlignment(alignment);
86 } // SearchResultColumn
88 public SearchResultColumn(String columnId, String columnTitle, String columnWidth, String alignment,
89 String linkURL, String linkTitle, String linkForm, String linkConfirmMsg,
92 setColumnId(columnId);
93 setColumnTitle(columnTitle);
94 setColumnWidth(columnWidth);
95 setAlignment(alignment);
97 setLinkTitle(linkTitle);
98 setLinkForm(linkForm);
99 setLinkConfirmMsg(linkConfirmMsg);
101 } // SearchResultColumn
103 public SearchResultColumn(String columnId, String columnTitle, String columnWidth, String alignment,
104 String linkURL, String linkTitle, String linkForm, String linkConfirmMsg,
105 String linkImg, String linkImgWidth, String linkImgHeight) {
106 this(columnId, columnTitle, columnWidth, alignment, linkURL, linkTitle, linkForm,
107 linkConfirmMsg, linkImg);
109 setLinkWidth(linkImgWidth);
110 setLinkHeight(linkImgHeight);
111 } // SearchResultColumn
113 public SearchResultColumn(String columnId, String columnTitle, String columnWidth, String alignment,
114 String linkURL, String linkTitle, String linkForm, String linkConfirmMsg,
115 String linkImg, String linkImgWidth, String linkImgHeight, boolean copyLink,
116 boolean editLink, boolean deleteLink) {
117 this(columnId, columnTitle, columnWidth, alignment, linkURL, linkTitle, linkForm,
118 linkConfirmMsg, linkImg, linkImgWidth, linkImgHeight);
120 setCopyLink(copyLink);
121 setEditLink(editLink);
122 setDeleteLink(deleteLink);
123 } // SearchResultColumn
125 public SearchResultColumn(String columnId, String columnTitle, String columnWidth, String alignment,
126 String linkURL, String linkTitle, String linkForm, String linkConfirmMsg,
127 String linkImg, String linkImgWidth, String linkImgHeight, boolean copyLink,
128 boolean editLink, boolean deleteLink, boolean scheduleLink) {
129 this(columnId, columnTitle, columnWidth, alignment, linkURL, linkTitle, linkForm,
130 linkConfirmMsg, linkImg, linkImgWidth, linkImgHeight);
132 setCopyLink(copyLink);
133 setEditLink(editLink);
134 setDeleteLink(deleteLink);
135 setScheduleLink(scheduleLink);
136 } // SearchResultColumn
138 public String getColumnTitle() {
142 public String getColumnWidth() {
146 public String getAlignment() {
150 public String getLinkURL() {
154 public String getLinkTitle() {
158 public String getLinkForm() {
162 public String getLinkConfirmMsg() {
163 return linkConfirmMsg;
166 public String getLinkImg() {
170 public String getLinkImgWidth() {
174 public String getLinkImgHeight() {
175 return linkImgHeight;
178 public boolean isCopyLink() {
182 public boolean isEditLink() {
186 public boolean isDeleteLink() {
190 public void setColumnTitle(String columnTitle) {
191 this.columnTitle = nvl(columnTitle);
194 public void setColumnWidth(String columnWidth) {
195 this.columnWidth = nvl(columnWidth);
198 public void setAlignment(String alignment) {
199 this.alignment = alignment;
202 public void setLinkURL(String linkURL) {
203 this.linkURL = linkURL;
206 public void setLinkTitle(String linkTitle) {
207 this.linkTitle = linkTitle;
210 public void setLinkForm(String linkForm) {
211 this.linkForm = linkForm;
214 public void setLinkConfirmMsg(String linkConfirmMsg) {
215 this.linkConfirmMsg = linkConfirmMsg;
218 public void setLinkImg(String linkImg) {
219 this.linkImg = linkImg;
222 public void setLinkWidth(String linkImgWidth) {
223 this.linkImgWidth = linkImgWidth;
226 public void setLinkHeight(String linkImgHeight) {
227 this.linkImgHeight = linkImgHeight;
230 public void setCopyLink(boolean copyLink) {
231 this.copyLink = copyLink;
234 public void setEditLink(boolean editLink) {
235 this.editLink = editLink;
238 public void setDeleteLink(boolean deleteLink) {
239 this.deleteLink = deleteLink;
242 public String getColumnTitleHtml() {
243 return (columnTitle.length() == 0) ? " " : columnTitle;
246 public String getColumnWidthHtml() {
247 return (columnWidth.length() == 0) ? "" : (" width=" + columnWidth);
250 public String getLinkImgSizeHtml() {
251 return ((nvl(linkImgWidth).length() > 0) ? " width=\"" + linkImgWidth + "\"" : "")
252 + ((nvl(linkImgHeight).length() > 0) ? " height=\"" + linkImgHeight + "\""
256 public boolean isScheduleLink() {
260 public void setScheduleLink(boolean scheduleLink) {
261 this.scheduleLink = scheduleLink;
264 public String getColumnId() {
268 public void setColumnId(String columnId) {
269 this.columnId = columnId;
272 } // SearchResultColumn