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

com.icthh.xm.commons.tenantendpoint.provisioner.TenantListProvisioner Maven / Gradle / Ivy

There is a newer version: 4.0.20
Show newest version
package com.icthh.xm.commons.tenantendpoint.provisioner;

import com.icthh.xm.commons.config.client.repository.TenantListRepository;
import com.icthh.xm.commons.gen.model.Tenant;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class TenantListProvisioner implements TenantProvisioner {

    private final TenantListRepository tenantListRepository;

    @Override
    public void createTenant(Tenant tenant) {
        tenantListRepository.addTenant(tenant.getTenantKey());
    }

    @Override
    public void manageTenant(String tenantKey, String state) {
        tenantListRepository.updateTenant(tenantKey, state);
    }

    @Override
    public void deleteTenant(String tenantKey) {
        tenantListRepository.deleteTenant(tenantKey);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy