Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/*
* Copyright (c) 2022 Riege Software International. All rights reserved.
* Copyright (c) 2017 Riege Software International. All rights reserved.
* Use is subject to license terms.
*/

package com.riege.jasperservice.model

import java.io.File
import java.util.{Locale, StringJoiner}
import java.util.Locale

object DocumentContext {

Expand Down Expand Up @@ -92,24 +91,4 @@ final case class DocumentContext(
) {

def isCMRWaybill: Boolean = mimeType.startsWith("x-scope/fwd-cmrWaybill-page")

def toCatchMessage(scopeURL: Option[String], formFile: Option[File]): String =
new StringJoiner("\n")
.add("h2. Environment")
.add(s"|| Scope Domain | $domain |")
.add(s"|| Scope URL | ${scopeURL.getOrElse(systemID)} |")
.add(s"|| Scope Version | $version |")
.add(s"|| Organization | $organizationCode {{($organizationOID)}} |")
.add(s"|| Legal Entity | $legalEntityCode {{($legalEntityOID)}} |")
.add(s"|| Branch | $branchCode {{($branchOID)}} |")
.add(s"|| Country | $countryCode {{($countryOID)}} |")
.add(s"|| Locale | $locale |")
.add(s"|| User | $userID |")
.add("")
.add("h2. Printout")
.add(s"|| Entity OID | {{$entityOID}} |")
.add(s"|| MIME Type | $mimeTypeDescription {{($mimeType)}} |")
.add(s"|| Form File | {{${formFile.map(_.getAbsolutePath).getOrElse("unknown")}}} |")
.toString

}
Loading