
com.liferay.search.experiences.internal.util.AsahUtil Maven / Gradle / Ivy
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* The contents of this file are subject to the terms of the Liferay Enterprise
* Subscription License ("License"). You may not use this file except in
* compliance with the License. You can obtain a copy of the License by
* contacting Liferay, Inc. See the License for the specific language governing
* permissions and limitations under the License, including but not limited to
* distribution rights of the Software.
*
*
*
*/
package com.liferay.search.experiences.internal.util;
import com.liferay.portal.kernel.util.PrefsPropsUtil;
import com.liferay.portal.kernel.util.Validator;
/**
* @author Eduardo García
*/
public class AsahUtil {
public static String getAsahFaroBackendDataSourceId(long companyId) {
return PrefsPropsUtil.getString(
companyId, "liferayAnalyticsDataSourceId");
}
public static String getAsahFaroBackendSecuritySignature(long companyId) {
return PrefsPropsUtil.getString(
companyId, "liferayAnalyticsFaroBackendSecuritySignature");
}
public static String getAsahFaroBackendURL(long companyId) {
return PrefsPropsUtil.getString(
companyId, "liferayAnalyticsFaroBackendURL");
}
public static String getAsahProjectId(long companyId) {
return PrefsPropsUtil.getString(companyId, "liferayAnalyticsProjectId");
}
public static boolean isAnalyticsEnabled(long companyId) {
if (Validator.isNull(getAsahFaroBackendDataSourceId(companyId)) ||
Validator.isNull(getAsahFaroBackendSecuritySignature(companyId)) ||
Validator.isNull(getAsahFaroBackendURL(companyId))) {
return false;
}
return true;
}
private AsahUtil() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy