Merge branch 'feature/RED-10196' into 'main'
RED-10196: Backend adaptions for RM/DM unification See merge request fforesight/database-tenant-commons!33
This commit is contained in:
commit
a860d5da00
@ -3,7 +3,6 @@ include:
|
||||
ref: 'main'
|
||||
file: 'ci-templates/gradle_java.yml'
|
||||
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
@ -18,4 +17,5 @@ deploy:
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_COMMIT_BRANCH =~ /^release/
|
||||
- if: $CI_COMMIT_BRANCH =~ /^feature/
|
||||
- if: $CI_COMMIT_TAG
|
||||
@ -27,7 +27,7 @@ val testContainersVersion = "1.20.1"
|
||||
|
||||
dependencies {
|
||||
api("com.fasterxml.jackson.core:jackson-databind:2.15.2:")
|
||||
api("com.knecon.fforesight:tenant-commons:0.31.0")
|
||||
api("com.knecon.fforesight:tenant-commons:0.31.0-RED10196.0")
|
||||
api("com.zaxxer:HikariCP:5.0.1")
|
||||
api("com.google.guava:guava:32.1.2-jre")
|
||||
api("org.liquibase:liquibase-core:4.20.0")
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.knecon.fforesight.tenantcommons.TenantApplicationType;
|
||||
import com.knecon.fforesight.tenantcommons.TenantProvider;
|
||||
import com.knecon.fforesight.tenantcommons.listener.ITenantEventHandler;
|
||||
import com.knecon.fforesight.tenantcommons.model.TenantCreatedEvent;
|
||||
@ -26,7 +27,10 @@ public class TestTenantProvider implements TenantProvider {
|
||||
@Override
|
||||
public TenantResponse getTenant(String s) {
|
||||
|
||||
return tenants.stream().filter(t -> t.getTenantId().equals(s)).findFirst().orElse(null);
|
||||
return tenants.stream()
|
||||
.filter(t -> t.getTenantId().equals(s))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
|
||||
@ -37,6 +41,17 @@ public class TestTenantProvider implements TenantProvider {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TenantApplicationType getTenantApplicationType(String s) {
|
||||
|
||||
return tenants.stream()
|
||||
.filter(t -> t.getTenantId().equals(s))
|
||||
.findFirst()
|
||||
.map(TenantResponse::getApplicationType)
|
||||
.orElse(TenantApplicationType.RedactManager);
|
||||
}
|
||||
|
||||
|
||||
public void addTenant(TenantResponse tenantResponse) {
|
||||
|
||||
this.tenants.add(tenantResponse);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user