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