Skip to content

Commit

Permalink
TFP-4707 kontrakt for behandlingshendelse (#402)
Browse files Browse the repository at this point in the history
* TFP-4707 kontrakt for behandlingshendelse

* One-shot-behandlingDto
  • Loading branch information
jolarsen authored Dec 20, 2022
1 parent 9ee4c18 commit 8a7bc97
Show file tree
Hide file tree
Showing 16 changed files with 510 additions and 4 deletions.
58 changes: 58 additions & 0 deletions fp-topics/hendelser-behandling/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>no.nav.foreldrepenger.kontrakter.topics</groupId>
<artifactId>fp-topics</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<name>FP-TOPICS :: Behandlingshendelser</name>
<description>Kontrakt for behandlingsendringer</description>
<artifactId>hendelser-behandling</artifactId>

<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<scope>provided</scope>
</dependency>

<!-- for å sette opp default ObjectMapper korrekt -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>

<!-- for Bean validation -->
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.el</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package no.nav.vedtak.hendelser.behandling;

public enum Aksjonspunktstatus {
AVBRUTT,
OPPRETTET,
UTFØRT,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package no.nav.vedtak.hendelser.behandling;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;

public class AktørId {

@NotNull
@JsonValue
@Pattern(regexp = "^\\d{13}$")
private String aktørId;

public AktørId() {
}

public AktørId(String aktørId) {
this.aktørId = aktørId;
}


public String getAktørId() {
return aktørId;
}

public void setAktørId(@JsonProperty("aktørId") String aktørId) {
this.aktørId = aktørId;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package no.nav.vedtak.hendelser.behandling;

import java.util.UUID;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

import no.nav.vedtak.hendelser.behandling.v1.BehandlingHendelseV1;

@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
property = "version")
@JsonSubTypes({
@JsonSubTypes.Type(value = BehandlingHendelseV1.class, name = "1.0"),
})
public abstract class BehandlingHendelse {

public abstract UUID getHendelseUuid();

public abstract UUID getBehandlingUuid();

public abstract Kildesystem getKildesystem();

public abstract Hendelse getHendelse();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package no.nav.vedtak.hendelser.behandling;

public enum Behandlingsstatus {
OPPRETTET,
UTREDES,
FATTER_VEDTAK,
IVERKSETTER_VEDTAK,
AVSLUTTET,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package no.nav.vedtak.hendelser.behandling;

public enum Behandlingstype {

FØRSTEGANGS,
REVURDERING,

TILBAKEBETALING,
TILBAKEBETALING_REVURDERING,

KLAGE,
ANKE,
INNSYN,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package no.nav.vedtak.hendelser.behandling;

public enum Behandlingsårsak {
SØKNAD,
PLEIEPENGER,
BERØRT,
ANNET
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package no.nav.vedtak.hendelser.behandling;

public enum Hendelse {
OPPRETTET,
AVSLUTTET,
MANGLERSØKNAD,
PAPIRSØKNAD,
AKSJONSPUNKT,
VENTETILSTAND,
BRUKEROPPGAVE,
ENHET
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package no.nav.vedtak.hendelser.behandling;

public enum Kildesystem {
FPSAK,
FPTILBAKE
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package no.nav.vedtak.hendelser.behandling;

public enum Ytelse {

ENGANGSTØNAD,
FORELDREPENGER,
SVANGERSKAPSPENGER

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package no.nav.vedtak.hendelser.behandling.los;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.UUID;

import javax.validation.constraints.NotNull;

import no.nav.vedtak.hendelser.behandling.Aksjonspunktstatus;
import no.nav.vedtak.hendelser.behandling.AktørId;
import no.nav.vedtak.hendelser.behandling.Behandlingsstatus;
import no.nav.vedtak.hendelser.behandling.Behandlingstype;
import no.nav.vedtak.hendelser.behandling.Behandlingsårsak;
import no.nav.vedtak.hendelser.behandling.Kildesystem;
import no.nav.vedtak.hendelser.behandling.Ytelse;

public record LosBehandlingDto(@NotNull UUID behandlingUuid,
@NotNull Kildesystem kildesystem,
@NotNull String saksnummer,
@NotNull Ytelse ytelse,
@NotNull AktørId aktørId,
@NotNull Behandlingstype behandlingstype,
@NotNull Behandlingsstatus behandlingsstatus,
@NotNull LocalDateTime opprettetTidspunkt,
String behandlendeEnhetId,
LocalDate behandlingsfrist,
String ansvarligSaksbehandlerIdent,
List<LosAksjonspunktDto> aksjonspunkt,
List<Behandlingsårsak> behandlingsårsaker,
boolean faresignaler,
BigDecimal feilutbetaltBeløp,
LocalDate førsteFeilutbetalingDato,
boolean refusjonskrav,
LosForeldrepengerDto foreldrepengerDto) {


public record LosAksjonspunktDto(String definisjon, Aksjonspunktstatus status, String begrunnelse, LocalDateTime fristTid) {
}

public record LosForeldrepengerDto(boolean annenForelderRettEØS, boolean sykdomsvurdering, boolean gradering) {
}

}
Loading

0 comments on commit 8a7bc97

Please sign in to comment.