All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.taobao.diamond.client.impl.TenantUtil Maven / Gradle / Ivy

There is a newer version: 1.0.9
Show newest version
package com.taobao.diamond.client.impl;

import com.taobao.diamond.utils.StringUtils;

public class TenantUtil {

	static String defaultTenant = "";
	static String userTenant = "";
	
	static {
		defaultTenant = System.getProperty("DIAMOND_DEFAULT_TENANT", "");
		userTenant = System.getProperty("tenant.id", "");
		if (StringUtils.isBlank(userTenant)) {
			userTenant = System.getProperty("acm.namespace", "");
		}
	}

	public static String getDefaultTenant() {
		return defaultTenant;
	}

	public static String getUserTenant() {
		return userTenant;
	}

	public static void setUserTenant(String userTenant) {
		TenantUtil.userTenant = userTenant;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy