2 * ================================================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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 * ================================================================================
20 package org.openecomp.portalsdk.analytics.model.search;
24 import org.openecomp.portalsdk.analytics.system.*;
25 import org.openecomp.portalsdk.analytics.util.*;
27 public class ReportSearchResult extends SearchResult {
28 private static final String HTML_FORM = "forma";
30 public ReportSearchResult(int pageNo) {
31 this(pageNo, Globals.getDefaultPageSize(), -1, -1);
32 } // ReportSearchResult
34 public ReportSearchResult(int pageNo, int writeAccessColIndex, int ownerIndicatorColIndex) {
35 this(pageNo, Globals.getDefaultPageSize(), writeAccessColIndex, ownerIndicatorColIndex);
36 } // ReportSearchResult
38 public ReportSearchResult(int pageNo, int pageSize, int writeAccessColIndex,
39 int ownerIndicatorColIndex) {
40 super(pageNo, pageSize, writeAccessColIndex, ownerIndicatorColIndex);
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
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,
59 + "calendar_icon.gif", "13", "12", true, false, false));
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
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
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
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
81 + "test_run.gif", "12", "12"));
82 } // ReportSearchResult
84 } // ReportSearchResult