-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TFP-5193: Flytter over DTO for kommunikasjon mellom abakus <-> fpwspr… (
#396)
- Loading branch information
1 parent
e404d56
commit 57f3322
Showing
7 changed files
with
262 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...s-proxy/src/main/java/no/nav/foreldrepenger/kontrakter/arena/request/ArenaRequestDto.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,19 @@ | ||
package no.nav.foreldrepenger.kontrakter.arena.request; | ||
|
||
import java.time.LocalDate; | ||
|
||
import javax.validation.constraints.NotNull; | ||
import javax.validation.constraints.Pattern; | ||
|
||
public record ArenaRequestDto(@NotNull @Pattern(regexp = "^\\d{11}$", message = "Fnr har ikke gyldig verdi (pattern '{regexp}')") String ident, | ||
LocalDate fom, LocalDate tom) { | ||
|
||
@Override | ||
public String toString() { | ||
return "ArenaRequestDto{" + | ||
"ident='***'" + | ||
", fom=" + fom + | ||
", tom=" + tom + | ||
'}'; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...trakt-fp-ws-proxy/src/main/java/no/nav/foreldrepenger/kontrakter/arena/respons/Beløp.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,18 @@ | ||
package no.nav.foreldrepenger.kontrakter.arena.respons; | ||
|
||
import java.math.BigDecimal; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
|
||
public record Beløp(@JsonValue BigDecimal verdi) { | ||
|
||
@JsonCreator(mode = JsonCreator.Mode.DELEGATING) | ||
public Beløp { // NOSONAR | ||
} | ||
|
||
@Override | ||
public BigDecimal verdi() { | ||
return verdi; | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...t-fp-ws-proxy/src/main/java/no/nav/foreldrepenger/kontrakter/arena/respons/Fagsystem.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,30 @@ | ||
package no.nav.foreldrepenger.kontrakter.arena.respons; | ||
|
||
public enum Fagsystem { | ||
|
||
BISYS, | ||
BIDRAGINNKREVING, | ||
FPSAK, | ||
FPABAKUS, | ||
K9SAK, | ||
VLSP, | ||
TPS, | ||
JOARK, | ||
INFOTRYGD, | ||
ARENA, | ||
INNTEKT, | ||
MEDL, | ||
GOSYS, | ||
GRISEN, | ||
GSAK, | ||
HJE_HEL_ORT, | ||
ENHETSREGISTERET, | ||
AAREGISTERET, | ||
PESYS, | ||
SKANNING, | ||
VENTELONN, | ||
UNNTAK, | ||
ØKONOMI, | ||
ØVRIG, | ||
; | ||
} |
57 changes: 57 additions & 0 deletions
57
...no/nav/foreldrepenger/kontrakter/arena/respons/MeldekortUtbetalingsgrunnlagMeldekort.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,57 @@ | ||
package no.nav.foreldrepenger.kontrakter.arena.respons; | ||
|
||
import java.math.BigDecimal; | ||
import java.time.LocalDate; | ||
|
||
|
||
public record MeldekortUtbetalingsgrunnlagMeldekort(BigDecimal beløp, | ||
BigDecimal dagsats, | ||
LocalDate meldekortFom, | ||
LocalDate meldekortTom, | ||
BigDecimal utbetalingsgrad) { | ||
|
||
public MeldekortUtbetalingsgrunnlagMeldekort(Builder builder) { | ||
this(builder.beløp, builder.dagsats, builder.meldekortFom, builder.meldekortTom, builder.utbetalingsgrad); | ||
} | ||
|
||
public static class Builder { | ||
private BigDecimal beløp; | ||
private BigDecimal dagsats; | ||
private LocalDate meldekortFom; | ||
private LocalDate meldekortTom; | ||
private BigDecimal utbetalingsgrad; | ||
|
||
public Builder() { | ||
} | ||
|
||
public Builder beløp(BigDecimal beløp) { | ||
this.beløp = beløp; | ||
return this; | ||
} | ||
|
||
public Builder dagsats(BigDecimal dagsats) { | ||
this.dagsats = dagsats; | ||
return this; | ||
} | ||
|
||
public Builder meldekortFom(LocalDate meldekortFom) { | ||
this.meldekortFom = meldekortFom; | ||
return this; | ||
} | ||
|
||
public Builder meldekortTom(LocalDate meldekortTom) { | ||
this.meldekortTom = meldekortTom; | ||
return this; | ||
} | ||
|
||
public Builder utbetalingsgrad(BigDecimal utbetalingsgrad) { | ||
this.utbetalingsgrad = utbetalingsgrad; | ||
return this; | ||
} | ||
|
||
public MeldekortUtbetalingsgrunnlagMeldekort build() throws IllegalStateException { | ||
return new MeldekortUtbetalingsgrunnlagMeldekort(this); | ||
} | ||
} | ||
|
||
} |
122 changes: 122 additions & 0 deletions
122
.../java/no/nav/foreldrepenger/kontrakter/arena/respons/MeldekortUtbetalingsgrunnlagSak.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,122 @@ | ||
package no.nav.foreldrepenger.kontrakter.arena.respons; | ||
|
||
import java.time.LocalDate; | ||
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
|
||
public record MeldekortUtbetalingsgrunnlagSak(Fagsystem kilde, | ||
LocalDate kravMottattDato, | ||
List<MeldekortUtbetalingsgrunnlagMeldekort> meldekortene, | ||
String sakStatus, | ||
String saksnummer, | ||
YtelseStatus tilstand, | ||
YtelseType type, | ||
String vedtakStatus, | ||
Beløp vedtaksDagsats, | ||
LocalDate vedtaksPeriodeFom, | ||
LocalDate vedtaksPeriodeTom, | ||
LocalDate vedtattDato) { | ||
|
||
public MeldekortUtbetalingsgrunnlagSak { | ||
meldekortene = Optional.ofNullable(meldekortene).orElse(Collections.emptyList()); | ||
} | ||
|
||
public MeldekortUtbetalingsgrunnlagSak(Builder builder) { | ||
this(builder.kilde, | ||
builder.kravMottattDato, | ||
builder.meldekortene, | ||
builder.sakStatus, | ||
builder.saksnummer, | ||
builder.tilstand, | ||
builder.type, | ||
builder.vedtakStatus, | ||
builder.vedtaksDagsats, | ||
builder.vedtaksPeriodeFom, | ||
builder.vedtaksPeriodeTom, | ||
builder.vedtattDato); | ||
} | ||
|
||
public static class Builder { | ||
private Fagsystem kilde; | ||
private LocalDate kravMottattDato; | ||
private List<MeldekortUtbetalingsgrunnlagMeldekort> meldekortene; | ||
private String sakStatus; | ||
private String saksnummer; | ||
private YtelseStatus tilstand; | ||
private YtelseType type; | ||
private String vedtakStatus; | ||
private Beløp vedtaksDagsats; | ||
private LocalDate vedtaksPeriodeFom; | ||
private LocalDate vedtaksPeriodeTom; | ||
private LocalDate vedtattDato; | ||
|
||
public Builder() { | ||
} | ||
|
||
public Builder kilde(Fagsystem kilde) { | ||
this.kilde = kilde; | ||
return this; | ||
} | ||
|
||
public Builder kravMottattDato(LocalDate kravMottattDato) { | ||
this.kravMottattDato = kravMottattDato; | ||
return this; | ||
} | ||
|
||
public Builder meldekortene(List<MeldekortUtbetalingsgrunnlagMeldekort> meldekortene) { | ||
this.meldekortene = meldekortene; | ||
return this; | ||
} | ||
|
||
public Builder sakStatus(String sakStatus) { | ||
this.sakStatus = sakStatus; | ||
return this; | ||
} | ||
|
||
public Builder saksnummer(String saksnummer) { | ||
this.saksnummer = saksnummer; | ||
return this; | ||
} | ||
|
||
public Builder tilstand(YtelseStatus tilstand) { | ||
this.tilstand = tilstand; | ||
return this; | ||
} | ||
|
||
public Builder type(YtelseType type) { | ||
this.type = type; | ||
return this; | ||
} | ||
|
||
public Builder vedtakStatus(String vedtakStatus) { | ||
this.vedtakStatus = vedtakStatus; | ||
return this; | ||
} | ||
|
||
public Builder vedtaksDagsats(Beløp vedtaksDagsats) { | ||
this.vedtaksDagsats = vedtaksDagsats; | ||
return this; | ||
} | ||
|
||
public Builder vedtaksPeriodeFom(LocalDate vedtaksPeriodeFom) { | ||
this.vedtaksPeriodeFom = vedtaksPeriodeFom; | ||
return this; | ||
} | ||
|
||
public Builder vedtaksPeriodeTom(LocalDate vedtaksPeriodeTom) { | ||
this.vedtaksPeriodeTom = vedtaksPeriodeTom; | ||
return this; | ||
} | ||
|
||
public Builder vedtattDato(LocalDate vedtattDato) { | ||
this.vedtattDato = vedtattDato; | ||
return this; | ||
} | ||
|
||
public MeldekortUtbetalingsgrunnlagSak build() throws IllegalStateException { | ||
return new MeldekortUtbetalingsgrunnlagSak(this); | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...p-ws-proxy/src/main/java/no/nav/foreldrepenger/kontrakter/arena/respons/YtelseStatus.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,9 @@ | ||
package no.nav.foreldrepenger.kontrakter.arena.respons; | ||
|
||
public enum YtelseStatus { | ||
OPPR, | ||
UBEH, | ||
LOP, | ||
AVSLU, | ||
; | ||
} |
7 changes: 7 additions & 0 deletions
7
...-fp-ws-proxy/src/main/java/no/nav/foreldrepenger/kontrakter/arena/respons/YtelseType.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.foreldrepenger.kontrakter.arena.respons; | ||
|
||
public enum YtelseType { | ||
DAG, | ||
AAP, | ||
; | ||
} |