-
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.
Endre til hendelseskonsumenter og forenkle inst-hendelser
- Loading branch information
Showing
58 changed files
with
1,086 additions
and
835 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
11 changes: 11 additions & 0 deletions
11
database/src/main/resources/db/migration/V191__hendelse_konsument_og_hendelse_endringer.sql
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,11 @@ | ||
alter table hendelse_action | ||
RENAME TO hendelse_konsument; | ||
|
||
ALTER TABLE hendelse_konsument | ||
RENAME COLUMN action TO konsumentId; | ||
|
||
-- Dette er mer en safeguard. Skal egentlig ivaretas av domenet. | ||
CREATE UNIQUE INDEX idx_unique_hendelseid_konsumentid | ||
ON hendelse_konsument (hendelseId, konsumentId); | ||
|
||
ALTER TABLE hendelse DROP COLUMN triggetAv; |
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
23 changes: 0 additions & 23 deletions
23
hendelse/domain/src/main/kotlin/no/nav/su/se/bakover/hendelse/domain/HendelseActionRepo.kt
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
hendelse/domain/src/main/kotlin/no/nav/su/se/bakover/hendelse/domain/HendelseSubscriber.kt
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
...se/domain/src/main/kotlin/no/nav/su/se/bakover/hendelse/domain/HendelsekonsumenterRepo.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,31 @@ | ||
package no.nav.su.se.bakover.hendelse.domain | ||
|
||
import no.nav.su.se.bakover.common.persistence.SessionContext | ||
import java.util.UUID | ||
|
||
interface HendelsekonsumenterRepo { | ||
fun lagre( | ||
hendelser: List<HendelseId>, | ||
konsumentId: HendelseskonsumentId, | ||
context: SessionContext, | ||
) | ||
fun lagre( | ||
hendelseId: HendelseId, | ||
konsumentId: HendelseskonsumentId, | ||
context: SessionContext, | ||
) | ||
|
||
fun hentUteståendeSakOgHendelsesIderForKonsumentOgType( | ||
konsumentId: HendelseskonsumentId, | ||
hendelsestype: Hendelsestype, | ||
sx: SessionContext? = null, | ||
limit: Int = 10, | ||
): Map<UUID, List<HendelseId>> | ||
|
||
fun hentHendelseIderForKonsumentOgType( | ||
konsumentId: HendelseskonsumentId, | ||
hendelsestype: Hendelsestype, | ||
sx: SessionContext? = null, | ||
limit: Int = 10, | ||
): List<HendelseId> | ||
} |
10 changes: 10 additions & 0 deletions
10
hendelse/domain/src/main/kotlin/no/nav/su/se/bakover/hendelse/domain/Hendelseskonsument.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,10 @@ | ||
package no.nav.su.se.bakover.hendelse.domain | ||
|
||
/** | ||
* Implementeres av de som skal lytte på hendelser. | ||
* | ||
* @property konsumentId En unik id for denne subscriberen. | ||
*/ | ||
interface Hendelseskonsument { | ||
val konsumentId: HendelseskonsumentId | ||
} |
6 changes: 6 additions & 0 deletions
6
hendelse/domain/src/main/kotlin/no/nav/su/se/bakover/hendelse/domain/HendelseskonsumentId.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,6 @@ | ||
package no.nav.su.se.bakover.hendelse.domain | ||
|
||
@JvmInline | ||
value class HendelseskonsumentId(val value: String) { | ||
override fun toString(): String = value | ||
} |
6 changes: 6 additions & 0 deletions
6
hendelse/domain/src/main/kotlin/no/nav/su/se/bakover/hendelse/domain/Hendelsestype.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,6 @@ | ||
package no.nav.su.se.bakover.hendelse.domain | ||
|
||
@JvmInline | ||
value class Hendelsestype(val value: String) { | ||
override fun toString(): String = value | ||
} |
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
96 changes: 0 additions & 96 deletions
96
...in/no/nav/su/se/bakover/hendelse/infrastructure/persistence/HendelseActionPostgresRepo.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.