Skip to content

Commit

Permalink
f!!- Legger til toStringForJournalpost i OpprettJournalpostRequestBase
Browse files Browse the repository at this point in the history
Co-authored-by: [email protected]
  • Loading branch information
MariamPervez committed Sep 20, 2024
1 parent 2f923d5 commit 12ee1ae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package no.nav.eessi.pensjon.journalforing

import com.fasterxml.jackson.annotation.*
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonRawValue
import com.fasterxml.jackson.core.JsonParser
import com.fasterxml.jackson.core.JsonProcessingException
import com.fasterxml.jackson.core.TreeNode
Expand Down Expand Up @@ -38,9 +39,8 @@ data class OpprettJournalpostRequest(
val tilleggsopplysninger: List<Tilleggsopplysning>? = null,
val tittel: String
): OpprettJournalpostRequestBase() {
override fun toStringForJournalpost(): String {
return "OpprettJournalpostRequest(avsenderMottaker=$avsenderMottaker, behandlingstema=$behandlingstema, bruker=$bruker, dokumenter='$dokumenter', journalfoerendeEnhet=$journalfoerendeEnhet, journalpostType=$journalpostType, sak=$sak, tema=$tema, tilleggsopplysninger=$tilleggsopplysninger, tittel='$tittel')"
}
override fun toStringForJournalpost(): String =
"OpprettJournalpostRequest(avsenderMottaker=$avsenderMottaker, behandlingstema=$behandlingstema, bruker=$bruker, dokumenter='$dokumenter', journalfoerendeEnhet=$journalfoerendeEnhet, journalpostType=$journalpostType, sak=$sak, tema=$tema, tilleggsopplysninger=$tilleggsopplysninger, tittel='$tittel')"
}

data class OpprettJournalpostRequestGjenny(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,8 @@ class JournalpostKlient(

if (request is OpprettJournalpostRequest) {
val logg = request.maskerteVerdier()
secureLog.info("Journalpostrequesten: $logg., /n $headers")
}

logger.info("Journalpostrequesten ljrehtugwlidfgu: ${request.toStringForJournalpost()}, /n $headers")
secureLog.info("Journalpostrequesten: $logg, /n $headers")
} else secureLog.info("Journalpostrequesten: ${request.toStringForJournalpost()}, /n $headers")

val response = journalpostOidcRestTemplate.exchange(
path,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package no.nav.eessi.pensjon.journalforing.journalpost

import no.nav.eessi.pensjon.journalforing.Bruker
import no.nav.eessi.pensjon.models.Tema
import no.nav.eessi.pensjon.utils.mapAnyToJson
import java.util.*

abstract class OpprettJournalpostRequestBase(
Expand All @@ -15,8 +14,4 @@ abstract class OpprettJournalpostRequestBase(
val kanal: String = "EESSI"
val eksternReferanseId: String = UUID.randomUUID().toString()

override fun toString(): String {
return mapAnyToJson(this)
}

}

0 comments on commit 12ee1ae

Please sign in to comment.