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

com.icthh.xm.commons.tenant.TenantContext Maven / Gradle / Ivy

There is a newer version: 4.0.20
Show newest version
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