Made properties open
This commit is contained in:
parent
b0b0fa6140
commit
b210c1e7fa
|
@ -9,9 +9,9 @@ import net.codinux.banking.client.model.config.NoArgConstructor
|
||||||
@Suppress("RUNTIME_ANNOTATION_NOT_SUPPORTED")
|
@Suppress("RUNTIME_ANNOTATION_NOT_SUPPORTED")
|
||||||
@NoArgConstructor
|
@NoArgConstructor
|
||||||
open class TanChallenge(
|
open class TanChallenge(
|
||||||
val type: TanChallengeType,
|
open val type: TanChallengeType,
|
||||||
val forAction: ActionRequiringTan,
|
open val forAction: ActionRequiringTan,
|
||||||
val messageToShowToUser: String,
|
open val messageToShowToUser: String,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Identifier of selected TanMethod.
|
* Identifier of selected TanMethod.
|
||||||
|
@ -19,7 +19,7 @@ open class TanChallenge(
|
||||||
* As [availableTanMethods] also contains selected TanMethod, we didn't want to duplicate this object. Use
|
* As [availableTanMethods] also contains selected TanMethod, we didn't want to duplicate this object. Use
|
||||||
* [selectedTanMethod] to get selected TanMethod or iterate over [availableTanMethods] and filter selected one by this id.
|
* [selectedTanMethod] to get selected TanMethod or iterate over [availableTanMethods] and filter selected one by this id.
|
||||||
*/
|
*/
|
||||||
val selectedTanMethodId: String,
|
open val selectedTanMethodId: String,
|
||||||
/**
|
/**
|
||||||
* When adding an account, frontend has no UserAccount object in BankingClientCallback to know which TanMethods are
|
* When adding an account, frontend has no UserAccount object in BankingClientCallback to know which TanMethods are
|
||||||
* available for User.
|
* available for User.
|
||||||
|
@ -28,7 +28,7 @@ open class TanChallenge(
|
||||||
*
|
*
|
||||||
* Therefore i added list with up to date TanMethods here to ensure EnterTanDialog can display user's up to date TanMethods.
|
* Therefore i added list with up to date TanMethods here to ensure EnterTanDialog can display user's up to date TanMethods.
|
||||||
*/
|
*/
|
||||||
val availableTanMethods: List<TanMethod>,
|
open val availableTanMethods: List<TanMethod>,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Identifier of selected TanMedium.
|
* Identifier of selected TanMedium.
|
||||||
|
@ -36,21 +36,21 @@ open class TanChallenge(
|
||||||
* As [availableTanMedia] also contains selected TanMedium, we didn't want to duplicate this object. Use
|
* As [availableTanMedia] also contains selected TanMedium, we didn't want to duplicate this object. Use
|
||||||
* [selectedTanMedium] to get selected TanMedium or iterate over [availableTanMedia] and filter selected one by this medium name.
|
* [selectedTanMedium] to get selected TanMedium or iterate over [availableTanMedia] and filter selected one by this medium name.
|
||||||
*/
|
*/
|
||||||
val selectedTanMediumName: String? = null,
|
open val selectedTanMediumName: String? = null,
|
||||||
val availableTanMedia: List<TanMedium> = emptyList(),
|
open val availableTanMedia: List<TanMedium> = emptyList(),
|
||||||
|
|
||||||
val tanImage: TanImage? = null,
|
open val tanImage: TanImage? = null,
|
||||||
val flickerCode: FlickerCode? = null,
|
open val flickerCode: FlickerCode? = null,
|
||||||
val user: UserAccountViewInfo,
|
open val user: UserAccountViewInfo,
|
||||||
val account: BankAccountViewInfo? = null
|
open val account: BankAccountViewInfo? = null
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@get:JsonIgnore
|
@get:JsonIgnore
|
||||||
val selectedTanMethod: TanMethod
|
open val selectedTanMethod: TanMethod
|
||||||
get() = availableTanMethods.first { it.identifier == selectedTanMethodId }
|
get() = availableTanMethods.first { it.identifier == selectedTanMethodId }
|
||||||
|
|
||||||
@get:JsonIgnore
|
@get:JsonIgnore
|
||||||
val selectedTanMedium: TanMedium?
|
open val selectedTanMedium: TanMedium?
|
||||||
get() = availableTanMedia.firstOrNull { it.mediumName == selectedTanMediumName }
|
get() = availableTanMedia.firstOrNull { it.mediumName == selectedTanMediumName }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,11 @@ import net.codinux.banking.client.model.config.NoArgConstructor
|
||||||
|
|
||||||
@NoArgConstructor
|
@NoArgConstructor
|
||||||
open class TanMethod(
|
open class TanMethod(
|
||||||
val displayName: String,
|
open val displayName: String,
|
||||||
val type: TanMethodType,
|
open val type: TanMethodType,
|
||||||
val identifier: String,
|
open val identifier: String,
|
||||||
val maxTanInputLength: Int? = null,
|
open val maxTanInputLength: Int? = null,
|
||||||
val allowedTanFormat: AllowedTanFormat = AllowedTanFormat.Alphanumeric
|
open val allowedTanFormat: AllowedTanFormat = AllowedTanFormat.Alphanumeric
|
||||||
) {
|
) {
|
||||||
override fun toString() = "$displayName ($type, ${identifier})"
|
override fun toString() = "$displayName ($type, ${identifier})"
|
||||||
}
|
}
|
Loading…
Reference in New Issue