Skip to content

Improvement: Extract datafile component, base/util, base/crypt projects #678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
*/
package org.apache.ofbiz.accounting.fixedasset

import org.apache.ofbiz.base.util.UtilProperties

import org.apache.ofbiz.base.util.UtilPropertiesRuntime
import org.apache.ofbiz.common.geo.GeoWorker

uiLabelMap = UtilProperties.getResourceBundleMap('AccountingUiLabels', locale)
uiLabelMap = UtilPropertiesRuntime.getResourceBundleMap('AccountingUiLabels', locale)

if (fixedAsset) {
latestGeoPoint = GeoWorker.findLatestGeoPoint(delegator, 'FixedAssetAndGeoPoint', 'fixedAssetId', fixedAssetId, null, null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
package org.apache.ofbiz.accounting.payment

import org.apache.ofbiz.base.util.UtilPropertiesRuntime

import java.sql.Timestamp

import org.apache.ofbiz.accounting.invoice.InvoiceWorker
Expand Down Expand Up @@ -362,7 +364,7 @@ Map getInvoicePaymentInfoListByDueDateOffset() {
Map voidPayment() {
GenericValue payment = from('Payment').where(parameters).queryOne()
if (!payment) {
return error(UtilProperties.getResourceBundleMap('AccountingUiLabels', locale)?.AccountingNoPaymentsfound)
return error(UtilPropertiesRuntime.getResourceBundleMap('AccountingUiLabels', locale)?.AccountingNoPaymentsfound)
}
String paymentId = payment.paymentId
Map paymentStatusCtx = [paymentId: paymentId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package org.apache.ofbiz.accounting.reports
import org.apache.ofbiz.accounting.util.UtilAccounting
import org.apache.ofbiz.base.util.UtilDateTime
import org.apache.ofbiz.base.util.UtilMisc
import org.apache.ofbiz.base.util.UtilProperties
import org.apache.ofbiz.base.util.UtilPropertiesRuntime
import org.apache.ofbiz.entity.GenericValue
import org.apache.ofbiz.entity.condition.EntityCondition
import org.apache.ofbiz.entity.condition.EntityExpr
Expand All @@ -30,7 +30,7 @@ import org.apache.ofbiz.party.party.PartyWorker

import java.sql.Timestamp

uiLabelMap = UtilProperties.getResourceBundleMap('AccountingUiLabels', locale)
uiLabelMap = UtilPropertiesRuntime.getResourceBundleMap('AccountingUiLabels', locale)

thruDate = thruDate ?: UtilDateTime.nowTimestamp()
if (!glFiscalTypeId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ package org.apache.ofbiz.accounting.reports
import org.apache.ofbiz.accounting.util.UtilAccounting
import org.apache.ofbiz.base.util.UtilDateTime
import org.apache.ofbiz.base.util.UtilMisc
import org.apache.ofbiz.base.util.UtilProperties
import org.apache.ofbiz.base.util.UtilMiscRuntime
import org.apache.ofbiz.base.util.UtilPropertiesRuntime
import org.apache.ofbiz.entity.GenericValue
import org.apache.ofbiz.entity.condition.EntityCondition
import org.apache.ofbiz.entity.condition.EntityOperator
Expand All @@ -35,7 +36,7 @@ if (!fromDate) {
thruDate = thruDate ?: UtilDateTime.nowTimestamp()
parameters.glFiscalTypeId = parameters.glFiscalTypeId ?: 'ACTUAL'

uiLabelMap = UtilProperties.getResourceBundleMap('AccountingUiLabels', locale)
uiLabelMap = UtilPropertiesRuntime.getResourceBundleMap('AccountingUiLabels', locale)
parametersFromDate = fromDate

// Setup the divisions for which the report is executed
Expand Down Expand Up @@ -115,7 +116,7 @@ transactionTotals.each { transactionTotal ->
transactionTotalsMap.put(transactionTotal.glAccountId, accountMap)
}
glAccountIdList = []
accountBalanceList = UtilMisc.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
accountBalanceList = UtilMiscRuntime.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
accountBalanceList.each { accountBalance ->
balanceTotal = balanceTotal.add(accountBalance.balance)
}
Expand Down Expand Up @@ -160,7 +161,7 @@ if (transactionTotals) {
accountMap.balance = balance
transactionTotalsMap.(transactionTotal.glAccountId) = accountMap
}
accountBalanceList = UtilMisc.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
accountBalanceList = UtilMiscRuntime.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
balanceTotal = balanceTotalDebit.subtract(balanceTotalCredit)
}
periodCashBalanceTotal = balanceTotal
Expand All @@ -175,7 +176,7 @@ balanceTotal = BigDecimal.ZERO
List transactionTotals = []
transactionTotals.addAll(new LinkedList(context.openingCashBalanceList))
transactionTotals.addAll(new LinkedList(context.periodCashBalanceList))
transactionTotals = UtilMisc.sortMaps(transactionTotals, UtilMisc.toList('accountCode'))
transactionTotals = UtilMiscRuntime.sortMaps(transactionTotals, UtilMisc.toList('accountCode'))
closingTransactionKeySet = []
if (transactionTotals) {
Map transactionTotalsMap = [:]
Expand All @@ -197,7 +198,7 @@ if (transactionTotals) {
} else {
transactionTotalsMap.(transactionTotal.glAccountId) = transactionTotal
}
accountBalanceList = UtilMisc.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
accountBalanceList = UtilMiscRuntime.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
}
}
closingTransactionKeySet = transactionTotalsMap.keySet()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.ofbiz.accounting.reports

import org.apache.ofbiz.base.util.UtilMisc
import org.apache.ofbiz.base.util.UtilMiscRuntime

assetAccountBalanceMap = [:]
assetAccountBalanceList = []
Expand All @@ -37,7 +38,7 @@ assetAccountBalanceList2.each { accountBalance ->
balance1: BigDecimal.ZERO])
}
}
assetAccountBalanceList = UtilMisc.sortMaps(assetAccountBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
assetAccountBalanceList = UtilMiscRuntime.sortMaps(assetAccountBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
context.assetAccountBalanceList = assetAccountBalanceList

liabilityAccountBalanceMap = [:]
Expand All @@ -57,7 +58,7 @@ liabilityAccountBalanceList2.each { accountBalance ->
balance1: BigDecimal.ZERO])
}
}
liabilityAccountBalanceList = UtilMisc.sortMaps(liabilityAccountBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
liabilityAccountBalanceList = UtilMiscRuntime.sortMaps(liabilityAccountBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
context.liabilityAccountBalanceList = liabilityAccountBalanceList

equityAccountBalanceMap = [:]
Expand All @@ -77,7 +78,7 @@ equityAccountBalanceList2.each { accountBalance ->
balance1: BigDecimal.ZERO])
}
}
equityAccountBalanceList = UtilMisc.sortMaps(equityAccountBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
equityAccountBalanceList = UtilMiscRuntime.sortMaps(equityAccountBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
context.equityAccountBalanceList = equityAccountBalanceList

balanceTotalMap = [:]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.ofbiz.accounting.reports

import org.apache.ofbiz.base.util.UtilMisc
import org.apache.ofbiz.base.util.UtilMiscRuntime

openingCashBalanceMap = [:]
openingCashBalanceList = []
Expand All @@ -37,7 +38,7 @@ openingCashBalanceList2.each { accountBalance ->
balance1: BigDecimal.ZERO])
}
}
openingCashBalanceList = UtilMisc.sortMaps(openingCashBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
openingCashBalanceList = UtilMiscRuntime.sortMaps(openingCashBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
context.openingCashBalanceList = openingCashBalanceList

periodCashBalanceMap = [:]
Expand All @@ -61,7 +62,7 @@ periodCashBalanceList2.each { accountBalance ->
D1: BigDecimal.ZERO, C1: BigDecimal.ZERO])
}
}
periodCashBalanceList = UtilMisc.sortMaps(periodCashBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
periodCashBalanceList = UtilMiscRuntime.sortMaps(periodCashBalanceMap.values().asList(), UtilMisc.toList('accountCode'))

context.periodCashBalanceList = periodCashBalanceList
closingCashBalanceMap = [:]
Expand All @@ -81,7 +82,7 @@ closingCashBalanceList2.each { accountBalance ->
balance1: BigDecimal.ZERO])
}
}
closingCashBalanceList = UtilMisc.sortMaps(closingCashBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
closingCashBalanceList = UtilMiscRuntime.sortMaps(closingCashBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
context.closingCashBalanceList = closingCashBalanceList

balanceTotalMap = [:]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.ofbiz.accounting.reports

import org.apache.ofbiz.base.util.UtilMisc
import org.apache.ofbiz.base.util.UtilMiscRuntime

revenueAccountBalanceMap = [:]
revenueAccountBalanceList = []
Expand All @@ -37,7 +38,7 @@ revenueAccountBalanceList2.each { accountBalance ->
balance1: BigDecimal.ZERO])
}
}
revenueAccountBalanceList = UtilMisc.sortMaps(revenueAccountBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
revenueAccountBalanceList = UtilMiscRuntime.sortMaps(revenueAccountBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
context.revenueAccountBalanceList = revenueAccountBalanceList

expenseAccountBalanceMap = [:]
Expand All @@ -57,7 +58,7 @@ expenseAccountBalanceList2.each { accountBalance ->
balance1: BigDecimal.ZERO])
}
}
expenseAccountBalanceList = UtilMisc.sortMaps(expenseAccountBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
expenseAccountBalanceList = UtilMiscRuntime.sortMaps(expenseAccountBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
context.expenseAccountBalanceList = expenseAccountBalanceList

incomeAccountBalanceMap = [:]
Expand All @@ -77,7 +78,7 @@ incomeAccountBalanceList2.each { accountBalance ->
balance1: BigDecimal.ZERO])
}
}
incomeAccountBalanceList = UtilMisc.sortMaps(incomeAccountBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
incomeAccountBalanceList = UtilMiscRuntime.sortMaps(incomeAccountBalanceMap.values().asList(), UtilMisc.toList('accountCode'))
context.incomeAccountBalanceList = incomeAccountBalanceList

balanceTotalMap = [:]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package org.apache.ofbiz.accounting.reports

import org.apache.ofbiz.base.util.UtilDateTime
import org.apache.ofbiz.base.util.UtilMisc
import org.apache.ofbiz.base.util.UtilMiscRuntime
import org.apache.ofbiz.entity.GenericValue
import org.apache.ofbiz.entity.condition.EntityCondition
import org.apache.ofbiz.entity.condition.EntityOperator
Expand Down Expand Up @@ -106,7 +107,7 @@ if (transactionTotals) {
accountMap.put('balance', balance)
transactionTotalsMap.put(transactionTotal.glAccountId, accountMap)
}
accountBalanceList = UtilMisc.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
accountBalanceList = UtilMiscRuntime.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
// revenues are accounts of class CREDIT: the balance is given by credits minus debits
balanceTotal = balanceTotalCredit.subtract(balanceTotalDebit)
}
Expand Down Expand Up @@ -150,7 +151,7 @@ if (transactionTotals) {
accountMap.put('balance', balance)
transactionTotalsMap.put(transactionTotal.glAccountId, accountMap)
}
accountBalanceList = UtilMisc.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
accountBalanceList = UtilMiscRuntime.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
// contra revenues are accounts of class DEBIT: the balance is given by debits minus credits
balanceTotal = balanceTotalDebit.subtract(balanceTotalCredit)
}
Expand Down Expand Up @@ -193,7 +194,7 @@ if (transactionTotals) {
accountMap.put('balance', balance)
transactionTotalsMap.put(transactionTotal.glAccountId, accountMap)
}
accountBalanceList = UtilMisc.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
accountBalanceList = UtilMiscRuntime.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
// expenses are accounts of class DEBIT: the balance is given by debits minus credits
balanceTotal = balanceTotalDebit.subtract(balanceTotalCredit)
}
Expand Down Expand Up @@ -237,7 +238,7 @@ if (transactionTotals) {
accountMap.put('balance', balance)
transactionTotalsMap.put(transactionTotal.glAccountId, accountMap)
}
accountBalanceList = UtilMisc.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
accountBalanceList = UtilMiscRuntime.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
// expenses are accounts of class DEBIT: the balance is given by debits minus credits
balanceTotal = balanceTotalDebit.subtract(balanceTotalCredit)
}
Expand Down Expand Up @@ -280,7 +281,7 @@ if (transactionTotals) {
accountMap.put('balance', balance)
transactionTotalsMap.put(transactionTotal.glAccountId, accountMap)
}
accountBalanceList = UtilMisc.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
accountBalanceList = UtilMiscRuntime.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
// expenses are accounts of class DEBIT: the balance is given by debits minus credits
balanceTotal = balanceTotalDebit.subtract(balanceTotalCredit)
}
Expand Down Expand Up @@ -322,7 +323,7 @@ if (transactionTotals) {
accountMap.put('balance', balance)
transactionTotalsMap.put(transactionTotal.glAccountId, accountMap)
}
accountBalanceList = UtilMisc.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
accountBalanceList = UtilMiscRuntime.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
// expenses are accounts of class DEBIT: the balance is given by debits minus credits
balanceTotal = balanceTotalDebit.subtract(balanceTotalCredit)
}
Expand Down Expand Up @@ -364,7 +365,7 @@ if (transactionTotals) {
accountMap.put('balance', balance)
transactionTotalsMap.put(transactionTotal.glAccountId, accountMap)
}
accountBalanceList = UtilMisc.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
accountBalanceList = UtilMiscRuntime.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList('accountCode'))
// incomes are accounts of class CREDIT: the balance is given by credits minus debits
balanceTotal = balanceTotalCredit.subtract(balanceTotalDebit)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.UtilMisc;
import org.apache.ofbiz.base.util.UtilNumber;
import org.apache.ofbiz.base.util.UtilProperties;
import org.apache.ofbiz.base.util.UtilPropertiesRuntime;
import org.apache.ofbiz.entity.Delegator;
import org.apache.ofbiz.entity.GenericEntityException;
import org.apache.ofbiz.entity.GenericValue;
Expand Down Expand Up @@ -174,7 +174,7 @@ public static Map<String, Object> getCommissionForProduct(DispatchContext ctx, M
} catch (GenericEntityException e) {
Debug.logWarning(e, MODULE);
Map<String, String> messageMap = UtilMisc.toMap("errMessage", e.getMessage());
errMsg = UtilProperties.getMessage("CommonUiLabels", "CommonDatabaseProblem", messageMap, locale);
errMsg = UtilPropertiesRuntime.getMessage("CommonUiLabels", "CommonDatabaseProblem", messageMap, locale);
return ServiceUtil.returnError(errMsg);
}
return UtilMisc.toMap(
Expand Down
Loading