Skip to content

Commit

Permalink
Fjerner to ubrukte metoder.
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvind-wedoe committed Jun 22, 2021
1 parent 7cf2bf6 commit 5177f68
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/main/kotlin/no/nav/klage/oppgave/service/DokumentService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -108,27 +108,11 @@ class DokumentService(
return safRestClient.getDokument(dokumentInfoId, journalpostId)
}

fun getMainDokument(journalpostId: String): ArkivertDokument {
val dokumentInfoId = fetchDokumentInfoIdForJournalpostAsSystembruker(journalpostId)
return getArkivertDokument(journalpostId, dokumentInfoId.first())
}

fun getMainDokumentAsSaksbehandler(journalpostId: String): ArkivertDokument {
val dokumentInfoId = fetchDokumentInfoIdForJournalpostAsSaksbehandler(journalpostId)
return getArkivertDokument(journalpostId, dokumentInfoId.first())
}

fun getMainDokumentTitle(journalpostId: String): String {
return try {
val journalpost = safGraphQlClient.getJournalpostAsSystembruker(journalpostId)
val dokumentVariant = journalpost?.dokumenter?.filter { harArkivVariantformat(it) }
return dokumentVariant?.first()?.dokumentvarianter?.first()?.filnavn!!
} catch (e: Exception) {
logger.warn("Unable to find journalpost $journalpostId", e)
"Unknown"
}
}

fun getMainDokumentTitleAsSaksbehandler(journalpostId: String): String {
return try {
val journalpost = safGraphQlClient.getJournalpostAsSaksbehandler(journalpostId)
Expand Down

0 comments on commit 5177f68

Please sign in to comment.