2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 app.factory('DictionaryService', function ($http, $q) {
24 getActionPolicyDictionaryData : function(url){
25 console.log("url on the service js: " + url);
26 var url = url+'/ecomp/get_ActionPolicyDictData';
28 .then(function(response) {
29 if (typeof response.data === 'object') {
32 return $q.reject(response.data);
35 }, function(response) {
36 // something went wrong
37 return $q.reject(response.data);
41 getAttributeDictionaryData: function(url) {
42 console.log("url on the service js: " + url);
43 var url = url+'/ecomp/get_AttributeData';
45 .then(function(response) {
46 if (typeof response.data === 'object') {
49 return $q.reject(response.data);
52 }, function(response) {
53 // something went wrong
54 return $q.reject(response.data);
59 getEcompDictionaryData : function(url){
60 console.log("url on the service js: " + url);
61 var url = url+'/ecomp/get_EcompNameData';
63 .then(function(response) {
64 if (typeof response.data === 'object') {
67 return $q.reject(response.data);
70 }, function(response) {
71 // something went wrong
72 return $q.reject(response.data);
77 getBRMSParamDictionaryData : function(url){
78 console.log("url on the service js: " + url);
79 var url = url+'/ecomp/get_BRMSParamData';
81 .then(function(response) {
82 if (typeof response.data === 'object') {
85 return $q.reject(response.data);
88 }, function(response) {
89 // something went wrong
90 return $q.reject(response.data);
95 getDecisionSettingsDictionaryData : function(url){
96 console.log("url on the service js: " + url);
97 var url = url+'/ecomp/get_SettingsDictionaryData';
99 .then(function(response) {
100 if (typeof response.data === 'object') {
101 return response.data;
103 return $q.reject(response.data);
106 }, function(response) {
107 // something went wrong
108 return $q.reject(response.data);
113 getEnforcerDictionaryData : function(url){
114 console.log("url on the service js: " + url);
115 var url = url+'/ecomp/get_EnforcerTypeData';
116 return $http.get(url)
117 .then(function(response) {
118 if (typeof response.data === 'object') {
119 return response.data;
121 return $q.reject(response.data);
124 }, function(response) {
125 // something went wrong
126 return $q.reject(response.data);
131 getDescriptiveDictionaryData : function(url){
132 console.log("url on the service js: " + url);
133 var url = url+'/ecomp/get_DescriptiveScope';
134 return $http.get(url)
135 .then(function(response) {
136 if (typeof response.data === 'object') {
137 return response.data;
139 return $q.reject(response.data);
142 }, function(response) {
143 // something went wrong
144 return $q.reject(response.data);