2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
23 var PropertyService = function($location, $http, VIDCONFIGURATION ) {
\r
25 var RE = /.*?:\/\/.*?:.*?\/(.*?)\//g;
\r
26 var BASE_PATH = "vid";
\r
27 var DEFAULT_AAI_BASE_URL = "/" + BASE_PATH;
\r
28 var DEFAULT_ASDC_BASE_URL = "asdc";
\r
29 var DEFAULT_MSO_MAX_POLLING_INTERVAL_MSEC = 60000;
\r
30 var DEFAULT_MSO_MAX_POLLS = 10;
\r
31 var DEFAULT_MSO_BASE_URL = "/" + BASE_PATH + "/mso";
\r
32 var DEFAULT_SERVER_RESPONSE_TIMEOUT_MSEC = 60000;
\r
33 var MSO_POLLING_INTERVAL_MSECS = "mso_polling_interval_msecs";
\r
34 var MSO_MAX_POLLS = "mso_max_polls";
\r
38 _this.asdcBaseUrl = DEFAULT_ASDC_BASE_URL;
\r
39 _this.aaiBaseUrl = DEFAULT_AAI_BASE_URL;
\r
40 _this.msoMaxPollingIntervalMsec = DEFAULT_MSO_MAX_POLLING_INTERVAL_MSEC;
\r
41 _this.msoMaxPolls = DEFAULT_MSO_MAX_POLLS;
\r
42 _this.msoBaseUrl = DEFAULT_MSO_BASE_URL;
\r
43 _this.serverResponseTimeoutMsec = DEFAULT_SERVER_RESPONSE_TIMEOUT_MSEC;
\r
47 setAaiBaseUrl : function(aaiBaseUrl) {
\r
48 _this.aaiBaseUrl = aaiBaseUrl;
\r
51 setAsdcBaseUrl : function(asdcBaseUrl) {
\r
52 _this.asdcBaseUrl = asdcBaseUrl;
\r
54 retrieveMsoMaxPollingIntervalMsec : function() {
\r
55 _this.msoMaxPollingIntervalMsec = VIDCONFIGURATION.MSO_POLLING_INTERVAL_MSECS;
\r
56 return _this.msoMaxPollingIntervalMsec;
\r
58 getMsoMaxPollingIntervalMsec : function() {
\r
59 return _this.msoMaxPollingIntervalMsec;
\r
61 setMsoMaxPollingIntervalMsec : function(msoMaxPollingIntervalMsec) {
\r
62 _this.msoMaxPollingIntervalMsec = msoMaxPollingIntervalMsec;
\r
64 retrieveMsoMaxPolls : function() {
\r
65 _this.msoMaxPolls = VIDCONFIGURATION.MSO_MAX_POLLS;
\r
66 return _this.msoMaxPolls;
\r
68 getMsoMaxPolls : function() {
\r
69 return _this.msoMaxPolls;
\r
71 setMsoMaxPolls : function(msoMaxPolls) {
\r
72 _this.msoMaxPolls = msoMaxPolls;
\r
74 getMsoBaseUrl : function() {
\r
77 setMsoBaseUrl : function(msoBaseUrl) {
\r
78 _this.msoBaseUrl = msoBaseUrl;
\r
80 getServerResponseTimeoutMsec : function() {
\r
81 return _this.serverResponseTimeoutMsec;
\r
83 setServerResponseTimeoutMsec : function(serverResponseTimeoutMsec) {
\r
84 _this.serverResponseTimeoutMsec = serverResponseTimeoutMsec;
\r
89 appDS2.factory("PropertyService", PropertyService);
\r