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

com.icthh.xm.commons.tenant.internal.DefaultTenantContextHolder Maven / Gradle / Ivy

There is a newer version: 4.0.17
Show newest version
package com.icthh.xm.commons.tenant.internal;

import com.icthh.xm.commons.tenant.PrivilegedTenantContext;
import com.icthh.xm.commons.tenant.TenantContext;
import com.icthh.xm.commons.tenant.TenantContextHolder;

/**
 * The {@link DefaultTenantContextHolder} class.
 */
public class DefaultTenantContextHolder implements TenantContextHolder {

    /**
     * {@inheritDoc}
     */
    @Override
    public TenantContext getContext() {
        return new ThreadLocalTenantContext(TenantContextDataHolder.getThreadLocalInstance());
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public PrivilegedTenantContext getPrivilegedContext() {
        return new ThreadLocalPrivilegedTenantContext(TenantContextDataHolder.getThreadLocalInstance());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy