mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 11:06:49 +00:00
feature/Bump Liftweb version to 3.5.0
This commit is contained in:
parent
7dc98ee938
commit
dd37c17774
@ -35,7 +35,7 @@ object TableAccountAccess {
|
||||
.user_fk(permission.user.get)
|
||||
.view_id(viewId)
|
||||
.view_fk(viewFk)
|
||||
.save()
|
||||
.save
|
||||
}
|
||||
val isSuccessful = insertedRows.forall(_ == true)
|
||||
val accountAccess = AccountAccess.findAll()
|
||||
|
||||
@ -99,7 +99,7 @@ object MigrationOfAccountRoutings {
|
||||
false // DB have the same routing
|
||||
case Full(routing) =>
|
||||
// only accountRoutingAddress is different.
|
||||
routing.AccountRoutingAddress(accountRoutingAddress).save()
|
||||
routing.AccountRoutingAddress(accountRoutingAddress).save
|
||||
case _ =>
|
||||
// query according unique index: UniqueIndex(BankId, AccountRoutingScheme, AccountRoutingAddress)
|
||||
BankAccountRouting.find(By(BankAccountRouting.BankId, bankId),
|
||||
@ -108,7 +108,7 @@ object MigrationOfAccountRoutings {
|
||||
) match {
|
||||
case Full(routing) =>
|
||||
// only accountId is different
|
||||
routing.AccountId(accountId).save()
|
||||
routing.AccountId(accountId).save
|
||||
case _ =>
|
||||
// not exists corresponding routing in DB.
|
||||
BankAccountRouting.create
|
||||
@ -116,7 +116,7 @@ object MigrationOfAccountRoutings {
|
||||
.AccountId(accountId)
|
||||
.AccountRoutingScheme(accountRoutingScheme)
|
||||
.AccountRoutingAddress(accountRoutingAddress)
|
||||
.save()
|
||||
.save
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ object TableRateLmiting {
|
||||
.PerMonthCallLimit(consumer.perMonthCallLimit.get)
|
||||
.FromDate(Date.from(oneDayAgo.toInstant()))
|
||||
.ToDate(Date.from(oneYearInFuture.toInstant()))
|
||||
.save()
|
||||
.save
|
||||
}
|
||||
}
|
||||
val isSuccessful = insertedRows.forall(_ == true)
|
||||
|
||||
@ -58,7 +58,7 @@ object UpdateTableViewDefinition {
|
||||
view <- views
|
||||
accountAccess <- AccountAccess.find(By(AccountAccess.view_fk, view.id)).toList
|
||||
} yield {
|
||||
accountAccess.view_id(view.viewId.value).save()
|
||||
accountAccess.view_id(view.viewId.value).save
|
||||
}
|
||||
|
||||
val isSuccessful = views.forall(_.isSystem == false)
|
||||
|
||||
@ -1892,7 +1892,7 @@ object LocalMappedConnector extends Connector with MdcLoggable {
|
||||
newAccountBalance <- Full(Helper.convertToSmallestCurrencyUnits(fromAccount.balance, currency) + Helper.convertToSmallestCurrencyUnits(amount, currency))
|
||||
|
||||
//Here is the `LocalMappedConnector`, once get this point, fromAccount must be a mappedBankAccount. So can use asInstanceOf....
|
||||
_ <- tryo(fromAccount.asInstanceOf[MappedBankAccount].accountBalance(newAccountBalance).save()) ?~! UpdateBankAccountException
|
||||
_ <- tryo(fromAccount.asInstanceOf[MappedBankAccount].accountBalance(newAccountBalance).save) ?~! UpdateBankAccountException
|
||||
|
||||
mappedTransaction <- tryo(MappedTransaction.create
|
||||
.bank(fromAccount.bankId.value)
|
||||
@ -2047,7 +2047,7 @@ object LocalMappedConnector extends Connector with MdcLoggable {
|
||||
newAccountBalance <- Full(Helper.convertToSmallestCurrencyUnits(fromAccount.balance, currency) + Helper.convertToSmallestCurrencyUnits(amount, currency))
|
||||
|
||||
//Here is the `LocalMappedConnector`, once get this point, fromAccount must be a mappedBankAccount. So can use asInstanceOf....
|
||||
_ <- tryo(fromAccount.asInstanceOf[MappedBankAccount].accountBalance(newAccountBalance).save()) ?~! UpdateBankAccountException
|
||||
_ <- tryo(fromAccount.asInstanceOf[MappedBankAccount].accountBalance(newAccountBalance).save) ?~! UpdateBankAccountException
|
||||
|
||||
mappedTransaction <- tryo(MappedTransaction.create
|
||||
//No matter which type (SANDBOX_TAN,SEPA,FREE_FORM,COUNTERPARTYE), always filled the following nine fields.
|
||||
@ -5070,7 +5070,7 @@ object LocalMappedConnector extends Connector with MdcLoggable {
|
||||
.Currency(reason.currency.getOrElse(""))
|
||||
.DocumentNumber(reason.documentNumber.getOrElse(""))
|
||||
.Description(reason.description.getOrElse(""))
|
||||
.save()
|
||||
.save
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ object MappedPhysicalCardProvider extends PhysicalCardProvider {
|
||||
.card(v)
|
||||
.saveMe()
|
||||
v.mPinResets += pin
|
||||
v.save()
|
||||
v.save
|
||||
}
|
||||
}
|
||||
case _ => // There is no enough information to set foreign key
|
||||
@ -217,7 +217,7 @@ object MappedPhysicalCardProvider extends PhysicalCardProvider {
|
||||
.card(v)
|
||||
.saveMe()
|
||||
v.mPinResets += pin
|
||||
v.save()
|
||||
v.save
|
||||
}
|
||||
}
|
||||
case _ => // There is no enough information to set foreign key
|
||||
|
||||
@ -318,7 +318,7 @@ object MappedCustomerProvider extends CustomerProvider with MdcLoggable {
|
||||
for {
|
||||
customer <- MappedCustomer.findAll(NullRef(MappedCustomer.mCustomerId))++ MappedCustomer.findAll(By(MappedCustomer.mCustomerId, ""))
|
||||
} yield {
|
||||
customer.mCustomerId(APIUtil.generateUUID()).save()
|
||||
customer.mCustomerId(APIUtil.generateUUID()).save
|
||||
}
|
||||
}.forall(_ == true)
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ object LoginAttempt extends MdcLoggable {
|
||||
.Provider(provider)
|
||||
.mLastFailureDate(now)
|
||||
.mBadAttemptsSinceLastSuccessOrReset(1) // Start with 1
|
||||
.save()
|
||||
.save
|
||||
|
||||
logger.debug(s"incrementBadLoginAttempts created loginAttempt")
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ object MappedMeetingProvider extends MeetingProvider {
|
||||
.mStatus(invitee.status)
|
||||
.saveMe()
|
||||
createdMeeting.mInvitees += meetingInvitee
|
||||
createdMeeting.save()
|
||||
createdMeeting.save
|
||||
}} ?~! ErrorMessages.CreateMeetingInviteeException
|
||||
} yield {
|
||||
createdMeeting
|
||||
|
||||
@ -290,27 +290,27 @@ object MapperCounterparties extends Counterparties with MdcLoggable {
|
||||
}
|
||||
|
||||
override def addPublicAlias(counterpartyId : String, alias: String): Box[Boolean] = {
|
||||
getCounterpartyMetadata(counterpartyId).map(_.publicAlias(alias).save())
|
||||
getCounterpartyMetadata(counterpartyId).map(_.publicAlias(alias).save)
|
||||
}
|
||||
|
||||
override def addPrivateAlias(counterpartyId : String, alias: String): Box[Boolean] = {
|
||||
getCounterpartyMetadata(counterpartyId).map(_.privateAlias(alias).save())
|
||||
getCounterpartyMetadata(counterpartyId).map(_.privateAlias(alias).save)
|
||||
}
|
||||
|
||||
override def addURL(counterpartyId : String, url: String): Box[Boolean] = {
|
||||
getCounterpartyMetadata(counterpartyId).map(_.url(url).save())
|
||||
getCounterpartyMetadata(counterpartyId).map(_.url(url).save)
|
||||
}
|
||||
|
||||
override def addImageURL(counterpartyId : String, url: String): Box[Boolean] = {
|
||||
getCounterpartyMetadata(counterpartyId).map(_.imageUrl(url).save())
|
||||
getCounterpartyMetadata(counterpartyId).map(_.imageUrl(url).save)
|
||||
}
|
||||
|
||||
override def addOpenCorporatesURL(counterpartyId : String, url: String): Box[Boolean] = {
|
||||
getCounterpartyMetadata(counterpartyId).map(_.openCorporatesUrl(url).save())
|
||||
getCounterpartyMetadata(counterpartyId).map(_.openCorporatesUrl(url).save)
|
||||
}
|
||||
|
||||
override def addMoreInfo(counterpartyId : String, moreInfo: String): Box[Boolean] = {
|
||||
getCounterpartyMetadata(counterpartyId).map(_.moreInfo(moreInfo).save())
|
||||
getCounterpartyMetadata(counterpartyId).map(_.moreInfo(moreInfo).save)
|
||||
}
|
||||
|
||||
override def addPhysicalLocation(counterpartyId : String, userId: UserPrimaryKey, datePosted : Date, longitude : Double, latitude : Double): Box[Boolean] = {
|
||||
@ -372,7 +372,7 @@ class MappedCounterpartyMetadata extends CounterpartyMetadata with LongKeyedMapp
|
||||
private def trySave(f : => Any) : Boolean =
|
||||
tryo{
|
||||
f
|
||||
save()
|
||||
save
|
||||
}.getOrElse(false)
|
||||
|
||||
private def setWhere(whereTag : Box[MappedCounterpartyWhereTag])
|
||||
|
||||
@ -15,7 +15,7 @@ object MappedMigrationScriptLogProvider extends MigrationScriptLogProvider with
|
||||
.StartDate(startDate)
|
||||
.EndDate(endDate)
|
||||
.Remark(comment)
|
||||
.save()
|
||||
.save
|
||||
case _ =>
|
||||
MigrationScriptLog
|
||||
.create
|
||||
@ -25,7 +25,7 @@ object MappedMigrationScriptLogProvider extends MigrationScriptLogProvider with
|
||||
.StartDate(startDate)
|
||||
.EndDate(endDate)
|
||||
.Remark(comment)
|
||||
.save()
|
||||
.save
|
||||
}
|
||||
}
|
||||
override def isExecuted(name: String): Boolean = {
|
||||
|
||||
@ -455,7 +455,7 @@ object MappedConsumersProvider extends ConsumersProvider with MdcLoggable {
|
||||
for {
|
||||
consumer <- Consumer.findAll(NullRef(Consumer.consumerId))++ Consumer.findAll(By(Consumer.consumerId,""))
|
||||
} yield {
|
||||
consumer.consumerId(APIUtil.generateUUID()).save()
|
||||
consumer.consumerId(APIUtil.generateUUID()).save
|
||||
}
|
||||
}.forall(_ == true)
|
||||
|
||||
@ -843,7 +843,7 @@ object MappedTokenProvider extends TokensProvider {
|
||||
|
||||
override def updateToken(id: Long, userId: Long): Boolean = {
|
||||
Token.find(By(Token.id, id)) match {
|
||||
case Full(t) => t.userForeignKey(userId).save()
|
||||
case Full(t) => t.userForeignKey(userId).save
|
||||
case _ => false
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ import scala.concurrent.Future
|
||||
*
|
||||
*
|
||||
* 3 RelationShips:
|
||||
* 1)When `Sign up` new user --> create AuthUser --> call AuthUser.save() --> create ResourceUser user.
|
||||
* 1)When `Sign up` new user --> create AuthUser --> call AuthUser.save --> create ResourceUser user.
|
||||
* They share the same username and email.
|
||||
* 2)AuthUser `user` field as the Foreign Key to link to Resource User.
|
||||
* one AuthUser <---> one ResourceUser
|
||||
@ -370,7 +370,7 @@ class AuthUser extends MegaProtoUser[AuthUser] with CreatedUpdated with MdcLogga
|
||||
}
|
||||
}
|
||||
}
|
||||
super.save()
|
||||
super.save
|
||||
}
|
||||
|
||||
override def delete_!(): Boolean = {
|
||||
@ -1581,7 +1581,7 @@ def restoreSomeSessions(): Unit = {
|
||||
.lastName(Helpers.randomString(16))
|
||||
.password(Helpers.randomString(40))
|
||||
.validated(false)
|
||||
scrambledUser.save()
|
||||
scrambledUser.save
|
||||
case Empty => true // There is a resource user but no the correlated Auth user
|
||||
case _ => false // Error case
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ import net.liftweb.mapper._
|
||||
*
|
||||
*
|
||||
* 3 RelationShips:
|
||||
* 1)When `Sign up` new user --> create AuthUser --> call AuthUser.save() --> create ResourceUser user.
|
||||
* 1)When `Sign up` new user --> create AuthUser --> call AuthUser.save --> create ResourceUser user.
|
||||
* They share the same username and email.
|
||||
* 2)AuthUser `user` field as the Foreign Key to link to Resource User.
|
||||
* one AuthUser <---> one ResourceUser
|
||||
|
||||
@ -18,7 +18,7 @@ trait CreateAuthUsers {
|
||||
def save() = {
|
||||
val usr = Users.users.vend.saveResourceUser(value)
|
||||
for (uu <- usr) {
|
||||
u.user(uu).save()
|
||||
u.user(uu).save
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ import net.liftweb.mapper.Mapper
|
||||
import net.liftweb.util.Helpers._
|
||||
|
||||
case class MappedSaveable[T <: Mapper[_]](value : T) extends Saveable[T] {
|
||||
def save() = value.save()
|
||||
def save() = value.save
|
||||
}
|
||||
|
||||
object LocalMappedConnectorDataImport extends OBPDataImport with CreateAuthUsers {
|
||||
|
||||
@ -500,22 +500,22 @@ trait OBPDataImport extends MdcLoggable {
|
||||
crmEvents <- createCrmEvents(data)
|
||||
} yield {
|
||||
logger.info(s"importData is saving ${banks.size} banks..")
|
||||
banks.foreach(_.save())
|
||||
banks.foreach(_.save)
|
||||
|
||||
logger.info(s"importData is saving ${users.size} users..")
|
||||
users.foreach(_.save())
|
||||
users.foreach(_.save)
|
||||
|
||||
logger.info(s"importData is saving ${branches.size} branches..")
|
||||
branches.foreach(_.save())
|
||||
branches.foreach(_.save)
|
||||
|
||||
logger.info(s"importData is saving ${atms.size} ATMs..")
|
||||
atms.foreach(_.save())
|
||||
atms.foreach(_.save)
|
||||
|
||||
logger.info(s"importData is saving ${products.size} products..")
|
||||
products.foreach(_.save())
|
||||
products.foreach(_.save)
|
||||
|
||||
logger.info(s"importData is saving ${crmEvents.size} crmEvents..")
|
||||
crmEvents.foreach(_.save())
|
||||
crmEvents.foreach(_.save)
|
||||
|
||||
|
||||
|
||||
@ -526,7 +526,7 @@ trait OBPDataImport extends MdcLoggable {
|
||||
logger.info(s"importData is saving ${accountResults.size} accountResults (accounts, views and permissions)..")
|
||||
accountResults.foreach {
|
||||
case (account, systemViews, accOwnerUsernames) =>
|
||||
account.save()
|
||||
account.save
|
||||
|
||||
systemViews.filterNot(_.isPublic).foreach(v => {
|
||||
//grant the owner access to Private systemViews
|
||||
@ -539,7 +539,7 @@ trait OBPDataImport extends MdcLoggable {
|
||||
}
|
||||
logger.info(s"importData is saving ${transactions.size} transactions (and loading them again)")
|
||||
transactions.foreach { t =>
|
||||
t.save()
|
||||
t.save
|
||||
//load it to force creation of metadata (If we are using Mapped connector, MappedCounterpartyMetadata.create will be called)
|
||||
val lt = Connector.connector.vend.getTransactionLegacy(t.value.theBankId, t.value.theAccountId, t.value.theTransactionId)
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ object MappedSocialMediasProvider extends SocialMediaHandleProvider {
|
||||
.mHandle(handle)
|
||||
.mDateAdded(dateAdded)
|
||||
.mDateActivated(dateActivated)
|
||||
.save()
|
||||
.save
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -302,12 +302,12 @@ object LiftUsers extends Users with MdcLoggable{
|
||||
.name_("DELETED-" + Helpers.randomString(16))
|
||||
.email(Helpers.randomString(10) + "@example.com")
|
||||
.providerId(Helpers.randomString(16))
|
||||
.save()
|
||||
.save
|
||||
case _ =>
|
||||
u
|
||||
.Company(Helpers.randomString(16))
|
||||
.IsDeleted(true)
|
||||
.save()
|
||||
.save
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ object MappedUserInvitationProvider extends UserInvitationProvider {
|
||||
UserInvitation.find(
|
||||
By(UserInvitation.UserInvitationId, userInvitationId)
|
||||
) match {
|
||||
case Full(userInvitation) => userInvitation.Status(status).save()
|
||||
case Full(userInvitation) => userInvitation.Status(status).save
|
||||
case _ => false
|
||||
}
|
||||
}
|
||||
@ -49,7 +49,7 @@ object MappedUserInvitationProvider extends UserInvitationProvider {
|
||||
.Country(Helpers.randomString(userInvitation.country.length))
|
||||
.Purpose(Helpers.randomString(userInvitation.purpose.length))
|
||||
.Status("DELETED")
|
||||
.save()
|
||||
.save
|
||||
case _ => false
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ import java.util.Date
|
||||
*
|
||||
*
|
||||
* 3 RelationShips:
|
||||
* 1)When `Sign up` new user --> create AuthUser --> call AuthUser.save() --> create ResourceUser user.
|
||||
* 1)When `Sign up` new user --> create AuthUser --> call AuthUser.save --> create ResourceUser user.
|
||||
* They share the same username and email.
|
||||
* 2)AuthUser `user` field as the Foreign Key to link to Resource User.
|
||||
* one AuthUser <---> one ResourceUser
|
||||
|
||||
4
pom.xml
4
pom.xml
@ -11,12 +11,12 @@
|
||||
<inceptionYear>2011</inceptionYear>
|
||||
<properties>
|
||||
<scala.version>2.12</scala.version>
|
||||
<scala.compiler>2.12.10</scala.compiler>
|
||||
<scala.compiler>2.12.12</scala.compiler>
|
||||
<akka.version>2.5.32</akka.version>
|
||||
<akka-streams-kafka.version>2.0.5</akka-streams-kafka.version>
|
||||
<kafka.version>1.1.0</kafka.version>
|
||||
<avro.version>1.8.2</avro.version>
|
||||
<lift.version>3.4.1</lift.version>
|
||||
<lift.version>3.5.0</lift.version>
|
||||
<jetty.version>9.4.50.v20221201</jetty.version>
|
||||
<log4j.version>2.17.1</log4j.version>
|
||||
<obp-ri.version>2016.11-RC6-SNAPSHOT</obp-ri.version>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user