8c245625c5ec74ebeb5701eab452ce300640a9cb
[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.runtime;
39
40 import java.util.ArrayList;
41 import java.util.Calendar;
42 import java.util.Map;
43
44 import javax.xml.bind.annotation.XmlAttribute;
45 import javax.xml.bind.annotation.XmlElement;
46
47 import org.json.JSONObject;
48 import org.onap.portalsdk.analytics.model.base.IdNameValue;
49 import org.onap.portalsdk.analytics.view.ColumnHeader;
50 import org.onap.portalsdk.analytics.view.DataValue;
51 import org.onap.portalsdk.analytics.xmlobj.ColFilterList;
52 import org.onap.portalsdk.analytics.xmlobj.DataColumnList;
53 import org.onap.portalsdk.analytics.xmlobj.DataColumnType;
54
55 /*class MetaColumn {
56     private String tableId;
57     private String dbColName;
58     private String crossTabValue;
59     private String colName;
60     private String displayName;
61     private Integer displayWidth;
62     private String displayWidthInPxls;
63     private String pdfDisplayWidthInPxls;
64     private String displayAlignment;
65     private String displayHeaderAlignment;
66     private int orderSeq;
67     private boolean visible;
68     private boolean calculated;
69     private String colType;
70     private String hyperlinkURL;
71     private String hyperlinkType;
72     private String actionImg;
73     private Integer groupByPos;
74     private String subTotalCustomText;
75     private Boolean hideRepeatedKey;
76     private String colFormat;
77     private boolean groupBreak;
78     private Integer orderBySeq;
79     private String orderByAscDesc;
80     private String displayTotal;
81     private String colOnChart;
82     private Integer chartSeq;
83     private String chartColor;
84     private String chartLineType;
85     private Boolean chartSeries;
86     private Boolean isRangeAxisFilled;
87     private Boolean createInNewChart;
88     private String drillDownType;
89     private Boolean drillinPoPUp;
90     private String drillDownURL;
91     private String drillDownParams;
92     private String comment;
93     private ColFilterList colFilterList;
94     private String semaphoreId;
95     private String dbColType;
96     private String chartGroup;
97     private String yAxis;
98     private String dependsOnFormField;
99     private String nowrap;
100     private Integer indentation;
101     private Boolean enhancedPagination;
102     private Integer level;
103     private Integer start;
104     private Integer colspan;
105     private String dataMiningCol;
106     private String colId;
107     
108         public String getTableId() {
109                 return tableId;
110         }
111         public void setTableId(String tableId) {
112                 this.tableId = tableId;
113         }
114         public String getDbColName() {
115                 return dbColName;
116         }
117         public void setDbColName(String dbColName) {
118                 this.dbColName = dbColName;
119         }
120         public String getCrossTabValue() {
121                 return crossTabValue;
122         }
123         public void setCrossTabValue(String crossTabValue) {
124                 this.crossTabValue = crossTabValue;
125         }
126         public String getColName() {
127                 return colName;
128         }
129         public void setColName(String colName) {
130                 this.colName = colName;
131         }
132         public String getDisplayName() {
133                 return displayName;
134         }
135         public void setDisplayName(String displayName) {
136                 this.displayName = displayName;
137         }
138         public Integer getDisplayWidth() {
139                 return displayWidth;
140         }
141         public void setDisplayWidth(Integer displayWidth) {
142                 this.displayWidth = displayWidth;
143         }
144         public String getDisplayWidthInPxls() {
145                 return displayWidthInPxls;
146         }
147         public void setDisplayWidthInPxls(String displayWidthInPxls) {
148                 this.displayWidthInPxls = displayWidthInPxls;
149         }
150         public String getPdfDisplayWidthInPxls() {
151                 return pdfDisplayWidthInPxls;
152         }
153         public void setPdfDisplayWidthInPxls(String pdfDisplayWidthInPxls) {
154                 this.pdfDisplayWidthInPxls = pdfDisplayWidthInPxls;
155         }
156         public String getDisplayAlignment() {
157                 return displayAlignment;
158         }
159         public void setDisplayAlignment(String displayAlignment) {
160                 this.displayAlignment = displayAlignment;
161         }
162         public String getDisplayHeaderAlignment() {
163                 return displayHeaderAlignment;
164         }
165         public void setDisplayHeaderAlignment(String displayHeaderAlignment) {
166                 this.displayHeaderAlignment = displayHeaderAlignment;
167         }
168         public int getOrderSeq() {
169                 return orderSeq;
170         }
171         public void setOrderSeq(int orderSeq) {
172                 this.orderSeq = orderSeq;
173         }
174         public boolean isVisible() {
175                 return visible;
176         }
177         public void setVisible(boolean visible) {
178                 this.visible = visible;
179         }
180         public boolean isCalculated() {
181                 return calculated;
182         }
183         public void setCalculated(boolean calculated) {
184                 this.calculated = calculated;
185         }
186         public String getColType() {
187                 return colType;
188         }
189         public void setColType(String colType) {
190                 this.colType = colType;
191         }
192         public String getHyperlinkURL() {
193                 return hyperlinkURL;
194         }
195         public void setHyperlinkURL(String hyperlinkURL) {
196                 this.hyperlinkURL = hyperlinkURL;
197         }
198         public String getHyperlinkType() {
199                 return hyperlinkType;
200         }
201         public void setHyperlinkType(String hyperlinkType) {
202                 this.hyperlinkType = hyperlinkType;
203         }
204         public String getActionImg() {
205                 return actionImg;
206         }
207         public void setActionImg(String actionImg) {
208                 this.actionImg = actionImg;
209         }
210         public Integer getGroupByPos() {
211                 return groupByPos;
212         }
213         public void setGroupByPos(Integer groupByPos) {
214                 this.groupByPos = groupByPos;
215         }
216         public String getSubTotalCustomText() {
217                 return subTotalCustomText;
218         }
219         public void setSubTotalCustomText(String subTotalCustomText) {
220                 this.subTotalCustomText = subTotalCustomText;
221         }
222         public Boolean getHideRepeatedKey() {
223                 return hideRepeatedKey;
224         }
225         public void setHideRepeatedKey(Boolean hideRepeatedKey) {
226                 this.hideRepeatedKey = hideRepeatedKey;
227         }
228         public String getColFormat() {
229                 return colFormat;
230         }
231         public void setColFormat(String colFormat) {
232                 this.colFormat = colFormat;
233         }
234         public boolean isGroupBreak() {
235                 return groupBreak;
236         }
237         public void setGroupBreak(boolean groupBreak) {
238                 this.groupBreak = groupBreak;
239         }
240         public Integer getOrderBySeq() {
241                 return orderBySeq;
242         }
243         public void setOrderBySeq(Integer orderBySeq) {
244                 this.orderBySeq = orderBySeq;
245         }
246         public String getOrderByAscDesc() {
247                 return orderByAscDesc;
248         }
249         public void setOrderByAscDesc(String orderByAscDesc) {
250                 this.orderByAscDesc = orderByAscDesc;
251         }
252         public String getDisplayTotal() {
253                 return displayTotal;
254         }
255         public void setDisplayTotal(String displayTotal) {
256                 this.displayTotal = displayTotal;
257         }
258         public String getColOnChart() {
259                 return colOnChart;
260         }
261         public void setColOnChart(String colOnChart) {
262                 this.colOnChart = colOnChart;
263         }
264         public Integer getChartSeq() {
265                 return chartSeq;
266         }
267         public void setChartSeq(Integer chartSeq) {
268                 this.chartSeq = chartSeq;
269         }
270         public String getChartColor() {
271                 return chartColor;
272         }
273         public void setChartColor(String chartColor) {
274                 this.chartColor = chartColor;
275         }
276         public String getChartLineType() {
277                 return chartLineType;
278         }
279         public void setChartLineType(String chartLineType) {
280                 this.chartLineType = chartLineType;
281         }
282         public Boolean getChartSeries() {
283                 return chartSeries;
284         }
285         public void setChartSeries(Boolean chartSeries) {
286                 this.chartSeries = chartSeries;
287         }
288         public Boolean getIsRangeAxisFilled() {
289                 return isRangeAxisFilled;
290         }
291         public void setIsRangeAxisFilled(Boolean isRangeAxisFilled) {
292                 this.isRangeAxisFilled = isRangeAxisFilled;
293         }
294         public Boolean getCreateInNewChart() {
295                 return createInNewChart;
296         }
297         public void setCreateInNewChart(Boolean createInNewChart) {
298                 this.createInNewChart = createInNewChart;
299         }
300         public String getDrillDownType() {
301                 return drillDownType;
302         }
303         public void setDrillDownType(String drillDownType) {
304                 this.drillDownType = drillDownType;
305         }
306         public Boolean getDrillinPoPUp() {
307                 return drillinPoPUp;
308         }
309         public void setDrillinPoPUp(Boolean drillinPoPUp) {
310                 this.drillinPoPUp = drillinPoPUp;
311         }
312         public String getDrillDownURL() {
313                 return drillDownURL;
314         }
315         public void setDrillDownURL(String drillDownURL) {
316                 this.drillDownURL = drillDownURL;
317         }
318         public String getDrillDownParams() {
319                 return drillDownParams;
320         }
321         public void setDrillDownParams(String drillDownParams) {
322                 this.drillDownParams = drillDownParams;
323         }
324         public String getComment() {
325                 return comment;
326         }
327         public void setComment(String comment) {
328                 this.comment = comment;
329         }
330         public ColFilterList getColFilterList() {
331                 return colFilterList;
332         }
333         public void setColFilterList(ColFilterList colFilterList) {
334                 this.colFilterList = colFilterList;
335         }
336         public String getSemaphoreId() {
337                 return semaphoreId;
338         }
339         public void setSemaphoreId(String semaphoreId) {
340                 this.semaphoreId = semaphoreId;
341         }
342         public String getDbColType() {
343                 return dbColType;
344         }
345         public void setDbColType(String dbColType) {
346                 this.dbColType = dbColType;
347         }
348         public String getChartGroup() {
349                 return chartGroup;
350         }
351         public void setChartGroup(String chartGroup) {
352                 this.chartGroup = chartGroup;
353         }
354         public String getyAxis() {
355                 return yAxis;
356         }
357         public void setyAxis(String yAxis) {
358                 this.yAxis = yAxis;
359         }
360         public String getDependsOnFormField() {
361                 return dependsOnFormField;
362         }
363         public void setDependsOnFormField(String dependsOnFormField) {
364                 this.dependsOnFormField = dependsOnFormField;
365         }
366         public String getNowrap() {
367                 return nowrap;
368         }
369         public void setNowrap(String nowrap) {
370                 this.nowrap = nowrap;
371         }
372         public Integer getIndentation() {
373                 return indentation;
374         }
375         public void setIndentation(Integer indentation) {
376                 this.indentation = indentation;
377         }
378         public Boolean getEnhancedPagination() {
379                 return enhancedPagination;
380         }
381         public void setEnhancedPagination(Boolean enhancedPagination) {
382                 this.enhancedPagination = enhancedPagination;
383         }
384         public Integer getLevel() {
385                 return level;
386         }
387         public void setLevel(Integer level) {
388                 this.level = level;
389         }
390         public Integer getStart() {
391                 return start;
392         }
393         public void setStart(Integer start) {
394                 this.start = start;
395         }
396         public Integer getColspan() {
397                 return colspan;
398         }
399         public void setColspan(Integer colspan) {
400                 this.colspan = colspan;
401         }
402         public String getDataMiningCol() {
403                 return dataMiningCol;
404         }
405         public void setDataMiningCol(String dataMiningCol) {
406                 this.dataMiningCol = dataMiningCol;
407         }
408         public String getColId() {
409                 return colId;
410         }
411         public void setColId(String colId) {
412                 this.colId = colId;
413         }  
414     
415 }*/
416
417 /*class Row {
418         private String displayValue;
419         private String dataType;
420         private String colId;
421         private boolean visible;
422         
423         
424         public boolean isVisible() {
425                 return visible;
426         }
427         public void setVisible(boolean visible) {
428                 this.visible = visible;
429         }
430         public String getDisplayValue() {
431                 return displayValue;
432         }
433         public void setDisplayValue(String displayValue) {
434                 this.displayValue = displayValue;
435         }
436         public String getDataType() {
437                 return dataType;
438         }
439         public void setDataType(String dataType) {
440                 this.dataType = dataType;
441         }
442         public String getColId() {
443                 return colId;
444         }
445         public void setColId(String colId) {
446                 this.colId = colId;
447         }
448         
449         
450 }*/
451 class FormFieldJSON {
452         private String fieldId;
453         private String fieldDisplayName;
454         private String fieldType;
455         private String validationType;
456         private boolean required;
457         //private String defaultValue;
458         
459         private Calendar rangeStartDate;
460         private Calendar rangeEndDate;
461         private String multiSelectListSize;
462         private String helpText;
463         private boolean visible;
464         private boolean triggerOtherFormFields;
465         private ArrayList<IdNameValue> formFieldValues;
466         
467         public String getFieldId() {
468                 return fieldId;
469         }
470         public void setFieldId(String fieldId) {
471                 this.fieldId = fieldId;
472         }
473         public String getFieldDisplayName() {
474                 return fieldDisplayName;
475         }
476         public void setFieldDisplayName(String fieldDisplayName) {
477                 this.fieldDisplayName = fieldDisplayName;
478         }
479         public String getFieldType() {
480                 return fieldType;
481         }
482         public void setFieldType(String fieldType) {
483                 this.fieldType = fieldType;
484         }
485         public String getValidationType() {
486                 return validationType;
487         }
488         public void setValidationType(String validationType) {
489                 this.validationType = validationType;
490         }
491         public boolean isRequired() {
492                 return required;
493         }
494         public void setRequired(boolean required) {
495                 this.required = required;
496         }
497         public Calendar getRangeStartDate() {
498                 return rangeStartDate;
499         }
500         public void setRangeStartDate(Calendar rangeStartDate) {
501                 this.rangeStartDate = rangeStartDate;
502         }
503         public Calendar getRangeEndDate() {
504                 return rangeEndDate;
505         }
506         public void setRangeEndDate(Calendar rangeEndDate) {
507                 this.rangeEndDate = rangeEndDate;
508         }
509         public String getMultiSelectListSize() {
510                 return multiSelectListSize;
511         }
512         public void setMultiSelectListSize(String multiSelectListSize) {
513                 this.multiSelectListSize = multiSelectListSize;
514         }
515         public String getHelpText() {
516                 return helpText;
517         }
518         public void setHelpText(String helpText) {
519                 this.helpText = helpText;
520         }
521         public boolean isVisible() {
522                 return visible;
523         }
524         public void setVisible(boolean visible) {
525                 this.visible = visible;
526         }
527         public boolean isTriggerOtherFormFields() {
528                 return triggerOtherFormFields;
529         }
530         public void setTriggerOtherFormFields(boolean triggerOtherFormFields) {
531                 this.triggerOtherFormFields = triggerOtherFormFields;
532         }
533         public ArrayList<IdNameValue> getFormFieldValues() {
534                 return formFieldValues;
535         }
536         public void setFormFieldValues(ArrayList<IdNameValue> formFieldValues) {
537                 this.formFieldValues = formFieldValues;
538         }
539
540         
541 }
542 public class ReportJSONRuntime {
543
544         private String reportID;
545         private String reportName;
546         private String reportDescr;
547         private String reportTitle;
548         private String reportSubTitle;
549         private boolean allowSchedule;
550         private boolean allowEdit;
551         private ArrayList <FormFieldJSON> formFieldList;
552         private String formfield_comments;
553         private ArrayList<ColumnHeader> reportDataColumns;
554         private ArrayList<Map<String,Object>> reportDataRows;
555         private int totalRows;
556         private int pageSize;
557         private String sqlWhole;
558         private boolean chartAvailable;
559         private boolean chartWizardAvailable;
560         private boolean displayData;
561         private boolean displayForm;
562         private boolean displayExcel;
563         private boolean displayPDF;
564         private String backBtnURL;
565         private String colIdxTobeFreezed;
566         private int numFormCols;
567         private String message;
568         private boolean hideFormFieldsAfterRun;
569         
570         
571         public boolean isChartAvailable() {
572                 return chartAvailable;
573         }
574         public void setChartAvailable(boolean chartAvailable) {
575                 this.chartAvailable = chartAvailable;
576         }
577         public ArrayList<Map<String,Object>> getReportDataRows() {
578                 return reportDataRows;
579         }
580         public void setReportDataRows(ArrayList<Map<String,Object>> reportDataRows) {
581                 this.reportDataRows = reportDataRows;
582         }
583         public String getReportID() {
584                 return reportID;
585         }
586         public void setReportID(String reportID) {
587                 this.reportID = reportID;
588         }
589         public String getReportName() {
590                 return reportName;
591         }
592         public void setReportName(String reportName) {
593                 this.reportName = reportName;
594         }
595         public String getReportDescr() {
596                 return reportDescr;
597         }
598         public void setReportDescr(String reportDescr) {
599                 this.reportDescr = reportDescr;
600         }
601         public String getReportTitle() {
602                 return reportTitle;
603         }
604         public void setReportTitle(String reportTitle) {
605                 this.reportTitle = reportTitle;
606         }
607         public String getReportSubTitle() {
608                 return reportSubTitle;
609         }
610         public void setReportSubTitle(String reportSubTitle) {
611                 this.reportSubTitle = reportSubTitle;
612         }
613         public boolean isAllowSchedule() {
614                 return allowSchedule;
615         }
616         public void setAllowSchedule(boolean allowSchedule) {
617                 this.allowSchedule = allowSchedule;
618         }
619         public ArrayList getFormFieldList() {
620                 return formFieldList;
621         }
622         public void setFormFieldList(ArrayList formFieldList) {
623                 this.formFieldList = formFieldList;
624         }
625         public String getFormfield_comments() {
626                 return formfield_comments;
627         }
628         public void setFormfield_comments(String formfield_comments) {
629                 this.formfield_comments = formfield_comments;
630         }
631         public ArrayList<ColumnHeader> getReportDataColumns() {
632                 return reportDataColumns;
633         }
634         public void setReportDataColumns(ArrayList<ColumnHeader> reportDataColumns) {
635                 this.reportDataColumns = reportDataColumns;
636         }
637
638         public int getTotalRows() {
639                 return totalRows;
640         }
641         public void setTotalRows(int totalRows) {
642                 this.totalRows = totalRows;
643         }
644         public int getPageSize() {
645                 return pageSize;
646         }
647         public void setPageSize(int pageSize) {
648                 this.pageSize = pageSize;
649         }
650         public String getSqlWhole() {
651                 return sqlWhole;
652         }
653         public void setSqlWhole(String sqlWhole) {
654                 this.sqlWhole = sqlWhole;
655         }
656         
657         public boolean isAllowEdit() {
658                 return allowEdit;
659         }
660         public void setAllowEdit(boolean allowEdit) {
661                 this.allowEdit = allowEdit;
662         }
663         public String getBackBtnURL() {
664                 return backBtnURL;
665         }
666         public void setBackBtnURL(String backBtnURL) {
667                 this.backBtnURL = backBtnURL;
668         }
669         public String getColIdxTobeFreezed() {
670                 return colIdxTobeFreezed;
671         }
672         public void setColIdxTobeFreezed(String colIdxTobeFreezed) {
673                 this.colIdxTobeFreezed = colIdxTobeFreezed;
674         }
675         public int getNumFormCols() {
676                 return numFormCols;
677         }
678         public void setNumFormCols(int numFormCols) {
679                 this.numFormCols = numFormCols;
680         }
681         public boolean isDisplayData() {
682                 return displayData;
683         }
684         public void setDisplayData(boolean displayData) {
685                 this.displayData = displayData;
686         }
687         public boolean isDisplayForm() {
688                 return displayForm;
689         }
690         public void setDisplayForm(boolean displayForm) {
691                 this.displayForm = displayForm;
692         }
693         public boolean isDisplayExcel() {
694                 return displayExcel;
695         }
696         public void setDisplayExcel(boolean displayExcel) {
697                 this.displayExcel = displayExcel;
698         }
699         public boolean isDisplayPDF() {
700                 return displayPDF;
701         }
702         public void setDisplayPDF(boolean displayPDF) {
703                 this.displayPDF = displayPDF;
704         }
705         public String getMessage() {
706                 return message;
707         }
708         public void setMessage(String message) {
709                 this.message = message;
710         }
711         public boolean isChartWizardAvailable() {
712                 return chartWizardAvailable;
713         }
714         public void setChartWizardAvailable(boolean chartWizardAvilable) {
715                 this.chartWizardAvailable = chartWizardAvilable;
716         }
717         public boolean isHideFormFieldsAfterRun() {
718                 return hideFormFieldsAfterRun;
719         }
720         public void setHideFormFieldsAfterRun(boolean hideFormFieldsAfterRun) {
721                 this.hideFormFieldsAfterRun = hideFormFieldsAfterRun;
722         }
723         
724    
725
726         
727 }