Search in sources :

Example 11 with Tenant

use of org.bf2.srs.fleetmanager.spi.tenants.model.Tenant in project srs-fleet-manager by bf2fc6cc711aee1a0c2a.

the class MockTenantManagerService method createTenant.

@Timed(value = Constants.TENANT_MANAGER_CREATE_TENANT_TIMER, description = Constants.TENANT_MANAGER_DESCRIPTION)
@Audited
@Override
public Tenant createTenant(TenantManagerConfig tm, CreateTenantRequest req) {
    requireNonNull(tm);
    requireNonNull(req);
    Tenant tenant = Tenant.builder().id(req.getTenantId()).build();
    init(tm);
    testData.get(tm).put(tenant.getId(), tenant);
    return tenant;
}
Also used : Tenant(org.bf2.srs.fleetmanager.spi.tenants.model.Tenant) Audited(org.bf2.srs.fleetmanager.common.operation.auditing.Audited) Timed(io.micrometer.core.annotation.Timed)

Aggregations

TenantNotFoundServiceException (org.bf2.srs.fleetmanager.spi.tenants.TenantNotFoundServiceException)4 Transactional (javax.transaction.Transactional)3 RegistryData (org.bf2.srs.fleetmanager.storage.sqlPanacheImpl.model.RegistryData)3 Timed (io.micrometer.core.annotation.Timed)2 Date (java.util.Date)2 HashMap (java.util.HashMap)2 ConnectorNamespace (org.bf2.cos.fleet.manager.model.ConnectorNamespace)2 ConnectorNamespaceStatus1 (org.bf2.cos.fleet.manager.model.ConnectorNamespaceStatus1)2 ConnectorNamespaceTenant (org.bf2.cos.fleet.manager.model.ConnectorNamespaceTenant)2 Audited (org.bf2.srs.fleetmanager.common.operation.auditing.Audited)2 DeprovisionRegistryTask (org.bf2.srs.fleetmanager.execution.impl.tasks.deprovision.DeprovisionRegistryTask)2 Tenant (org.bf2.srs.fleetmanager.spi.tenants.model.Tenant)2 TenantManagerConfig (org.bf2.srs.fleetmanager.spi.tenants.model.TenantManagerConfig)2 RegistryDeploymentData (org.bf2.srs.fleetmanager.storage.sqlPanacheImpl.model.RegistryDeploymentData)2 Test (org.junit.jupiter.api.Test)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 NewRegistryTenantRequest (io.apicurio.multitenant.api.datamodel.NewRegistryTenantRequest)1 RegistryTenant (io.apicurio.multitenant.api.datamodel.RegistryTenant)1 TenantResource (io.apicurio.multitenant.api.datamodel.TenantResource)1 UpdateRegistryTenantRequest (io.apicurio.multitenant.api.datamodel.UpdateRegistryTenantRequest)1