ee2a13ab833f90a037fbb766353fc16272bc5fd8
[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.model.search;
39
40 import org.onap.portalsdk.analytics.system.AppUtils;
41 import org.onap.portalsdk.analytics.system.Globals;
42 import org.onap.portalsdk.analytics.util.AppConstants;
43
44 public class ReportSearchResult extends SearchResult {
45         private static final String HTML_FORM = "forma";
46
47         public ReportSearchResult(int pageNo) {
48                 this(pageNo, Globals.getDefaultPageSize(), -1, -1);
49         } // ReportSearchResult
50
51         public ReportSearchResult(int pageNo, int writeAccessColIndex, int ownerIndicatorColIndex) {
52                 this(pageNo, Globals.getDefaultPageSize(), writeAccessColIndex, ownerIndicatorColIndex);
53         } // ReportSearchResult
54
55         public ReportSearchResult(int pageNo, int pageSize, int writeAccessColIndex,
56                         int ownerIndicatorColIndex) {
57                 super(pageNo, pageSize, writeAccessColIndex, ownerIndicatorColIndex);
58
59                 addColumn(new SearchResultColumn("no","No", "5%", "Center"));
60                 addColumn(new SearchResultColumn("rep_id","Report ID", "5%", "Center"));
61                 addColumn(new SearchResultColumn("rep_name","Report Name", "25%", "Left"));
62                 addColumn(new SearchResultColumn("descr","Description", "30%", "Left"));
63                 addColumn(new SearchResultColumn("owner","Report Owner", "10%", "Center"));
64                 addColumn(new SearchResultColumn("create_date","Create Date", "10%", "Center"));
65                 addColumn(new SearchResultColumn("copy","  Copy  ", "5%", "Center",
66                                 "document." + HTML_FORM + "." + AppConstants.RI_ACTION
67                                                 + ".value='report.copy';", "Copy report", HTML_FORM,
68                                 "Are you sure you want to create a copy of this report?", AppUtils
69                                                 .getImgFolderURL()
70                                                 + "modify_icon.gif", "13", "12", true, false, false));
71                 /*addColumn(new SearchResultColumn("  Schedule  ", "5%", "Center",
72                                 "document." + HTML_FORM + "." + AppConstants.RI_ACTION
73                                                 + ".value='report.schedule_only';", "Schedule report", HTML_FORM,
74                                 null, AppUtils
75                                                 .getImgFolderURL()
76                                                 + "calendar_icon.gif", "13", "12", true, false, false));
77                                                 */
78
79                 addColumn(new SearchResultColumn("edit","  Edit  ", "5%", "Center",
80                                 "document." + HTML_FORM + "." + AppConstants.RI_ACTION
81                                                 + ".value='report.edit';", "Edit report", HTML_FORM, null, AppUtils
82                                                 .getImgFolderURL()
83                                                 + "pen_paper.gif", "12", "12", false, true, false));
84                 addColumn(new SearchResultColumn("delete","Delete", "5%", "Center", "document." + HTML_FORM
85                                 + "." + AppConstants.RI_ACTION + ".value='report.delete';", "Delete report",
86                                 HTML_FORM, "Are you sure you want to delete this report?", AppUtils
87                                                 .getImgFolderURL()
88                                                 + "deleteicon.gif", "12", "12", false, false, true));
89                 addColumn(new SearchResultColumn("schedule","Schedule", "5%", "Center", "document." + HTML_FORM
90                                 + "." + AppConstants.RI_ACTION + ".value='report.schedule.report.submit_wmenu';", "Schedule report",
91                                 HTML_FORM, null, AppUtils
92                                                 .getImgFolderURL()
93                                                 + "calendar_icon.gif", "20", "20", false, false, false, true));
94                 addColumn(new SearchResultColumn("run","  Run  ", "5%", "Center",
95                                 "document." + HTML_FORM + "." + AppConstants.RI_ACTION
96                                                 + ".value='report.run';", "Run report", HTML_FORM, null, AppUtils
97                                                 .getImgFolderURL()
98                                                 + "test_run.gif", "12", "12"));
99         } // ReportSearchResult
100
101 } // ReportSearchResult
102