Made collections val MutableList to be overridable with a derived collection class
This commit is contained in:
parent
400c13d6a2
commit
045774ff3f
|
@ -44,7 +44,7 @@ open class BankAccess(
|
||||||
* [selectedTanMethod] to get selected TanMethod or iterate over [tanMethods] and filter selected one by this id.
|
* [selectedTanMethod] to get selected TanMethod or iterate over [tanMethods] and filter selected one by this id.
|
||||||
*/
|
*/
|
||||||
var selectedTanMethodIdentifier: String? = null,
|
var selectedTanMethodIdentifier: String? = null,
|
||||||
open var tanMethods: List<TanMethod> = listOf(),
|
open val tanMethods: MutableList<out TanMethod> = mutableListOf(),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Identifier of selected TanMedium.
|
* Identifier of selected TanMedium.
|
||||||
|
@ -53,7 +53,7 @@ open class BankAccess(
|
||||||
* to get selected TanMedium or iterate over [tanMedia] and filter selected one by this medium name.
|
* to get selected TanMedium or iterate over [tanMedia] and filter selected one by this medium name.
|
||||||
*/
|
*/
|
||||||
var selectedTanMediumIdentifier: String? = null,
|
var selectedTanMediumIdentifier: String? = null,
|
||||||
open var tanMedia: List<TanMedium> = listOf(),
|
open val tanMedia: MutableList<out TanMedium> = mutableListOf(),
|
||||||
|
|
||||||
var bankingGroup: BankingGroup? = null,
|
var bankingGroup: BankingGroup? = null,
|
||||||
open var serverAddress: String? = null,
|
open var serverAddress: String? = null,
|
||||||
|
|
|
@ -26,9 +26,9 @@ open class BankAccount(
|
||||||
open var lastAccountUpdateTime: Instant? = null,
|
open var lastAccountUpdateTime: Instant? = null,
|
||||||
var retrievedTransactionsFrom: LocalDate? = null,
|
var retrievedTransactionsFrom: LocalDate? = null,
|
||||||
|
|
||||||
open var bookedTransactions: List<AccountTransaction> = emptyList(),
|
open val bookedTransactions: MutableList<out AccountTransaction> = mutableListOf(),
|
||||||
open var prebookedTransactions: List<PrebookedAccountTransaction> = emptyList(),
|
open val prebookedTransactions: MutableList<out PrebookedAccountTransaction> = mutableListOf(),
|
||||||
open var holdings: List<Holding> = emptyList(),
|
open val holdings: MutableList<out Holding> = mutableListOf(),
|
||||||
|
|
||||||
var userSetDisplayName: String? = null,
|
var userSetDisplayName: String? = null,
|
||||||
var displayIndex: Int = 0,
|
var displayIndex: Int = 0,
|
||||||
|
|
|
@ -144,8 +144,8 @@ open class FinTs4kMapper {
|
||||||
bank.accounts.map { mapAccount(it) }.sortedBy { it.type }
|
bank.accounts.map { mapAccount(it) }.sortedBy { it.type }
|
||||||
.onEachIndexed { index, bankAccount -> bankAccount.displayIndex = index },
|
.onEachIndexed { index, bankAccount -> bankAccount.displayIndex = index },
|
||||||
|
|
||||||
bank.selectedTanMethod?.securityFunction?.code, bank.tanMethods.map { mapTanMethod(it) },
|
bank.selectedTanMethod?.securityFunction?.code, bank.tanMethods.map { mapTanMethod(it) }.toMutableList(),
|
||||||
bank.selectedTanMedium?.mediumName, bank.tanMedia.map { mapTanMedium(it) },
|
bank.selectedTanMedium?.mediumName, bank.tanMedia.map { mapTanMedium(it) }.toMutableList(),
|
||||||
|
|
||||||
info?.bankingGroup ?: getBankingGroup(bank.bankName, bank.bic),
|
info?.bankingGroup ?: getBankingGroup(bank.bankName, bank.bic),
|
||||||
bank.finTsServerAddress,
|
bank.finTsServerAddress,
|
||||||
|
@ -163,8 +163,8 @@ open class FinTs4kMapper {
|
||||||
mapMoney(account.balance),
|
mapMoney(account.balance),
|
||||||
account.serverTransactionsRetentionDays,
|
account.serverTransactionsRetentionDays,
|
||||||
account.lastAccountUpdateTime, account.retrievedTransactionsFrom,
|
account.lastAccountUpdateTime, account.retrievedTransactionsFrom,
|
||||||
bookedTransactions = mapBookedTransactions(account),
|
bookedTransactions = mapBookedTransactions(account).toMutableList(),
|
||||||
holdings = mapHoldings(account.statementOfHoldings, account.currency, account.lastAccountUpdateTime)
|
holdings = mapHoldings(account.statementOfHoldings, account.currency, account.lastAccountUpdateTime).toMutableList()
|
||||||
)
|
)
|
||||||
|
|
||||||
protected open fun mapAccountType(type: net.dankito.banking.client.model.BankAccountType): BankAccountType =
|
protected open fun mapAccountType(type: net.dankito.banking.client.model.BankAccountType): BankAccountType =
|
||||||
|
|
Loading…
Reference in New Issue