Renamed remaining classed from 'fints4java' to 'fints4j'
This commit is contained in:
parent
de8b2d5bd9
commit
9e31180e52
|
@ -11,7 +11,7 @@ interface FinTsClientCallback {
|
||||||
*
|
*
|
||||||
* As almost all FinTS messages need the selected TAN procedure, this method gets called quite early.
|
* As almost all FinTS messages need the selected TAN procedure, this method gets called quite early.
|
||||||
*
|
*
|
||||||
* As a simplification fints4java already suggests which TAN procedure may is the best one for user.
|
* As a simplification fints4k already suggests which TAN procedure may is the best one for user.
|
||||||
*
|
*
|
||||||
* If you do not support an enter tan dialog or if your enter tan dialog supports selecting a TAN procedure, it's
|
* If you do not support an enter tan dialog or if your enter tan dialog supports selecting a TAN procedure, it's
|
||||||
* best returning [suggestedTanProcedure] and to not show an extra select TAN procedure dialog.
|
* best returning [suggestedTanProcedure] and to not show an extra select TAN procedure dialog.
|
||||||
|
|
|
@ -7,7 +7,7 @@ import dagger.Provides
|
||||||
import net.dankito.banking.fints4java.android.RouterAndroid
|
import net.dankito.banking.fints4java.android.RouterAndroid
|
||||||
import net.dankito.banking.fints4java.android.ui.util.CurrentActivityTracker
|
import net.dankito.banking.fints4java.android.ui.util.CurrentActivityTracker
|
||||||
import net.dankito.banking.fints4java.android.util.Base64ServiceAndroid
|
import net.dankito.banking.fints4java.android.util.Base64ServiceAndroid
|
||||||
import net.dankito.banking.fints4javaBankingClientCreator
|
import net.dankito.banking.fints4kBankingClientCreator
|
||||||
import net.dankito.banking.persistence.IBankingPersistence
|
import net.dankito.banking.persistence.IBankingPersistence
|
||||||
import net.dankito.banking.persistence.LuceneBankingPersistence
|
import net.dankito.banking.persistence.LuceneBankingPersistence
|
||||||
import net.dankito.banking.search.IRemitteeSearcher
|
import net.dankito.banking.search.IRemitteeSearcher
|
||||||
|
@ -98,7 +98,7 @@ class BankingModule(private val applicationContext: Context) {
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
fun provideBankingClientCreator(webClient: IWebClient, base64Service: net.dankito.banking.util.IBase64Service) : IBankingClientCreator {
|
fun provideBankingClientCreator(webClient: IWebClient, base64Service: net.dankito.banking.util.IBase64Service) : IBankingClientCreator {
|
||||||
return fints4javaBankingClientCreator(webClient, base64Service)
|
return fints4kBankingClientCreator(webClient, base64Service)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package net.dankito.banking.ui.javafx.dialogs.mainwindow
|
package net.dankito.banking.ui.javafx.dialogs.mainwindow
|
||||||
|
|
||||||
import javafx.scene.control.SplitPane
|
import javafx.scene.control.SplitPane
|
||||||
import net.dankito.banking.fints4javaBankingClientCreator
|
import net.dankito.banking.fints4kBankingClientCreator
|
||||||
import net.dankito.banking.persistence.BankingPersistenceJson
|
import net.dankito.banking.persistence.BankingPersistenceJson
|
||||||
import net.dankito.banking.ui.javafx.RouterJavaFx
|
import net.dankito.banking.ui.javafx.RouterJavaFx
|
||||||
import net.dankito.banking.ui.javafx.controls.AccountTransactionsView
|
import net.dankito.banking.ui.javafx.controls.AccountTransactionsView
|
||||||
|
@ -25,7 +25,7 @@ class MainWindow : View(messages["application.title"]) {
|
||||||
|
|
||||||
private val indexFolder = File(dataFolder, "index")
|
private val indexFolder = File(dataFolder, "index")
|
||||||
|
|
||||||
private val presenter = BankingPresenter(fints4javaBankingClientCreator(OkHttpWebClient(), Base64ServiceJava8()),
|
private val presenter = BankingPresenter(fints4kBankingClientCreator(OkHttpWebClient(), Base64ServiceJava8()),
|
||||||
LuceneBankFinder(indexFolder), databaseFolder, dataFolder, BankingPersistenceJson(File(databaseFolder, "accounts.json")), BankIconFinder(), RouterJavaFx())
|
LuceneBankFinder(indexFolder), databaseFolder, dataFolder, BankingPersistenceJson(File(databaseFolder, "accounts.json")), BankIconFinder(), RouterJavaFx())
|
||||||
// private val presenter = BankingPresenter(hbci4jBankingClientCreator(), LuceneBankFinder(indexFolder), databaseFolder,
|
// private val presenter = BankingPresenter(hbci4jBankingClientCreator(), LuceneBankFinder(indexFolder), databaseFolder,
|
||||||
// dataFolder, BankingPersistenceJson(File(databaseFolder, "accounts.json")), BankIconFinder(), RouterJavaFx())
|
// dataFolder, BankingPersistenceJson(File(databaseFolder, "accounts.json")), BankIconFinder(), RouterJavaFx())
|
||||||
|
|
|
@ -8,7 +8,7 @@ import java.io.File
|
||||||
interface IBankingClientCreator {
|
interface IBankingClientCreator {
|
||||||
|
|
||||||
fun createClient(
|
fun createClient(
|
||||||
bankInfo: BankInfo, // TODO: create own value object to get rid off fints4java dependency
|
bankInfo: BankInfo, // TODO: create own value object to get rid off fints4k dependency
|
||||||
customerId: String,
|
customerId: String,
|
||||||
pin: String,
|
pin: String,
|
||||||
dataFolder: File,
|
dataFolder: File,
|
||||||
|
|
|
@ -139,7 +139,7 @@ open class BankingPresenter(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: move BankInfo out of fints4javaLib
|
// TODO: move BankInfo out of fints4k
|
||||||
open fun addAccountAsync(bankInfo: BankInfo, customerId: String, pin: String, callback: (AddAccountResponse) -> Unit) {
|
open fun addAccountAsync(bankInfo: BankInfo, customerId: String, pin: String, callback: (AddAccountResponse) -> Unit) {
|
||||||
|
|
||||||
val newClient = bankingClientCreator.createClient(bankInfo, customerId, pin, databaseFolder, threadPool, this.callback)
|
val newClient = bankingClientCreator.createClient(bankInfo, customerId, pin, databaseFolder, threadPool, this.callback)
|
||||||
|
|
|
@ -7,7 +7,7 @@ import org.slf4j.LoggerFactory
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
|
|
||||||
open class FlickerCodeAnimator { // TODO: move to fints4javaLib
|
open class FlickerCodeAnimator { // TODO: move to fints44
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val MinFrequency = 2
|
const val MinFrequency = 2
|
||||||
|
|
|
@ -24,7 +24,7 @@ import org.slf4j.LoggerFactory
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
|
|
||||||
open class fints4javaBankingClient(
|
open class fints4kBankingClient(
|
||||||
bankInfo: BankInfo,
|
bankInfo: BankInfo,
|
||||||
customerId: String,
|
customerId: String,
|
||||||
pin: String,
|
pin: String,
|
||||||
|
@ -37,13 +37,13 @@ open class fints4javaBankingClient(
|
||||||
) : IBankingClient {
|
) : IBankingClient {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val fints4javaClientDataFilename = "fints4javaClientData.json"
|
val fints4kClientDataFilename = "fints4kClientData.json"
|
||||||
|
|
||||||
private val log = LoggerFactory.getLogger(fints4javaBankingClient::class.java)
|
private val log = LoggerFactory.getLogger(fints4kBankingClient::class.java)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected val mapper = net.dankito.banking.mapper.fints4javaModelMapper()
|
protected val mapper = net.dankito.banking.mapper.fints4kModelMapper()
|
||||||
|
|
||||||
protected val bankDataMapper = BankDataMapper()
|
protected val bankDataMapper = BankDataMapper()
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ open class fints4javaBankingClient(
|
||||||
|
|
||||||
|
|
||||||
override fun restoreData() {
|
override fun restoreData() {
|
||||||
val deserializedCustomer = serializer.deserializeObject(getFints4javaClientDataFile(), CustomerData::class.java)
|
val deserializedCustomer = serializer.deserializeObject(getFints4kClientDataFile(), CustomerData::class.java)
|
||||||
|
|
||||||
deserializedCustomer?.let {
|
deserializedCustomer?.let {
|
||||||
mapper.updateCustomer(customer, deserializedCustomer)
|
mapper.updateCustomer(customer, deserializedCustomer)
|
||||||
|
@ -142,14 +142,14 @@ open class fints4javaBankingClient(
|
||||||
|
|
||||||
protected open fun saveData() {
|
protected open fun saveData() {
|
||||||
try {
|
try {
|
||||||
serializer.serializeObject(customer, getFints4javaClientDataFile())
|
serializer.serializeObject(customer, getFints4kClientDataFile())
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
log.error("Could not save customer data for $customer", e)
|
log.error("Could not save customer data for $customer", e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected open fun getFints4javaClientDataFile(): File {
|
protected open fun getFints4kClientDataFile(): File {
|
||||||
return File(dataFolder, "${bank.bankCode}_${customer.customerId}_$fints4javaClientDataFilename")
|
return File(dataFolder, "${bank.bankCode}_${customer.customerId}_$fints4kClientDataFilename")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -11,7 +11,7 @@ import net.dankito.utils.web.client.IWebClient
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
|
|
||||||
open class fints4javaBankingClientCreator(
|
open class fints4kBankingClientCreator(
|
||||||
protected val webClient: IWebClient,
|
protected val webClient: IWebClient,
|
||||||
protected val base64Service: IBase64Service
|
protected val base64Service: IBase64Service
|
||||||
) : IBankingClientCreator {
|
) : IBankingClientCreator {
|
||||||
|
@ -25,7 +25,7 @@ open class fints4javaBankingClientCreator(
|
||||||
callback: BankingClientCallback
|
callback: BankingClientCallback
|
||||||
): IBankingClient {
|
): IBankingClient {
|
||||||
|
|
||||||
return fints4javaBankingClient(bankInfo, customerId, pin, dataFolder, webClient, UiCommonBase64ServiceWrapper(base64Service), threadPool, callback)
|
return fints4kBankingClient(bankInfo, customerId, pin, dataFolder, webClient, UiCommonBase64ServiceWrapper(base64Service), threadPool, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -16,7 +16,7 @@ import net.dankito.utils.exception.ExceptionHelper
|
||||||
import java.math.BigDecimal
|
import java.math.BigDecimal
|
||||||
|
|
||||||
|
|
||||||
open class fints4javaModelMapper {
|
open class fints4kModelMapper {
|
||||||
|
|
||||||
|
|
||||||
private val exceptionHelper = ExceptionHelper()
|
private val exceptionHelper = ExceptionHelper()
|
||||||
|
@ -79,7 +79,7 @@ open class fints4javaModelMapper {
|
||||||
return account
|
return account
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: move to a fints4java internal mapper
|
// TODO: move to a fints4k internal mapper
|
||||||
open fun updateCustomer(customer: CustomerData, updatedCustomer: CustomerData) {
|
open fun updateCustomer(customer: CustomerData, updatedCustomer: CustomerData) {
|
||||||
customer.pin = updatedCustomer.pin
|
customer.pin = updatedCustomer.pin
|
||||||
customer.name = updatedCustomer.name
|
customer.name = updatedCustomer.name
|
||||||
|
@ -124,7 +124,7 @@ open class fints4javaModelMapper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: move to a fints4java internal mapper
|
// TODO: move to a fints4k internal mapper
|
||||||
open fun updateBankAccounts(customer: CustomerData, updatedAccounts: List<AccountData>) {
|
open fun updateBankAccounts(customer: CustomerData, updatedAccounts: List<AccountData>) {
|
||||||
val accounts = customer.accounts
|
val accounts = customer.accounts
|
||||||
|
|
Loading…
Reference in New Issue