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