-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1314 from navikt/microfrontend-minside
Listens to behandling events, sends message to microfrontend topic wh…
- Loading branch information
Showing
13 changed files
with
311 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package no.nav.klage.oppgave.domain.kafka | ||
|
||
enum class EventType { | ||
KLAGE_VEDTAK, STATS_DVH, BEHANDLING_EVENT | ||
KLAGE_VEDTAK, STATS_DVH, BEHANDLING_EVENT, MINSIDE_MICROFRONTEND_EVENT | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/kotlin/no/nav/klage/oppgave/eventlisteners/MinsideMicrofrontendEventListener.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,29 @@ | ||
package no.nav.klage.oppgave.eventlisteners | ||
|
||
import no.nav.klage.oppgave.domain.events.BehandlingEndretEvent | ||
import no.nav.klage.oppgave.service.MinsideMicrofrontendService | ||
import no.nav.klage.oppgave.util.getLogger | ||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
class MinsideMicrofrontendEventListener( | ||
private val minsideMicrofrontendService: MinsideMicrofrontendService, | ||
) { | ||
|
||
companion object { | ||
@Suppress("JAVA_CLASS_ON_COMPANION") | ||
private val logger = getLogger(javaClass.enclosingClass) | ||
} | ||
|
||
//TODO: Uncomment when minside microfrontend is ready | ||
// @EventListener | ||
fun handleMinsideMicrofrontendEvent(behandlingEndretEvent: BehandlingEndretEvent) { | ||
logger.debug( | ||
"Received BehandlingEndretEvent for behandlingId {} in {}", | ||
behandlingEndretEvent.behandling.id, | ||
::handleMinsideMicrofrontendEvent.name | ||
) | ||
minsideMicrofrontendService.process(behandlingEndretEvent) | ||
logger.debug("Processed BehandlingEndretEvent for behandlingId {}", behandlingEndretEvent.behandling.id) | ||
} | ||
} |
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
Oops, something went wrong.