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 MSO_POLLING_INTERVAL_MSECS = "mso_polling_interval_msecs";
\r
33 var MSO_MAX_POLLS = "mso_max_polls";
\r
37 _this.asdcBaseUrl = DEFAULT_ASDC_BASE_URL;
\r
38 _this.aaiBaseUrl = DEFAULT_AAI_BASE_URL;
\r
39 _this.msoMaxPollingIntervalMsec = DEFAULT_MSO_MAX_POLLING_INTERVAL_MSEC;
\r
40 _this.msoMaxPolls = DEFAULT_MSO_MAX_POLLS;
\r
41 _this.msoBaseUrl = DEFAULT_MSO_BASE_URL;
\r
45 setAaiBaseUrl : function(aaiBaseUrl) {
\r
46 _this.aaiBaseUrl = aaiBaseUrl;
\r
49 setAsdcBaseUrl : function(asdcBaseUrl) {
\r
50 _this.asdcBaseUrl = asdcBaseUrl;
\r
52 retrieveMsoMaxPollingIntervalMsec : function() {
\r
53 _this.msoMaxPollingIntervalMsec = VIDCONFIGURATION.MSO_POLLING_INTERVAL_MSECS;
\r
54 return _this.msoMaxPollingIntervalMsec;
\r
56 getMsoMaxPollingIntervalMsec : function() {
\r
57 return _this.msoMaxPollingIntervalMsec;
\r
59 setMsoMaxPollingIntervalMsec : function(msoMaxPollingIntervalMsec) {
\r
60 _this.msoMaxPollingIntervalMsec = msoMaxPollingIntervalMsec;
\r
62 retrieveMsoMaxPolls : function() {
\r
63 _this.msoMaxPolls = VIDCONFIGURATION.MSO_MAX_POLLS;
\r
64 return _this.msoMaxPolls;
\r
66 getMsoMaxPolls : function() {
\r
67 return _this.msoMaxPolls;
\r
69 setMsoMaxPolls : function(msoMaxPolls) {
\r
70 _this.msoMaxPolls = msoMaxPolls;
\r
72 getMsoBaseUrl : function() {
\r
75 setMsoBaseUrl : function(msoBaseUrl) {
\r
76 _this.msoBaseUrl = msoBaseUrl;
\r
78 getServerResponseTimeoutMsec : function() {
\r
79 return VIDCONFIGURATION.SERVER_RESPONSE_TIMEOUT_MSECS;
\r
84 appDS2.factory("PropertyService", PropertyService);
\r