-
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.
- Loading branch information
1 parent
547a0a0
commit 0dc34d3
Showing
8 changed files
with
17 additions
and
74 deletions.
There are no files selected for viewing
12 changes: 4 additions & 8 deletions
12
...n/opptjening/omsorgsopptjening/start/innlesning/barnetrygd/external/pdl/IdentHistorikk.kt
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 |
---|---|---|
@@ -1,21 +1,17 @@ | ||
package no.nav.pensjon.opptjening.omsorgsopptjening.start.innlesning.barnetrygd.external.pdl | ||
|
||
class IdentHistorikk( | ||
private val identer: Set<Ident.FolkeregisterIdent> | ||
private val identer: Set<PdlIdent.FolkeregisterPdlIdent> | ||
) { | ||
fun gjeldende(): Ident.FolkeregisterIdent { | ||
return identer.singleOrNull { it is Ident.FolkeregisterIdent.Gjeldende } | ||
fun gjeldende(): PdlIdent.FolkeregisterPdlIdent { | ||
return identer.singleOrNull { it is PdlIdent.FolkeregisterPdlIdent.Gjeldende } | ||
?: throw IdentHistorikkManglerGjeldendeException() | ||
} | ||
|
||
fun historikk(): Set<Ident.FolkeregisterIdent> { | ||
fun historikk(): Set<PdlIdent.FolkeregisterPdlIdent> { | ||
return identer | ||
} | ||
|
||
fun identifiseresAv(ident: String): Boolean { | ||
return identer.map { it.ident }.contains(ident) | ||
} | ||
|
||
class IdentHistorikkManglerGjeldendeException(msg: String = "Fant ingen gjeldende identer i identhistorikk") : | ||
RuntimeException(msg) | ||
} |
31 changes: 0 additions & 31 deletions
31
...on/opptjening/omsorgsopptjening/start/innlesning/barnetrygd/external/pdl/IdentResponse.kt
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
...tjening/omsorgsopptjening/start/innlesning/barnetrygd/external/pdl/ParallelleSannheter.kt
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
...jon/opptjening/omsorgsopptjening/start/innlesning/barnetrygd/external/pdl/PdlException.kt
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.pensjon.opptjening.omsorgsopptjening.start.innlesning.barnetrygd.external.pdl | ||
|
||
internal class PdlException( | ||
pdlError: PdlError? | ||
) : RuntimeException(pdlError?.message ?: "Unknown error from PDL") { | ||
val code: PdlErrorCode? = pdlError?.extensions?.code | ||
} |
8 changes: 4 additions & 4 deletions
8
...nlesning/barnetrygd/external/pdl/Ident.kt → ...sning/barnetrygd/external/pdl/PdlIdent.kt
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
package no.nav.pensjon.opptjening.omsorgsopptjening.start.innlesning.barnetrygd.external.pdl | ||
|
||
sealed class Ident { | ||
sealed class PdlIdent { | ||
abstract val ident: String | ||
|
||
sealed class FolkeregisterIdent : Ident() { | ||
sealed class FolkeregisterPdlIdent : PdlIdent() { | ||
|
||
data class Gjeldende( | ||
override val ident: String | ||
) : FolkeregisterIdent() | ||
) : FolkeregisterPdlIdent() | ||
|
||
data class Historisk( | ||
override val ident: String | ||
) : FolkeregisterIdent() | ||
) : FolkeregisterPdlIdent() | ||
} | ||
} |
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
21 changes: 0 additions & 21 deletions
21
...orgsopptjening/start/innlesning/barnetrygd/external/pdl/RestTemplateLoggingInterceptor.kt
This file was deleted.
Oops, something went wrong.