com.vwo.services.datalocation.DataLocationManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vwo-java-sdk Show documentation
Show all versions of vwo-java-sdk Show documentation
Java library to initiate VWo instance for server side a/b testing
/**
* Copyright 2019-2022 Wingify Software Pvt. Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.vwo.services.datalocation;
import com.vwo.models.response.Settings;
public class DataLocationManager {
private static DataLocationManager instance = null;
private static Settings settings;
public static DataLocationManager getInstance() {
if (instance == null) {
instance = new DataLocationManager();
}
return instance;
}
public void setSettings(Settings settings) {
DataLocationManager.settings = settings;
}
public String getDataLocation(String path) {
try {
return DataLocationManager.settings.getCollectionPrefix() != null ? "/" + DataLocationManager.settings.getCollectionPrefix() + path : path;
} catch (Exception e) {
return path;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy