com.icthh.xm.commons.tenant.TenantContext Maven / Gradle / Ivy
package com.icthh.xm.commons.tenant;
import java.util.Optional;
/**
* The {@link TenantContext} interface.
*/
public interface TenantContext {
boolean isInitialized();
/**
* Gets context tenant object.
*
* @return {@link Tenant} object
*/
Optional getTenant();
/**
* Gets tenant key object.
*
* @return the tenant key object
*/
default Optional getTenantKey() {
return getTenant().map(Tenant::getTenantKey);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy