Made all properties overridable

This commit is contained in:
dankito 2020-09-19 01:54:22 +02:00
parent 7cb19d6f7d
commit 50a5938046
15 changed files with 99 additions and 99 deletions

View File

@ -9,8 +9,8 @@ package net.dankito.banking.fints.messages.datenelemente.implementierte.tan
* Wird das Datenelement TAN-Medium-Klasse mit B (bilateral vereinbart) belegt, so muss im Element Sicherheitsfunktion, kodiert die entsprechende Sicherheitsfunktion in der DEG Verfahrensparameter Zwei-Schritt-Verfahren referenziert werden.
*/
open class TanMedium(
val mediumClass: TanMediumKlasse,
val status: TanMediumStatus,
open val mediumClass: TanMediumKlasse,
open val status: TanMediumStatus,
open val mediumName: String?
) {

View File

@ -6,25 +6,25 @@ import net.dankito.banking.fints.response.segments.JobParameters
open class AccountData(
val accountIdentifier: String,
val subAccountAttribute: String?,
val bankCountryCode: Int,
val bankCode: String,
val iban: String?,
val customerId: String,
val accountType: AccountType?,
val currency: String?, // TODO: may parse to a value object
val accountHolderName: String,
val productName: String?,
val accountLimit: String?,
val allowedJobNames: List<String>,
var allowedJobs: List<JobParameters> = listOf()
open val accountIdentifier: String,
open val subAccountAttribute: String?,
open val bankCountryCode: Int,
open val bankCode: String,
open val iban: String?,
open val customerId: String,
open val accountType: AccountType?,
open val currency: String?, // TODO: may parse to a value object
open val accountHolderName: String,
open val productName: String?,
open val accountLimit: String?,
open val allowedJobNames: List<String>,
open var allowedJobs: List<JobParameters> = listOf()
) {
internal constructor() : this("", null, Laenderkennzeichen.Germany, "", null, "", null, null, "", null, null, listOf()) // for object deserializers
protected val supportedFeatures = mutableSetOf<AccountFeature>()
protected open val supportedFeatures = mutableSetOf<AccountFeature>()
open fun supportsFeature(feature: AccountFeature): Boolean {

View File

@ -10,40 +10,40 @@ import net.dankito.banking.fints.response.segments.PinInfo
open class BankData(
var bankCode: String,
var customerId: String,
var pin: String,
var finTs3ServerAddress: String,
var bic: String,
open var bankCode: String,
open var customerId: String,
open var pin: String,
open var finTs3ServerAddress: String,
open var bic: String,
var bankName: String = "",
var countryCode: Int = Laenderkennzeichen.Germany, // TODO: currently there are only German banks. But change this if ever other countries get supported
var bpdVersion: Int = BPDVersion.VersionNotReceivedYet,
open var bankName: String = "",
open var countryCode: Int = Laenderkennzeichen.Germany, // TODO: currently there are only German banks. But change this if ever other countries get supported
open var bpdVersion: Int = BPDVersion.VersionNotReceivedYet,
var userId: String = customerId,
var customerName: String = "",
var updVersion: Int = UPDVersion.VersionNotReceivedYet,
open var userId: String = customerId,
open var customerName: String = "",
open var updVersion: Int = UPDVersion.VersionNotReceivedYet,
var tanProceduresSupportedByBank: List<TanProcedure> = listOf(),
var tanProceduresAvailableForUser: List<TanProcedure> = listOf(),
var selectedTanProcedure: TanProcedure = TanProcedureNotSelected,
var tanMedia: List<TanMedium> = listOf(),
var changeTanMediumParameters: ChangeTanMediaParameters? = null,
var pinInfo: PinInfo? = null,
open var tanProceduresSupportedByBank: List<TanProcedure> = listOf(),
open var tanProceduresAvailableForUser: List<TanProcedure> = listOf(),
open var selectedTanProcedure: TanProcedure = TanProcedureNotSelected,
open var tanMedia: List<TanMedium> = listOf(),
open var changeTanMediumParameters: ChangeTanMediaParameters? = null,
open var pinInfo: PinInfo? = null,
var supportedLanguages: List<Dialogsprache> = listOf(),
var selectedLanguage: Dialogsprache = Dialogsprache.Default,
var customerSystemId: String = KundensystemID.Anonymous,
var customerSystemStatus: KundensystemStatusWerte = KundensystemStatus.SynchronizingCustomerSystemId,
open var supportedLanguages: List<Dialogsprache> = listOf(),
open var selectedLanguage: Dialogsprache = Dialogsprache.Default,
open var customerSystemId: String = KundensystemID.Anonymous,
open var customerSystemStatus: KundensystemStatusWerte = KundensystemStatus.SynchronizingCustomerSystemId,
/**
* Maximale Anzahl an Geschäftsvorfallsarten, die pro Nachricht zulässig ist.
* Der Wert 0 gibt an, dass keine Restriktionen bzgl. der Anzahl an Geschäftsvorfallsarten bestehen.
*/
var countMaxJobsPerMessage: Int = 0,
open var countMaxJobsPerMessage: Int = 0,
var supportedHbciVersions: List<HbciVersion> = listOf(),
var supportedJobs: List<JobParameters> = listOf()
open var supportedHbciVersions: List<HbciVersion> = listOf(),
open var supportedJobs: List<JobParameters> = listOf()
) {
companion object {
@ -62,7 +62,7 @@ open class BankData(
protected val _accounts = mutableListOf<AccountData>()
protected open val _accounts = mutableListOf<AccountData>()
open val accounts: List<AccountData>
get() = ArrayList(_accounts)

View File

@ -4,9 +4,9 @@ import net.dankito.utils.multiplatform.Date
open class GetTransactionsParameter(
val alsoRetrieveBalance: Boolean = true,
val fromDate: Date? = null,
val toDate: Date? = null,
open val alsoRetrieveBalance: Boolean = true,
open val fromDate: Date? = null,
open val toDate: Date? = null,
/**
* Be aware this is by far not supported by all banks.
@ -15,14 +15,14 @@ open class GetTransactionsParameter(
*
* // TODO: set a parameter in response if maxCountEntries is set but bank doesn't support it.
*/
val maxCountEntries: Int? = null,
val abortIfTanIsRequired: Boolean = false,
val retrievedChunkListener: ((Collection<AccountTransaction>) -> Unit)? = null
open val maxCountEntries: Int? = null,
open val abortIfTanIsRequired: Boolean = false,
open val retrievedChunkListener: ((Collection<AccountTransaction>) -> Unit)? = null
) {
internal var isSettingMaxCountEntriesAllowedByBank = false
internal open var isSettingMaxCountEntriesAllowedByBank = false
internal val maxCountEntriesIfSettingItIsAllowed: Int?
internal open val maxCountEntriesIfSettingItIsAllowed: Int?
get() = if (isSettingMaxCountEntriesAllowedByBank) maxCountEntries else null
}

View File

@ -2,10 +2,10 @@ package net.dankito.banking.fints.model
open class RetrievedAccountData(
val accountData: AccountData,
val balance: Money?,
var bookedTransactions: Collection<AccountTransaction>,
var unbookedTransactions: List<Any>
open val accountData: AccountData,
open val balance: Money?,
open var bookedTransactions: Collection<AccountTransaction>,
open var unbookedTransactions: List<Any>
) {
open fun addBookedTransactions(transactions: List<AccountTransaction>) {

View File

@ -5,13 +5,13 @@ import net.dankito.banking.fints.messages.datenelemente.implementierte.tan.Allow
open class TanProcedure(
val displayName: String,
val securityFunction: Sicherheitsfunktion,
val type: TanProcedureType,
val hhdVersion: HHDVersion? = null,
val maxTanInputLength: Int? = null,
val allowedTanFormat: AllowedTanFormat = AllowedTanFormat.Alphanumeric,
val nameOfTanMediaRequired: Boolean = false
open val displayName: String,
open val securityFunction: Sicherheitsfunktion,
open val type: TanProcedureType,
open val hhdVersion: HHDVersion? = null,
open val maxTanInputLength: Int? = null,
open val allowedTanFormat: AllowedTanFormat = AllowedTanFormat.Alphanumeric,
open val nameOfTanMediaRequired: Boolean = false
) {

View File

@ -6,7 +6,7 @@ import net.dankito.banking.fints.response.Response
open class AddAccountResponse(
response: Response,
val bank: BankData,
val supportsRetrievingTransactionsOfLast90DaysWithoutTan: Boolean = false,
open val bank: BankData,
open val supportsRetrievingTransactionsOfLast90DaysWithoutTan: Boolean = false,
retrievedData: List<RetrievedAccountData> = listOf()
) : GetTransactionsResponse(response, retrievedData)

View File

@ -6,28 +6,28 @@ import net.dankito.banking.fints.response.segments.TanResponse
open class FinTsClientResponse(
val isSuccessful: Boolean,
open val isSuccessful: Boolean, // TODO: rename to successful
val noTanProcedureSelected: Boolean,
open val noTanProcedureSelected: Boolean,
val isStrongAuthenticationRequired: Boolean,
val tanRequired: TanResponse? = null,
open val isStrongAuthenticationRequired: Boolean,
open val tanRequired: TanResponse? = null,
val errorsToShowToUser: List<String> = listOf(),
open val errorsToShowToUser: List<String> = listOf(),
/**
* When a serious error occurred during web request or response parsing.
*/
val errorMessage: String? = null,
open val errorMessage: String? = null,
val userCancelledAction: Boolean = false,
open val userCancelledAction: Boolean = false,
val tanRequiredButWeWereToldToAbortIfSo: Boolean = false,
open val tanRequiredButWeWereToldToAbortIfSo: Boolean = false,
val isJobAllowed: Boolean = true,
val isJobVersionSupported: Boolean = true,
val allowedVersions: List<Int> = listOf(),
val supportedVersions: List<Int> = listOf()
open val isJobAllowed: Boolean = true,
open val isJobVersionSupported: Boolean = true,
open val allowedVersions: List<Int> = listOf(),
open val supportedVersions: List<Int> = listOf()
) {

View File

@ -6,9 +6,9 @@ import net.dankito.banking.fints.response.Response
open class GetTransactionsResponse(
response: Response,
val retrievedData: List<RetrievedAccountData> = listOf(),
open val retrievedData: List<RetrievedAccountData> = listOf(),
/**
* This value is only set if [GetTransactionsParameter.maxCountEntries] was set to tell caller if maxCountEntries parameter has been evaluated or not
*/
var isSettingMaxCountEntriesAllowedByBank: Boolean? = null
open var isSettingMaxCountEntriesAllowedByBank: Boolean? = null
) : FinTsClientResponse(response)

View File

@ -2,11 +2,11 @@ package net.dankito.banking.fints.response.segments
open class JobParameters(
val jobName: String,
val maxCountJobs: Int,
val minimumCountSignatures: Int,
val securityClass: Int?,
segmentString: String // TODO: when serializing / deserializing we don't care for segment string -> remove it
open val jobName: String,
open val maxCountJobs: Int,
open val minimumCountSignatures: Int,
open val securityClass: Int?,
segmentString: String
)
: ReceivedSegment(segmentString) {

View File

@ -5,14 +5,14 @@ import kotlin.jvm.Transient
open class ReceivedSegment(
val segmentId: String,
open val segmentId: String,
@Transient
val segmentNumber: Int,
val segmentVersion: Int,
open val segmentNumber: Int,
open val segmentVersion: Int,
@Transient
val referenceSegmentNumber: Int? = null,
open val referenceSegmentNumber: Int? = null,
@Transient
val segmentString: String
open val segmentString: String
) {

View File

@ -4,8 +4,8 @@ import net.dankito.utils.multiplatform.BigDecimal
open class RetrievedAccountData(
val account: TypedBankAccount,
val balance: BigDecimal?,
var bookedTransactions: Collection<IAccountTransaction>,
var unbookedTransactions: List<Any>
open val account: TypedBankAccount,
open val balance: BigDecimal?,
open val bookedTransactions: Collection<IAccountTransaction>,
open val unbookedTransactions: List<Any>
)

View File

@ -7,9 +7,9 @@ import net.dankito.utils.multiplatform.BigDecimal
open class AddAccountResponse(
isSuccessful: Boolean,
errorToShowToUser: String?,
val customer: TypedCustomer,
val supportsRetrievingTransactionsOfLast90DaysWithoutTan: Boolean = false,
val retrievedData: List<RetrievedAccountData> = listOf(),
open val customer: TypedCustomer,
open val supportsRetrievingTransactionsOfLast90DaysWithoutTan: Boolean = false,
open val retrievedData: List<RetrievedAccountData> = listOf(),
userCancelledAction: Boolean = false
) : BankingClientResponse(isSuccessful, errorToShowToUser, userCancelledAction) {

View File

@ -2,9 +2,9 @@ package net.dankito.banking.ui.model.responses
open class BankingClientResponse(
val isSuccessful: Boolean,
val errorToShowToUser: String?,
val userCancelledAction: Boolean = false // TODO: not implemented in hbci4jBankingClient yet
open val isSuccessful: Boolean,
open val errorToShowToUser: String?,
open val userCancelledAction: Boolean = false // TODO: not implemented in hbci4jBankingClient yet
) {

View File

@ -5,10 +5,10 @@ import net.dankito.banking.ui.model.TypedBankAccount
open class GetTransactionsResponse(
val bankAccount: TypedBankAccount,
open val bankAccount: TypedBankAccount,
isSuccessful: Boolean,
errorToShowToUser: String?,
val retrievedData: List<RetrievedAccountData> = listOf(),
open val retrievedData: List<RetrievedAccountData> = listOf(),
userCancelledAction: Boolean = false,
val tanRequiredButWeWereToldToAbortIfSo: Boolean = false
open val tanRequiredButWeWereToldToAbortIfSo: Boolean = false
) : BankingClientResponse(isSuccessful, errorToShowToUser, userCancelledAction)