Draft of React test
[clamp.git] / src / main / resources / META-INF / resources / designer / scripts / dataFactory.js
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP CLAMP
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights
6  *                             reserved.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License"); 
9  * you may not use this file except in compliance with the License. 
10  * You may obtain a copy of the License at
11  * 
12  * http://www.apache.org/licenses/LICENSE-2.0
13  * 
14  * Unless required by applicable law or agreed to in writing, software 
15  * distributed under the License is distributed on an "AS IS" BASIS, 
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
17  * See the License for the specific language governing permissions and 
18  * limitations under the License.
19  * ============LICENSE_END============================================
20  * ===================================================================
21  * 
22  */
23
24 app.factory('Datafactory', function () {
25     console.log("/////////Datafactory");
26
27     var dbDataList = [];
28     var checkBoxListActivitytestCase=[];
29     var generateTstMultipleFlag="";
30     var writeFileDataList=[];
31     var fileStreamWriterList=[];
32     var xmlValidatorList=[];
33     var xmlAsserter={};
34     var runtimePythonScriptList=[];
35     var xmlValidatorDecisionLevel=[];
36     var runtimePythonScriptProjectLevelList=[];
37     var commonPythonScriptList=[];
38     var dbToolProjectLevelList=[];
39     var soapClientOption={};
40         var selectedTestCase={};
41         var executeResultset={};
42         var projectPreferenceInfo={};
43         var modelPreferenceInfo ={};
44     
45
46     return {
47         getDbDataList: function () {
48             console.log("getDbDataList");
49             return dbDataList;
50         },
51         setDbDataList: function (dbRequestList) {
52             console.log("setDbDataList");
53                 dbDataList = dbRequestList;
54         },
55         getCheckBoxListActivitytestCase: function () {
56             console.log("getCheckBoxListActivitytestCase");
57             return checkBoxListActivitytestCase;
58         },
59         setCheckBoxListActivitytestCase: function (checkBoxListTestCase) {
60             console.log("setCheckBoxListActivitytestCase");
61                 checkBoxListActivitytestCase = checkBoxListTestCase;
62         },
63         getGenerateTstMultipleFlag: function () {
64             console.log("getGenerateTstMultipleFlag");
65             return generateTstMultipleFlag;
66         },
67         setGenerateTstMultipleFlag: function (generateTstFlag) {
68             console.log("setGenerateTstMultipleFlag");
69                 generateTstMultipleFlag = generateTstFlag;
70         },
71         getWriteFileDataList: function () {
72             console.log("getWriteFileDataList");
73             return writeFileDataList;
74         },
75         setWriteFileDataList: function (writeFileDataListData) {
76             console.log("setWriteFileDataList");
77                 writeFileDataList = writeFileDataListData;
78         },
79         getFileStreamWriterList: function () {
80             console.log("getFileStreamWriterList");
81             return fileStreamWriterList;
82         },
83         setFileStreamWriterList: function (fileStreamWriterData) {
84             console.log("setFileStreamWriterList");
85                 fileStreamWriterList = fileStreamWriterData;
86         },
87         getXmlValidatorList: function () {
88             console.log("getXmlValidatorList");
89             return xmlValidatorList;
90         },
91         setXmlValidatorList: function (xmlValidatorListData) {
92             console.log("setXmlValidatorList");
93                 xmlValidatorList = xmlValidatorListData;
94         },
95         getXmlAsserter: function () {
96             console.log("getXmlAsserter");
97             return xmlAsserter;
98         },
99         setXmlAsserter: function (xmlAsserterData) {
100             console.log("setXmlAsserter");
101                 xmlAsserter = xmlAsserterData;
102         },
103         getRuntimePythonScriptList: function () {
104             console.log("getRuntimePythonScriptList");
105             return runtimePythonScriptList;
106         },
107         setRuntimePythonScriptList: function (runtimePythonScriptListData) {
108             console.log("setRuntimePythonScriptList");
109                 runtimePythonScriptList = runtimePythonScriptListData;
110         },
111         getXmlValidatorDecisionLevel: function(){
112             console.log("getXmlValidatorDecisionLevel");
113                 return xmlValidatorDecisionLevel;
114         },
115         setXmlValidatorDecisionLevel:function(xmlValidatorDecisionLevelData){
116             console.log("setXmlValidatorDecisionLevel");
117                 xmlValidatorDecisionLevel=xmlValidatorDecisionLevelData;
118         },
119         getRuntimePythonScriptProjectLevelList: function () {
120             console.log("getRuntimePythonScriptProjectLevelList");
121             return runtimePythonScriptProjectLevelList;
122         },
123         setRuntimePythonScriptProjectLevelList: function (runtimePythonScriptListData) {
124             console.log("setRuntimePythonScriptProjectLevelList");
125                 runtimePythonScriptProjectLevelList = runtimePythonScriptListData;
126         },
127         
128         getCommonPythonScriptList: function () {
129             console.log("getCommonPythonScriptList");
130             return commonPythonScriptList;
131         },
132         setCommonPythonScriptList: function (commonPythonScriptListData) {
133             console.log("setCommonPythonScriptList");
134                 commonPythonScriptList = commonPythonScriptListData;
135         },
136         
137         getDbToolProjectLevelList: function () {
138             console.log("getDbToolProjectLevelList");
139             return dbToolProjectLevelList;
140         },
141         setDbToolProjectLevelList: function (dbToolProjectLevelListData) {
142             console.log("setDbToolProjectLevelList");
143                 dbToolProjectLevelList = dbToolProjectLevelListData;
144         },
145         getSoapClientOption: function () {
146             console.log("getSoapClientOption");
147             return soapClientOption;
148         },
149         setSoapClientOption: function (soapClientOptionData) {
150             console.log("setSoapClientOption");
151                 soapClientOption = soapClientOptionData;
152         },
153                 getSelectedTestCase: function () {
154             console.log("getSelectedTestCase");
155             return selectedTestCase;
156         },
157         setSelectedTestCase: function (selectedTestCaseData) {
158             console.log("setSelectedTestCase");
159                 selectedTestCase = selectedTestCaseData;
160         },
161         
162         getExecuteResultset: function () {
163             console.log("getExecuteResultset");
164             return executeResultset;
165         },
166         setExecuteResultset: function (executeResultsetData) {
167             console.log("setExecuteResultset");
168                 executeResultset = executeResultsetData;
169         },
170         
171         getProjectPreferenceInfo: function () {
172             console.log("getProjectPreferenceInfo");
173             return projectPreferenceInfo;
174         },
175         setProjectPreferenceInfo: function (projectPreferenceInfoData) {
176             console.log("setProjectPreferenceInfo");
177                 projectPreferenceInfo = projectPreferenceInfoData;
178         },
179         
180         getModelPreferenceInfo: function () {
181             console.log("getModelPreferenceInfo");
182             return modelPreferenceInfo;
183         },
184         setModelPreferenceInfo: function (modelPreferenceInfoData) {
185             console.log("setModelPreferenceInfo");
186                 modelPreferenceInfo = modelPreferenceInfoData;
187         }
188         
189         
190     };
191 });