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