Implemented also logging dialog number
This commit is contained in:
parent
4c70412058
commit
fba6c2a0d5
|
@ -7,6 +7,7 @@ import net.dankito.banking.fints.model.BankData
|
||||||
class MessageContext(
|
class MessageContext(
|
||||||
val jobNumber: Int,
|
val jobNumber: Int,
|
||||||
val dialogNumber: Int,
|
val dialogNumber: Int,
|
||||||
|
val messageNumber: Int,
|
||||||
val bank: BankData,
|
val bank: BankData,
|
||||||
val account: AccountData?
|
val account: AccountData?
|
||||||
)
|
)
|
|
@ -62,7 +62,7 @@ open class MessageLogCollector {
|
||||||
|
|
||||||
|
|
||||||
protected open fun createMessageTraceString(type: MessageLogEntryType, context: MessageContext): String {
|
protected open fun createMessageTraceString(type: MessageLogEntryType, context: MessageContext): String {
|
||||||
return "${twoDigits(context.jobNumber)}_${twoDigits(context.dialogNumber)}_" +
|
return "${twoDigits(context.jobNumber)}_${twoDigits(context.dialogNumber)}_${twoDigits(context.messageNumber)}_" +
|
||||||
"${context.bank.bankCode}_${context.bank.customerId}" +
|
"${context.bank.bankCode}_${context.bank.customerId}" +
|
||||||
"${ context.account?.let { "_${it.accountIdentifier}" } ?: "" } " +
|
"${ context.account?.let { "_${it.accountIdentifier}" } ?: "" } " +
|
||||||
"${getTypeString(type)}:"
|
"${getTypeString(type)}:"
|
||||||
|
|
|
@ -49,6 +49,8 @@ open class JobContext(
|
||||||
|
|
||||||
protected open val jobNumber: Int = ++JobCount
|
protected open val jobNumber: Int = ++JobCount
|
||||||
|
|
||||||
|
protected open var dialogNumber: Int = 0
|
||||||
|
|
||||||
|
|
||||||
open fun startNewDialog(closeDialog: Boolean = true, dialogId: String = DialogContext.InitialDialogId,
|
open fun startNewDialog(closeDialog: Boolean = true, dialogId: String = DialogContext.InitialDialogId,
|
||||||
versionOfSecurityProcedure: VersionDesSicherheitsverfahrens = VersionDesSicherheitsverfahrens.Version_2,
|
versionOfSecurityProcedure: VersionDesSicherheitsverfahrens = VersionDesSicherheitsverfahrens.Version_2,
|
||||||
|
@ -62,6 +64,8 @@ open class JobContext(
|
||||||
|
|
||||||
this._dialogs.add(newDialogContext)
|
this._dialogs.add(newDialogContext)
|
||||||
|
|
||||||
|
this.dialogNumber++
|
||||||
|
|
||||||
return newDialogContext
|
return newDialogContext
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue