-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
254 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
apps/dolly-backend/src/main/java/no/nav/dolly/config/ElasticSearchConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package no.nav.dolly.config; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Profile; | ||
import org.springframework.data.elasticsearch.client.ClientConfiguration; | ||
import org.springframework.data.elasticsearch.client.elc.ReactiveElasticsearchConfiguration; | ||
|
||
import java.time.Duration; | ||
|
||
@Profile({"prod", "dev"}) | ||
@Configuration | ||
public class ElasticSearchConfig extends ReactiveElasticsearchConfiguration { | ||
|
||
@Value("${OPEN_SEARCH_USERNAME}") | ||
private String username; | ||
|
||
@Value("${OPEN_SEARCH_PASSWORD}") | ||
private String password; | ||
|
||
@Value("${OPEN_SEARCH_URI}") | ||
private String uri; | ||
|
||
@Override | ||
public ClientConfiguration clientConfiguration() { | ||
return ClientConfiguration.builder() | ||
.connectedTo(uri.replace("https://", "")) | ||
.usingSsl() | ||
.withBasicAuth(username, password) | ||
.withConnectTimeout(Duration.ofSeconds(10)) | ||
.withSocketTimeout(Duration.ofSeconds(5)) | ||
.build(); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
apps/dolly-backend/src/main/java/no/nav/dolly/config/ElasticSearchLocalConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package no.nav.dolly.config; | ||
|
||
|
||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Profile; | ||
import org.springframework.data.elasticsearch.client.ClientConfiguration; | ||
import org.springframework.data.elasticsearch.client.elc.ReactiveElasticsearchConfiguration; | ||
import org.springframework.data.elasticsearch.config.EnableElasticsearchAuditing; | ||
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories; | ||
|
||
@Profile("local") | ||
@Configuration | ||
@EnableElasticsearchRepositories | ||
@EnableElasticsearchAuditing | ||
public class ElasticSearchLocalConfig extends ReactiveElasticsearchConfiguration { | ||
|
||
@Override | ||
public ClientConfiguration clientConfiguration() { | ||
return ClientConfiguration.builder() | ||
.connectedTo("localhost:9200") | ||
.usingSsl() | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
apps/dolly-backend/src/main/java/no/nav/dolly/elastic/BestillingElasticRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package no.nav.dolly.elastic; | ||
|
||
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; | ||
|
||
public interface BestillingElasticRepository extends ElasticsearchRepository<ElasticBestilling, Long> { | ||
|
||
} |
148 changes: 148 additions & 0 deletions
148
apps/dolly-backend/src/main/java/no/nav/dolly/elastic/ElasticBestilling.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
package no.nav.dolly.elastic; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import no.nav.dolly.domain.resultset.aareg.RsAareg; | ||
import no.nav.dolly.domain.resultset.arenaforvalter.Arenadata; | ||
import no.nav.dolly.domain.resultset.breg.RsBregdata; | ||
import no.nav.dolly.domain.resultset.dokarkiv.RsDokarkiv; | ||
import no.nav.dolly.domain.resultset.histark.RsHistark; | ||
import no.nav.dolly.domain.resultset.inntektsmeldingstub.RsInntektsmelding; | ||
import no.nav.dolly.domain.resultset.inntektstub.InntektMultiplierWrapper; | ||
import no.nav.dolly.domain.resultset.inst.RsInstdata; | ||
import no.nav.dolly.domain.resultset.kontoregister.BankkontoData; | ||
import no.nav.dolly.domain.resultset.krrstub.RsDigitalKontaktdata; | ||
import no.nav.dolly.domain.resultset.medl.RsMedl; | ||
import no.nav.dolly.domain.resultset.pdldata.PdlPersondata; | ||
import no.nav.dolly.domain.resultset.pensjon.PensjonData; | ||
import no.nav.dolly.domain.resultset.sigrunstub.RsLignetInntekt; | ||
import no.nav.dolly.domain.resultset.sigrunstub.RsPensjonsgivendeForFolketrygden; | ||
import no.nav.dolly.domain.resultset.skjerming.RsSkjerming; | ||
import no.nav.dolly.domain.resultset.sykemelding.RsSykemelding; | ||
import no.nav.dolly.domain.resultset.tpsmessagingservice.RsTpsMessaging; | ||
import no.nav.dolly.domain.resultset.udistub.model.RsUdiPerson; | ||
import no.nav.testnav.libs.dto.arbeidsplassencv.v1.ArbeidsplassenCVDTO; | ||
import org.springframework.data.annotation.Id; | ||
import org.springframework.data.domain.Persistable; | ||
import org.springframework.data.elasticsearch.annotations.Document; | ||
import org.springframework.data.elasticsearch.annotations.Field; | ||
|
||
import java.util.ArrayList; | ||
import java.util.HashSet; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import static java.util.Objects.isNull; | ||
|
||
@Document(indexName = "bestilling") | ||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
public class ElasticBestilling implements Persistable<String> { | ||
|
||
@JsonIgnore | ||
@Id | ||
private String id; | ||
|
||
@Field | ||
private Set<String> environments; | ||
@Field | ||
private String malBestillingNavn; | ||
@Field | ||
private PdlPersondata pdldata; | ||
@Field | ||
private RsDigitalKontaktdata krrstub; | ||
@Field | ||
private RsMedl medl; | ||
@Field | ||
private List<RsInstdata> instdata; | ||
@Field | ||
private List<RsAareg> aareg; | ||
@Field | ||
private List<RsLignetInntekt> sigrunstub; | ||
@Field | ||
private List<RsPensjonsgivendeForFolketrygden> sigrunstubPensjonsgivende; | ||
@Field | ||
private InntektMultiplierWrapper inntektstub; | ||
@Field | ||
private Arenadata arenaforvalter; | ||
@Field | ||
private RsUdiPerson udistub; | ||
@Field | ||
private PensjonData pensjonforvalter; | ||
@Field | ||
private RsInntektsmelding inntektsmelding; | ||
@Field | ||
private RsBregdata brregstub; | ||
@Field | ||
private RsDokarkiv dokarkiv; | ||
@Field | ||
private RsHistark histark; | ||
@Field | ||
private RsSykemelding sykemelding; | ||
@Field | ||
private RsTpsMessaging tpsMessaging; | ||
@Field | ||
private BankkontoData bankkonto; | ||
@Field | ||
private RsSkjerming skjerming; | ||
@Field | ||
private ArbeidsplassenCVDTO arbeidsplassenCV; | ||
@Field | ||
private List<String> identer; | ||
|
||
public List<RsAareg> getAareg() { | ||
if (isNull(aareg)) { | ||
aareg = new ArrayList<>(); | ||
} | ||
return aareg; | ||
} | ||
|
||
public Set<String> getEnvironments() { | ||
if (isNull(environments)) { | ||
environments = new HashSet<>(); | ||
} | ||
return environments; | ||
} | ||
|
||
public List<RsLignetInntekt> getSigrunstub() { | ||
if (isNull(sigrunstub)) { | ||
sigrunstub = new ArrayList<>(); | ||
} | ||
return sigrunstub; | ||
} | ||
|
||
public List<RsPensjonsgivendeForFolketrygden> getSigrunstubPensjonsgivende() { | ||
if (isNull(sigrunstubPensjonsgivende)) { | ||
sigrunstubPensjonsgivende = new ArrayList<>(); | ||
} | ||
return sigrunstubPensjonsgivende; | ||
} | ||
|
||
public List<RsInstdata> getInstdata() { | ||
if (isNull(instdata)) { | ||
instdata = new ArrayList<>(); | ||
} | ||
return instdata; | ||
} | ||
|
||
public List<String> getIdenter() { | ||
if (isNull(identer)) { | ||
identer = new ArrayList<>(); | ||
} | ||
return identer; | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
public boolean isNew() { | ||
|
||
return true; | ||
} | ||
} |
40 changes: 0 additions & 40 deletions
40
apps/dolly-backend/src/main/java/no/nav/dolly/properties/CredentialsProps.java
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
apps/dolly-backend/src/main/java/no/nav/dolly/properties/Environment.java
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
apps/dolly-backend/src/main/java/no/nav/dolly/properties/JiraProps.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.