-
Notifications
You must be signed in to change notification settings - Fork 1
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
7 changed files
with
170 additions
and
96 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
58 changes: 58 additions & 0 deletions
58
...nd/src/main/java/no/nav/data/etterlevelse/behandling/dto/BehandlingensLivslopRequest.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,58 @@ | ||
package no.nav.data.etterlevelse.behandling.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import no.nav.data.common.validator.RequestElement; | ||
import no.nav.data.common.validator.Validator; | ||
import no.nav.data.etterlevelse.behandling.domain.BehandlingensLivslop; | ||
import no.nav.data.etterlevelse.behandling.domain.BehandlingensLivslopData; | ||
import no.nav.data.etterlevelse.behandling.domain.BehandlingensLivslopFil; | ||
import no.nav.data.etterlevelse.etterlevelseDokumentasjon.dto.EtterlevelseDokumentasjonResponse; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class BehandlingensLivslopRequest implements RequestElement { | ||
|
||
private String id; | ||
|
||
private String etterlevelseDokumentasjonId; | ||
|
||
private String beskrivelse; | ||
|
||
private List<BehandlingensLivslopFil> filer; | ||
|
||
private Boolean update; | ||
|
||
public BehandlingensLivslop convertToBehandlingensLivslop() { | ||
return BehandlingensLivslop.builder() | ||
.id(id != null && !id.isEmpty() ? UUID.fromString(id) : null) | ||
.etterlevelseDokumentasjonId(etterlevelseDokumentasjonId) | ||
.behandlingensLivslopData(BehandlingensLivslopData.builder() | ||
.beskrivelse(beskrivelse) | ||
.filer(filer) | ||
.build()) | ||
.build(); | ||
} | ||
|
||
public void validateFieldValues(Validator<?> validator) { | ||
// FIXME | ||
} | ||
|
||
public Boolean getUpdate() { | ||
return update; | ||
} | ||
|
||
public void mergeInto(BehandlingensLivslop bl) { | ||
bl.setEtterlevelseDokumentasjonId(etterlevelseDokumentasjonId); | ||
bl.getBehandlingensLivslopData().setBeskrivelse(beskrivelse); | ||
bl.getBehandlingensLivslopData().setFiler(filer); | ||
} | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
...d/src/main/java/no/nav/data/etterlevelse/behandling/dto/BehandlingensLivslopResponse.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,37 @@ | ||
package no.nav.data.etterlevelse.behandling.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import no.nav.data.etterlevelse.behandling.domain.BehandlingensLivslop; | ||
import no.nav.data.etterlevelse.behandling.domain.BehandlingensLivslopFil; | ||
import no.nav.data.etterlevelse.etterlevelseDokumentasjon.dto.EtterlevelseDokumentasjonResponse; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class BehandlingensLivslopResponse { | ||
|
||
private UUID id; | ||
|
||
private String etterlevelseDokumentasjonId; | ||
|
||
private String beskrivelse; | ||
|
||
private List<BehandlingensLivslopFil> filer; | ||
|
||
public static BehandlingensLivslopResponse buildFrom(BehandlingensLivslop bl) { | ||
return builder() | ||
.id(bl.getId()) | ||
.etterlevelseDokumentasjonId(bl.getEtterlevelseDokumentasjonId()) | ||
.beskrivelse(bl.getBehandlingensLivslopData().getBeskrivelse()) | ||
.filer(bl.getBehandlingensLivslopData().getFiler()) | ||
.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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,6 @@ public enum SuksesskriterieStatus { | |
UNDER_ARBEID, | ||
OPPFYLT, | ||
IKKE_RELEVANT, | ||
IKKE_OPPFYLT, | ||
IKKE_OPPFYLT; | ||
|
||
} |