37845a606b986a53e84f3983f2ef3769cba7d850
[portal/sdk.git] /
1 appDS2.factory('raptorReportFactory', function($http, $q) {
2         return {
3                 getDefinitionByReportId: function(reportId) {
4                         return $http({
5                                 method: "GET",
6                 url: "report/wizard/retrieve_def_tab_wise_data/"+reportId,                      
7                         }).then(function(response) {
8                                 if (typeof response.data === 'object') {
9                                         return response.data;
10                                 } else {
11                                         return $q.reject("raptorReportFactory: getDefinitionByReportId did not return a valid JSON object.");
12                                 }
13                         }, function(response) {
14                                 // something went wrong
15                                 return $q.reject("raptorReportFactory: getDefinitionByReportId callback failed");
16                         });                     
17                 },                      
18                 getDefinitionByReportId: function(reportId) {
19                         return $http({
20                                 method: "GET",
21                 url: "report/wizard/retrieve_def_tab_wise_data/"+reportId,                      
22                         }).then(function(response) {
23                                 if (typeof response.data === 'object') {
24                                         return response.data;
25                                 } else {
26                                         return $q.reject("raptorReportFactory: getDefinitionByReportId did not return a valid JSON object.");
27                                 }
28                         }, function(response) {
29                                 // something went wrong
30                                 return $q.reject("raptorReportFactory: getDefinitionByReportId callback failed");
31                         });                     
32                 },      
33                 getDefinitionInSession: function() {
34                         return $http({
35                                 method: "GET",
36                 url: "report/wizard/retrieve_def_tab_wise_data/InSession",                      
37                         }).then(function(response) {
38                                 if (typeof response.data === 'object') {
39                                         return response.data;
40                                 } else {
41                                         return $q.reject("raptorReportFactory: getDefinitionInSession did not return a valid JSON object.");
42                                 }
43                         }, function(response) {
44                                 // something went wrong
45                                 return $q.reject("raptorReportFactory: getDefinitionInSession callback failed");
46                         });                     
47                 },                              
48
49                 createNewDefinition: function() {
50                         return $http({
51                                 method: "GET",
52                 url: "report/wizard/retrieve_def_tab_wise_data/Create",                 
53                         }).then(function(response) {
54                                 if (typeof response.data === 'object') {
55                                         return response.data;
56                                 } else {
57                                         return $q.reject("raptorReportFactory: createNewDefinition did not return a valid JSON object.");
58                                 }
59                         }, function(response) {
60                                 // something went wrong
61                                 return $q.reject("raptorReportFactory: createNewDefinition callback failed");
62                         });                     
63                 },
64                 updateDefinition: function(updatedJson,isUpdate) {
65                         return $http({
66                                 method: "POST",
67                 url: (isUpdate?("report/wizard/save_def_tab_data/"+updatedJson.reportId):"report/wizard/save_def_tab_data/Create"),
68                 data: updatedJson                       
69                         }).then(function(response) {
70                                 if (typeof response.data === 'object') {
71                                         return response.data;
72                                 } else {
73                                         return $q.reject("raptorReportFactory: updateDefinition did not return a valid JSON object.");
74                                 }
75                                 return response.data;
76                         }, function(response) {
77                                 // something went wrong
78                                 return $q.reject("raptorReportFactory: updateDefinition callback failed");
79                         });
80                 },
81                 saveNewDefinition: function(updatedJson) {
82                         return $http({
83                                 method: "POST",
84                 url: "report/wizard/save_def_tab_data/InSession",
85                 data: updatedJson                       
86                         }).then(function(response) {
87                                 if (typeof response.data === 'object') {
88                                         return response.data;
89                                 } else {
90                                         return $q.reject("raptorReportFactory: saveNewDefinition did not return a valid JSON object.");
91                                 }
92                         }, function(response) {
93                                 // something went wrong
94                                 return $q.reject("raptorReportFactory: saveNewDefinition callback failed");
95                         });
96                 },              
97                 getSqlInSession: function() {
98                         return $http({
99                                 method: "GET",
100                 url: "report/wizard/retrieve_sql_tab_wise_data/InSession",                      
101                         }).then(function(response) {
102                                 if (typeof response.data === 'object') {
103                                         return response.data;
104                                 } else {
105                                         return $q.reject("raptorReportFactory: getSqlInSession did not return a valid JSON object.");
106                                 }
107                         }, function(response) {
108                                 // something went wrong
109                                 return $q.reject("raptorReportFactory: getSqlInSession callback failed");
110                         });                     
111                 },              
112                 testRunSQL: function(queryJSON) {
113                         return $http({
114                                 method: "POST",
115                 url: "report/wizard/retrieve_data/true",
116                 data: queryJSON                 
117                         }).then(function(response) {
118                                 if (typeof response.data === 'object') {                                        
119                                         return JSON.parse(response.data.data.elements);
120                                 } else {
121                                         return $q.reject("raptorReportFactory: testRunSQL did not return a valid JSON object.");
122                                 }
123                                 return response.data;
124                         }, function(response) {
125                                 // something went wrong
126                                 return $q.reject("raptorReportFactory: testRunSQL callback failed");
127                         });
128                 },              
129                 formFieldVerifySQL: function(queryJSON) {
130                         return $http({
131                                 method: "POST",
132                 url: "report/wizard/retrieve_data/false",
133                 data: queryJSON                 
134                         }).then(function(response) {
135                                 if (typeof response.data === 'object') {
136                                         return JSON.parse(response.data.data.elements);
137                                 } else {
138                                         return $q.reject("raptorReportFactory: formFieldVerifySQL did not return a valid JSON object.");
139                                 }
140                                 return response.data;
141                         }, function(response) {
142                                 // something went wrong
143                                 return $q.reject("raptorReportFactory: formFieldVerifySQL callback failed");                            
144                         });
145                 },
146                 getColumnList: function() {
147                         return $http({
148                                 method: "GET",
149                 url: "report/wizard/list_columns",
150                         }).then(function(response) {
151                                 if (typeof response.data === 'object') {
152                                         return response.data;
153                                 } else {
154                                         return $q.reject("raptorReportFactory: getColumnList did not return a valid JSON object.");
155                                 }
156                                 return response.data;
157                         }, function(response) {
158                                 // something went wrong
159                                 return $q.reject("raptorReportFactory: getColumnList callback failed");                         
160                         });
161                 },
162                 getDrillDownReportList: function() {
163                         return $http({
164                                 method: "GET",
165                 url: "report/wizard/list_drilldown_reports",
166                         }).then(function(response) {
167                                 if (typeof response.data === 'object') {
168                                         return response.data;
169                                 } else {
170                                         return $q.reject("raptorReportFactory: getDrillDownReportList did not return a valid JSON object.");
171                                 }
172                                 return response.data;
173                         }, function(response) {
174                                 // something went wrong
175                                 return $q.reject("raptorReportFactory: getDrillDownReportList callback failed");                                
176                         });
177                 },
178                 getTotalColList: function() {
179                         return $http({
180                                 method: "GET",
181                 url: "report/wizard/list_drilldown_reports",
182                         }).then(function(response) {
183                                 if (typeof response.data === 'object') {
184                                         return response.data;
185                                 } else {
186                                         return $q.reject("raptorReportFactory: getDrillDownReportList did not return a valid JSON object.");
187                                 }
188                                 return response.data;
189                         }, function(response) {
190                                 // something went wrong
191                                 return $q.reject("raptorReportFactory: getDrillDownReportList callback failed");                                
192                         });
193                 },
194                 getTotalForTheColList : function(){
195                         return $http({
196                                 method: "GET",
197                 url: "report/wizard/retrieveTotalForTheColList",
198                         }).then(function(response) {
199                                 if (typeof response.data === 'object') {
200                                         return response.data;
201                                 } else {
202                                         return $q.reject("raptorReportFactory: retrieveTotalForTheColList did not return a valid JSON object.");
203                                 }
204                                 return response.data;
205                         }, function(response) {
206                                 // something went wrong
207                                 return $q.reject("raptorReportFactory: retrieveTotalForTheColList callback failed");                            
208                         });
209                 },
210                 getChildReportFormField: function(reportId) {
211                         return $http({
212                                 method: "GET",
213                 url: "report/wizard/list_child_report_ff/"+reportId,
214                         }).then(function(response) {
215                                 if (typeof response.data === 'object') {
216                                         return response.data;
217                                 } else {
218                                         return $q.reject("raptorReportFactory: getDrillDownReportList did not return a valid JSON object.");
219                                 }
220                                 return response.data;
221                         }, function(response) {
222                                 // something went wrong
223                                 return $q.reject("raptorReportFactory: getDrillDownReportList callback failed");                                
224                         });
225                 },              
226                 getChildReportColumn: function(reportId) {
227                         return $http({
228                                 method: "GET",
229                 url: "report/wizard/list_child_report_col/"+reportId,
230                         }).then(function(response) {
231                                 if (typeof response.data === 'object') {
232                                         return response.data;
233                                 } else {
234                                         return $q.reject("raptorReportFactory: getChildReportColumn did not return a valid JSON object.");
235                                 }
236                                 return response.data;
237                         }, function(response) {
238                                 // something went wrong
239                                 return $q.reject("raptorReportFactory: getChildReportColumn callback failed");                          
240                         });
241                 },              
242                 getColumnEditInfoById: function(columnId){
243                         return $http({
244                                 method: "GET",
245                 url: "report/wizard/retrieve_col_tab_wise_data/"+columnId,
246                         }).then(function(response) {
247                                 if (typeof response.data === 'object') {
248                                         return response.data;
249                                 } else {
250                                         return $q.reject("raptorReportFactory: getColumnEditInfoById did not return a valid JSON object.");
251                                 }
252                         }, function(response) {
253                                 // something went wrong
254                                 return $q.reject("raptorReportFactory:  getColumnEditInfoById callback failed");                                
255                         });                     
256                 },
257                 saveColumnEditInfo: function(updatedColumnJson){
258                         return $http({
259                                 method: "POST",
260                 url: "report/wizard/save_col_tab_data",
261                 data: updatedColumnJson
262                         }).then(function(response) {
263                                 if (typeof response.data === 'object') {
264                                         return response.data;
265                                 } else {
266                                         return $q.reject("raptorReportFactory: saveColumnEditInfo did not return a valid JSON object.");
267                                 }
268                         }, function(response) {
269                                 // something went wrong
270                                 return $q.reject("raptorReportFactory: saveColumnEditInfo callback failed");
271                         });                     
272                 },              
273                 postImportXml: function(importXMLJSON){
274                         return $http({
275                                 method: "POST",
276                 url: "report/wizard/import_report",
277                 data: importXMLJSON
278                         }).then(function(response) {
279                                 if (typeof response.data === 'object') {
280                                         return response.data;
281                                 } else {
282                                         return $q.reject("raptorReportFactory: importXml did not return a valid JSON object.");
283                                 }
284                         }, function(response) {
285                                 // something went wrong
286                                 return $q.reject("raptorReportFactory: importXml callback failed");
287                         });                     
288                 },
289                 copyReportById: function(reportId) {
290                         return $http({
291                                 method: "GET",
292                 url: "report/wizard/copy_report/"+reportId,                     
293                         }).then(function(response) {
294                                 if (typeof response.data === 'object') {
295                                         return response.data;
296                                 } else {
297                                         return $q.reject("raptorReportFactory: copyReportById did not return a valid JSON object.");
298                                 }
299                         }, function(response) {
300                                 // something went wrong
301                                 return $q.reject("raptorReportFactory: copyReportById callback failed");
302                         });                     
303                 },                              
304                 saveFormFieldEditInfo: function(updatedFormFieldJson){
305                         return $http({
306                                 method: "POST",
307                 url: "report/wizard/save_formfield_tab_data",
308                 data: updatedFormFieldJson
309                         }).then(function(response) {
310                                 if (typeof response.data === 'object') {
311                                         return response.data;
312                                 } else {
313                                         return $q.reject("raptorReportFactory: saveFormFieldEditInfo did not return a valid JSON object.");
314                                 }
315                         }, function(response) {
316                                 // something went wrong
317                                 return $q.reject("raptorReportFactory: saveFormFieldEditInfo callback failed");
318                         });                     
319                 },
320                 addFormFieldEditInfo: function(addFormFieldJson){
321                         return $http({
322                                 method: "POST",
323                 url: "report/wizard/add_formfield_tab_data",
324                 data: addFormFieldJson
325                         }).then(function(response) {
326                                 if (typeof response.data === 'object') {
327                                         return response.data;
328                                 } else {
329                                         return $q.reject("raptorReportFactory: saveFormFieldEditInfo did not return a valid JSON object.");
330                                 }
331                         }, function(response) {
332                                 // something went wrong
333                                 return $q.reject("raptorReportFactory: saveFormFieldEditInfo callback failed");
334                         });                     
335                 },
336                 
337                 getFormFieldList: function() {
338                         return $http({
339                                 method: "GET",
340                 url: "report/wizard/list_formfields",                   
341                         }).then(function(response) {
342                                 if (typeof response.data === 'object') {
343                                         return response.data;
344                                 } else {
345                                         return $q.reject("raptorReportFactory: getFormFieldList did not return a valid JSON object.");
346                                 }
347                         }, function(response) {
348                                 // something went wrong
349                                 return $q.reject("raptorReportFactory: getFormFieldList callback failed");                              
350                         });                     
351                 },
352                 getFormFieldEditInfoById: function(fieldId){
353                         return $http({
354                                 method: "GET",
355                 url: "report/wizard/retrieve_form_tab_wise_data/"+fieldId,
356                         }).then(function(response) {
357                                 if (typeof response.data === 'object') {
358                                         return response.data;
359                                 } else {
360                                         return $q.reject("raptorReportFactory: getColumnEditInfoById did not return a valid JSON object.");
361                                 }
362                                 return response.data;
363                         }, function(response) {
364                                 // something went wrong
365                                 return $q.reject("raptorReportFactory: getFormFieldEditInfoById callback failed");                              
366                         });                     
367                 },              
368                 deleteFormFieldById: function(fieldId){
369                         return $http({
370                                 method: "GET",
371                 url: "report/wizard/retrieve_form_tab_wise_data/"+fieldId+"/delete",
372                         }).then(function(response) {
373                                 if (typeof response.data === 'object') {
374                                         return response.data;
375                                 } else {
376                                         return $q.reject("raptorReportFactory: deleteFormFieldById did not return a valid JSON object.");
377                                 }
378                                 return response.data;
379                         }, function(response) {
380                                 // something went wrong
381                                 return $q.reject("raptorReportFactory: deleteFormFieldById callback failed");                           
382                         });                     
383                 },              
384                 getColumns: function() {
385                         return $http
386                                         .get('raptor.htm?action=report.search.execute&r_page=0')
387                                         .then(function(response) {
388                                                 if (typeof response.data === 'object') {
389                                                         return response.data;
390                                                 } else {
391                                                         return $q.reject("raptorReportFactory: getColumns did not return a valid JSON object.");
392                                                 }
393                                         }, function(response) {
394                                                 // something went wrong
395                                                 return $q.reject("raptorReportFactory: getColumns callback failed");                            
396                                         });
397                 },
398                 
399                 getSearchData : function() {
400                         return $http
401                                         .get('raptor.htm?action=report.search.execute&r_page=0')
402                                         .then(function(response) {
403                                                 if (typeof response.data === 'object') {
404                                                         return response.data;
405                                                 } else {
406                                                         return $q.reject("raptorReportFactory: getSearchData did not return a valid JSON object.");
407                                                 }
408                                         }, function(response) {
409                                                 // something went wrong
410                                                 return $q.reject("raptorReportFactory: getSearchData callback failed");                         
411                                         });
412                 },
413                 
414                 getSecurityReportOwnerList: function() {
415                         return $http
416                                         .get('report/wizard/security/retrieveReportOwner')
417                                         .then(function(response) {
418                                                 if (typeof response.data === 'object') {
419                                                         return response.data;
420                                                 } else {
421                                                         return $q.reject("raptorReportFactory: getSecurityReportOwnerList did not return a valid JSON object.");
422                                                 }
423                                         }, function(response) {
424                                                 // something went wrong
425                                                 return $q.reject("raptorReportFactory: getSecurityReportOwnerList callback failed");                            
426                                         });
427                 },
428                 getReportRoleList: function() {
429                         return $http
430                                         .get('report/wizard/security/retrieveReportRoleList')
431                                         .then(function(response) {
432                                                 if (typeof response.data === 'object') {
433                                                         return response.data;
434                                                 } else {
435                                                         return $q.reject("raptorReportFactory: getReportRoleList did not return a valid JSON object.");
436                                                 }
437                                         }, function(response) {
438                                                 // something went wrong
439                                                 return $q.reject("raptorReportFactory: getReportRoleList callback failed");                             
440                                         });
441                 },
442                 getReportSecurityInfo: function() {
443                         return $http
444                                         .get('report/wizard/security/getReportSecurityInfo')
445                                         .then(function(response) {
446                                                 if (typeof response.data === 'object') {
447                                                         return response.data;
448                                                 } else {
449                                                         return $q.reject("raptorReportFactory: getReportSecurityInfo did not return a valid JSON object.");
450                                                 }
451                                         }, function(response) {
452                                                 // something went wrong
453                                                 return $q.reject("raptorReportFactory: getReportSecurityInfo callback failed");                         
454                                         });
455                 },
456                 getReportSecurityUsers: function() {
457                         return $http
458                                         .get('report/wizard/security/retrieveReportUserList')
459                                         .then(function(response) {
460                                                 if (typeof response.data === 'object') {
461                                                         return response.data;
462                                                 } else {
463                                                         return $q.reject("raptorReportFactory: getReportSecurityUsers did not return a valid JSON object.");
464                                                 }
465                                         }, function(response) {
466                                                 // something went wrong
467                                                 return $q.reject("raptorReportFactory: getReportSecurityUsers callback failed");                                
468                                         });
469                 },              
470                 
471                 getReportSecurityRoles: function() {
472                         return $http
473                                         .get('report/wizard/security/getReportSecurityRoles')
474                                         .then(function(response) {
475                                                 if (typeof response.data === 'object') {
476                                                         return response.data;
477                                                 } else {
478                                                         return $q.reject("raptorReportFactory: getReportSecurityUsers did not return a valid JSON object.");
479                                                 }
480                                         }, function(response) {
481                                                 // something went wrong
482                                                 return $q.reject("raptorReportFactory: getReportSecurityUsers callback failed");                                
483                                         });
484                 },              
485                                 
486                 
487                 getSearchDataAtPage : function(pageSearchParameter) {
488                         return $http
489                                         .get('raptor.htm?action=report.search.execute&r_page='+pageSearchParameter)
490                                         .then(function(response) {
491                                                 if (typeof response.data === 'object') {
492                                                         return response.data;
493                                                 } else {
494                                                         return $q.reject("raptorReportFactory: getSearchDataAtPage did not return a valid JSON object.");
495                                                 }
496                                         }, function(response) {
497                                                 // something went wrong
498                                                 return $q.reject("raptorReportFactory: getSearchDataAtPage callback failed");                           
499                                         });
500                 },
501                 setDrillDownPopupOptions: function(drillDownURL,drillDownParams) {
502                         this.drillDownURL = drillDownURL;
503                         this.drillDownParams = drillDownParams;
504                 },      
505                 getReportDeleteStatus : function(deleteUrl) {
506                         return $http.get(deleteUrl).then(function(response) {
507                                 if (typeof response.data === 'object') {
508                                         return response.data;
509                                 } else {
510                                         return $q.reject("raptorReportFactory: getReportDeleteStatus did not return a valid JSON object.");
511                                 }
512
513                         }, function(response) {
514                                 // something went wrong
515                                 return $q.reject("raptorReportFactory: getReportDeleteStatus callback failed");                         
516                         });
517                 },
518                 addReportSecurityUser: function(UserId) {
519                                 return $http({
520                                         method: "POST",
521                         url: "report/security/addReportUser",
522                         data: UserId                    
523                                 }).then(function(response) {
524                                         if (typeof response.data === 'object') {
525                                                 return response.data;
526                                         } else {
527                                                 return $q.reject("raptorReportFactory: addReportSecurityUser did not return a valid JSON object.");
528                                         }
529                                 }, function(response) {
530                                         // something went wrong
531                                         return $q.reject("raptorReportFactory: saveNewDefinition callback failed");
532                                 });
533                         },
534                         removeReportSecurityUser: function(UserId) {
535                                 return $http({
536                                         method: "POST",
537                         url: "report/security/removeReportUser",
538                         data: UserId                    
539                                 }).then(function(response) {
540                                         if (typeof response.data === 'object') {
541                                                 return response.data;
542                                         } else {
543                                                 return $q.reject("raptorReportFactory: removeReportSecurityUser did not return a valid JSON object.");
544                                         }
545                                 }, function(response) {
546                                         // something went wrong
547                                         return $q.reject("raptorReportFactory: saveNewDefinition callback failed");
548                                 });
549                         },
550                         addReportSecurityRole: function(RoleId) {
551                                 return $http({
552                                         method: "POST",
553                         url: "report/security/addReportRole",
554                         data: RoleId                    
555                                 }).then(function(response) {
556                                         if (typeof response.data === 'object') {
557                                                 return response.data;
558                                         } else {
559                                                 return $q.reject("raptorReportFactory: addReportSecurityRole did not return a valid JSON object.");
560                                         }
561                                 }, function(response) {
562                                         // something went wrong
563                                         return $q.reject("raptorReportFactory: saveNewDefinition callback failed");
564                                 });
565                         },
566                         removeReportSecurityRole: function(RoleId) {
567                                 return $http({
568                                         method: "POST",
569                         url: "report/security/removeReportRole",
570                         data: RoleId                    
571                                 }).then(function(response) {
572                                         if (typeof response.data === 'object') {
573                                                 return response.data;
574                                         } else {
575                                                 return $q.reject("raptorReportFactory: removeReportSecurityRole did not return a valid JSON object.");
576                                         }
577                                 }, function(response) {
578                                         // something went wrong
579                                         return $q.reject("raptorReportFactory: removeReportSecurityRole callback failed");
580                                 });
581                         },
582                         updateReportSecurityInfo: function(securityInfo) {
583                                 return $http({
584                                         method: "POST",
585                         url: "report/security/updateReportSecurityInfo",
586                         data: securityInfo                      
587                                 }).then(function(response) {
588                                         if (typeof response.data === 'object') {
589                                                 return response.data;
590                                         } else {
591                                                 return $q.reject("raptorReportFactory: updateReportSecurityInfo did not return a valid JSON object.");
592                                         }
593                                 }, function(response) {
594                                         // something went wrong
595                                         return $q.reject("raptorReportFactory: updateReportSecurityInfo callback failed");
596                                 });
597                         },
598                         getReportLogs: function(reportId) {
599                                 return $http({
600                                         method: "GET",
601                         url: "report/wizard/get_report_log/"+reportId
602                                 }).then(function(response) {
603                                         if (typeof response.data === 'object') {
604                                                 return response.data;
605                                         } else {
606                                                 return $q.reject("raptorReportFactory: getReportLogs did not return a valid JSON object.");
607                                         }
608                                 }, function(response) {
609                                         // something went wrong
610                                         return $q.reject("raptorReportFactory: getReportLogs callback failed");
611                                 });
612                         },
613
614                         toggleUserEditAccess: function(reportUser) {
615                                 var readOnly = reportUser.accessAllowed?"N":"Y"; 
616                                 return $http({
617                                         method: "POST",
618                         url:"report/security/toggleUserEditAccess/"+reportUser.id,
619                         data: readOnly                  
620                                 }).then(function(response) {
621                                         if (typeof response.data === 'object') {
622                                                 return response.data;
623                                         } else {
624                                                 return $q.reject("raptorReportFactory: toggleUserEditAccess did not return a valid JSON object.");
625                                         }
626                                 }, function(response) {
627                                         // something went wrong
628                                         return $q.reject("raptorReportFactory: toggleUserEditAccess callback failed");
629                                 });
630                         },
631                         toggleRoleEditAccess: function(reportRole) {
632                                 var readOnly = reportRole.accessAllowed?"N":"Y"; 
633                                 return $http({
634                                         method: "POST",
635                         url:"report/security/toggleRoleEditAccess/"+reportRole.id,
636                         data: readOnly                  
637                                 }).then(function(response) {
638                                         if (typeof response.data === 'object') {
639                                                 return response.data;
640                                         } else {
641                                                 return $q.reject("raptorReportFactory: toggleRoleEditAccess did not return a valid JSON object.");
642                                         }
643                                 }, function(response) {
644                                         // something went wrong
645                                         return $q.reject("raptorReportFactory: toggleRoleEditAccess callback failed");
646                                 });
647                         },                                              
648                         resetSecurityLoadingCounter: function() {
649                                 this.securityPageApiCounter = 0;
650                                 this.securityPageApiTotalCount = 5;
651                         },      
652                         icrementSecurityLoadingCounter: function() {
653                                 this.securityPageApiCounter = this.securityPageApiCounter+1;
654                         },
655                         checkSecurityLoadingCounter: function() {
656                                 return (this.securityPageApiCounter ==this.securityPageApiTotalCount);
657                         },
658                         getDrillDownParamDef: function(param) {
659                                 return $http({
660                                         method: "GET",
661                         url: "report/wizard/drill_down_param/"+param
662                                 }).then(function(response) {
663                                         if (typeof response.data === 'object') {
664                                                 return response.data;
665                                         } else {
666                                                 return $q.reject("raptorReportFactory: getDrillDownParamDef did not return a valid JSON object.");
667                                         }
668                                 }, function(response) {
669                                         // something went wrong
670                                         return $q.reject("raptorReportFactory: getDrillDownParamDef callback failed");
671                                 });
672                         }
673         };
674 });