You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by nm...@apache.org on 2015/04/10 22:22:59 UTC
svn commit: r1672752 [3/18] - in /ofbiz/trunk:
applications/accounting/src/org/ofbiz/accounting/agreement/
applications/accounting/src/org/ofbiz/accounting/finaccount/
applications/accounting/src/org/ofbiz/accounting/invoice/
applications/accounting/sr...
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy Fri Apr 10 20:22:54 2015
@@ -29,8 +29,6 @@ import org.ofbiz.party.party.PartyWorker
import java.sql.Date;
import java.sql.Timestamp;
-import javolution.util.FastList;
-
uiLabelMap = UtilProperties.getResourceBundleMap("AccountingUiLabels", locale);
if (!thruDate) {
@@ -80,7 +78,7 @@ Map liabilityOpeningBalances = [:];
Map currentLiabilityOpeningBalances = [:];
Map equityOpeningBalances = [:];
if (lastClosedTimePeriod) {
- List timePeriodAndExprs = FastList.newInstance();
+ List timePeriodAndExprs = [];
timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, assetAccountClassIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO));
@@ -90,7 +88,7 @@ if (lastClosedTimePeriod) {
Map accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "D", lastTimePeriodHistory.getBigDecimal("postedDebits"), "C", lastTimePeriodHistory.getBigDecimal("postedCredits"));
assetOpeningBalances.put(lastTimePeriodHistory.glAccountId, accountMap);
}
- timePeriodAndExprs = FastList.newInstance();
+ timePeriodAndExprs = [];
timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, contraAssetAccountClassIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO));
@@ -100,7 +98,7 @@ if (lastClosedTimePeriod) {
Map accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "D", lastTimePeriodHistory.getBigDecimal("postedDebits"), "C", lastTimePeriodHistory.getBigDecimal("postedCredits"));
contraAssetOpeningBalances.put(lastTimePeriodHistory.glAccountId, accountMap);
}
- timePeriodAndExprs = FastList.newInstance();
+ timePeriodAndExprs = [];
timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, liabilityAccountClassIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO));
@@ -110,7 +108,7 @@ if (lastClosedTimePeriod) {
Map accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "D", lastTimePeriodHistory.getBigDecimal("postedDebits"), "C", lastTimePeriodHistory.getBigDecimal("postedCredits"));
liabilityOpeningBalances.put(lastTimePeriodHistory.glAccountId, accountMap);
}
- timePeriodAndExprs = FastList.newInstance();
+ timePeriodAndExprs = [];
timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, equityAccountClassIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO));
@@ -120,7 +118,7 @@ if (lastClosedTimePeriod) {
Map accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "D", lastTimePeriodHistory.getBigDecimal("postedDebits"), "C", lastTimePeriodHistory.getBigDecimal("postedCredits"));
equityOpeningBalances.put(lastTimePeriodHistory.glAccountId, accountMap);
}
- timePeriodAndExprs = FastList.newInstance();
+ timePeriodAndExprs = [];
timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, currentAssetAccountClassIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO));
@@ -130,7 +128,7 @@ if (lastClosedTimePeriod) {
Map accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "D", lastTimePeriodHistory.getBigDecimal("postedDebits"), "C", lastTimePeriodHistory.getBigDecimal("postedCredits"));
currentAssetOpeningBalances.put(lastTimePeriodHistory.glAccountId, accountMap);
}
- timePeriodAndExprs = FastList.newInstance();
+ timePeriodAndExprs = [];
timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, longtermAssetAccountClassIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO));
@@ -140,7 +138,7 @@ if (lastClosedTimePeriod) {
Map accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "D", lastTimePeriodHistory.getBigDecimal("postedDebits"), "C", lastTimePeriodHistory.getBigDecimal("postedCredits"));
longtermAssetOpeningBalances.put(lastTimePeriodHistory.glAccountId, accountMap);
}
- timePeriodAndExprs = FastList.newInstance();
+ timePeriodAndExprs = [];
timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, currentLiabilityAccountClassIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO));
@@ -154,7 +152,7 @@ if (lastClosedTimePeriod) {
List balanceTotalList = [];
-List mainAndExprs = FastList.newInstance();
+List mainAndExprs = [];
mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y"));
mainAndExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId));
@@ -167,7 +165,7 @@ mainAndExprs.add(EntityCondition.makeCon
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List assetAndExprs = FastList.newInstance(mainAndExprs);
+List assetAndExprs = mainAndExprs as LinkedList;
assetAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, assetAccountClassIds));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(assetAndExprs).orderBy("glAccountId").queryList();
transactionTotalsMap = [:];
@@ -203,7 +201,7 @@ context.assetBalanceTotal = balanceTotal
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List currentAssetAndExprs = FastList.newInstance(mainAndExprs);
+List currentAssetAndExprs = mainAndExprs as LinkedList;
currentAssetAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, currentAssetAccountClassIds));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(currentAssetAndExprs).orderBy("glAccountId").queryList();
transactionTotalsMap = [:];
@@ -238,7 +236,7 @@ balanceTotalList.add(UtilMisc.toMap("tot
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List longtermAssetAndExprs = FastList.newInstance(mainAndExprs);
+List longtermAssetAndExprs = mainAndExprs as LinkedList;
longtermAssetAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, longtermAssetAccountClassIds));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").orderBy("glAccountId").queryList();
transactionTotalsMap = [:];
@@ -273,7 +271,7 @@ balanceTotalList.add(UtilMisc.toMap("tot
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List contraAssetAndExprs = FastList.newInstance(mainAndExprs);
+List contraAssetAndExprs = mainAndExprs as LinkedList;
contraAssetAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, contraAssetAccountClassIds));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(contraAssetAndExprs).orderBy("glAccountId").queryList();
@@ -314,7 +312,7 @@ balanceTotalList.add(UtilMisc.toMap("tot
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List liabilityAndExprs = FastList.newInstance(mainAndExprs);
+List liabilityAndExprs = mainAndExprs as LinkedList;
liabilityAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, liabilityAccountClassIds));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(liabilityAndExprs).orderBy("glAccountId").queryList();
transactionTotalsMap = [:];
@@ -350,7 +348,7 @@ context.liabilityBalanceTotal = balanceT
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List currentLiabilityAndExprs = FastList.newInstance(mainAndExprs);
+List currentLiabilityAndExprs = mainAndExprs as LinkedList;
currentLiabilityAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, currentLiabilityAccountClassIds));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(currentLiabilityAndExprs).orderBy("glAccountId").queryList();
transactionTotalsMap = [:];
@@ -385,7 +383,7 @@ balanceTotalList.add(UtilMisc.toMap("tot
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List equityAndExprs = FastList.newInstance(mainAndExprs);
+List equityAndExprs = mainAndExprs as LinkedList;
equityAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, equityAccountClassIds));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(equityAndExprs).orderBy("glAccountId").queryList();
transactionTotalsMap = [:];
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy Fri Apr 10 20:22:54 2015
@@ -29,9 +29,6 @@ import org.ofbiz.party.party.PartyWorker
import java.sql.Date;
import java.sql.Timestamp;
-import javolution.util.FastList;
-import javolution.util.FastMap;
-
if (!fromDate) {
return;
}
@@ -65,7 +62,7 @@ GenericValue lastClosedTimePeriod = (Gen
// Get the opening balances of Cash Account
Map openingCashBalances = [:];
if (lastClosedTimePeriod) {
- List timePeriodAndExprs = FastList.newInstance();
+ List timePeriodAndExprs = [];
timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, glAccountClassIds));
timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO));
@@ -76,7 +73,7 @@ if (lastClosedTimePeriod) {
openingCashBalances.(lastTimePeriodHistory.glAccountId) = accountMap;
}
}
-List mainAndExprs = FastList.newInstance();
+List mainAndExprs = [];
mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y"));
mainAndExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, parameters.glFiscalTypeId));
@@ -87,7 +84,7 @@ mainAndExprs.add(EntityCondition.makeCon
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List openingCashBalanceAndExprs = FastList.newInstance(mainAndExprs);
+List openingCashBalanceAndExprs = mainAndExprs as LinkedList;
openingCashBalanceAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.GREATER_THAN_EQUAL_TO, periodClosingFromDate));
openingCashBalanceAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.LESS_THAN, parametersFromDate));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(openingCashBalanceAndExprs).orderBy("glAccountId").queryList();
@@ -132,7 +129,7 @@ openingTransactionKeySet = transactionTo
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List periodCashBalanceAndExprs = FastList.newInstance(mainAndExprs);
+List periodCashBalanceAndExprs = mainAndExprs as LinkedList;
periodCashBalanceAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.GREATER_THAN_EQUAL_TO, parametersFromDate));
periodCashBalanceAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.LESS_THAN, thruDate));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(periodCashBalanceAndExprs).orderBy("glAccountId").queryList();
@@ -174,9 +171,9 @@ cashFlowBalanceTotalList.add("totalName"
// GlAccounts from parameter's fromDate to parameter's thruDate.
accountBalanceList = [];
balanceTotal = BigDecimal.ZERO;
-List transactionTotals = FastList.newInstance();
-transactionTotals.addAll(FastList.newInstance(context.openingCashBalanceList));
-transactionTotals.addAll(FastList.newInstance(context.periodCashBalanceList));
+List transactionTotals = [];
+transactionTotals.addAll(new LinkedList(context.openingCashBalanceList));
+transactionTotals.addAll(new LinkedList(context.periodCashBalanceList));
transactionTotals = UtilMisc.sortMaps(transactionTotals, UtilMisc.toList("accountCode"));
closingTransactionKeySet = [];
if (transactionTotals) {
@@ -196,7 +193,7 @@ if (transactionTotals) {
transactionTotalsMap.(transactionTotal.glAccountId).balance = totalDebitBalance.subtract(totalCreditBalance);
}
} else {
- transactionTotalsMap.(transactionTotal.glAccountId) = FastMap.newInstance(transactionTotal);
+ transactionTotalsMap.(transactionTotal.glAccountId) = transactionTotal as LinkedList;
}
accountBalanceList = UtilMisc.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList("accountCode"));
}
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy Fri Apr 10 20:22:54 2015
@@ -24,9 +24,6 @@ import org.ofbiz.entity.condition.Entity
import org.ofbiz.entity.condition.EntityOperator;
import org.ofbiz.entity.util.EntityUtil;
-import javolution.util.FastList;
-import javolution.util.FastMap;
-
if (!fromDate) {
return;
}
@@ -41,7 +38,7 @@ if (!parameters.glFiscalTypeId) {
// Posted transactions totals and grand totals
postedTotalDebit = BigDecimal.ZERO;
postedTotalCredit = BigDecimal.ZERO;
-andExprs = FastList.newInstance();
+andExprs = [];
andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
andExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y"));
andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, parameters.glFiscalTypeId));
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/IncomeStatement.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/IncomeStatement.groovy?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/IncomeStatement.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/IncomeStatement.groovy Fri Apr 10 20:22:54 2015
@@ -25,8 +25,6 @@ import org.ofbiz.entity.condition.Entity
import org.ofbiz.accounting.util.UtilAccounting;
import org.ofbiz.party.party.PartyWorker;
-import javolution.util.FastList;
-
if (!fromDate) {
return;
}
@@ -57,7 +55,7 @@ List sgaExpenseAccountClassIds = UtilAcc
GenericValue depreciationGlAccountClass = from("GlAccountClass").where("glAccountClassId", "DEPRECIATION").cache(true).queryOne();
List depreciationAccountClassIds = UtilAccounting.getDescendantGlAccountClassIds(depreciationGlAccountClass);
-List mainAndExprs = FastList.newInstance();
+List mainAndExprs = [];
mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y"));
mainAndExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId));
@@ -72,7 +70,7 @@ List balanceTotalList = [];
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List revenueAndExprs = FastList.newInstance(mainAndExprs);
+List revenueAndExprs = mainAndExprs as LinkedList;
revenueAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, revenueAccountClassIds));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(revenueAndExprs).orderBy("glAccountId").queryList();
if (transactionTotals) {
@@ -115,7 +113,7 @@ context.revenueBalanceTotal = balanceTot
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List contraRevenueAndExprs = FastList.newInstance(mainAndExprs);
+List contraRevenueAndExprs = mainAndExprs as LinkedList;
contraRevenueAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, contraRevenueAccountClassIds));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(contraRevenueAndExprs).orderBy("glAccountId").queryList();
if (transactionTotals) {
@@ -157,7 +155,7 @@ balanceTotalList.add(UtilMisc.toMap("tot
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List expenseAndExprs = FastList.newInstance(mainAndExprs);
+List expenseAndExprs = mainAndExprs as LinkedList;
expenseAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, expenseAccountClassIds));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(expenseAndExprs).queryList();
if (transactionTotals) {
@@ -200,7 +198,7 @@ context.expenseBalanceTotal = balanceTot
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List cogsExpenseAndExprs = FastList.newInstance(mainAndExprs);
+List cogsExpenseAndExprs = mainAndExprs as LinkedList;
cogsExpenseAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, cogsExpenseAccountClassIds));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(cogsExpenseAndExprs).orderBy("glAccountId").queryList();
if (transactionTotals) {
@@ -242,7 +240,7 @@ balanceTotalList.add(UtilMisc.toMap("tot
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List sgaExpenseAndExprs = FastList.newInstance(mainAndExprs);
+List sgaExpenseAndExprs = mainAndExprs as LinkedList;
sgaExpenseAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, sgaExpenseAccountClassIds));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(sgaExpenseAndExprs).orderBy("glAccountId").queryList();
if (transactionTotals) {
@@ -283,7 +281,7 @@ sgaExpense = balanceTotal;
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List depreciationAndExprs = FastList.newInstance(mainAndExprs);
+List depreciationAndExprs = mainAndExprs as LinkedList;
depreciationAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, depreciationAccountClassIds));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(depreciationAndExprs).orderBy("glAccountId").queryList();
if (transactionTotals) {
@@ -324,7 +322,7 @@ depreciation = balanceTotal;
accountBalanceList = [];
transactionTotals = [];
balanceTotal = BigDecimal.ZERO;
-List incomeAndExprs = FastList.newInstance(mainAndExprs);
+List incomeAndExprs = mainAndExprs as LinkedList;
incomeAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, incomeAccountClassIds));
transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(incomeAndExprs).orderBy("glAccountId").queryList();
if (transactionTotals) {
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy Fri Apr 10 20:22:54 2015
@@ -17,9 +17,6 @@
* under the License.
*/
-import javolution.util.FastList;
-import javolution.util.FastSet;
-import javolution.util.FastMap;
import org.ofbiz.base.util.*;
import org.ofbiz.entity.*;
import org.ofbiz.entity.condition.*;
@@ -35,12 +32,12 @@ productMemberList = from("ProductCategor
categoryRollupList = from("ProductCategoryRollup").where("parentProductCategoryId", rootProductCategoryId).orderBy("sequenceNum").queryList();
// for use in the queries
-productIdSet = FastSet.newInstance();
-productCategoryIdSet = FastSet.newInstance();
+productIdSet = [];
+productCategoryIdSet = [];
// for use in the templates
-productList = FastList.newInstance();
-productCategoryList = FastList.newInstance();
+productList = [];
+productCategoryList = [];
productMemberList.each { productMember ->
if (!productIdSet.contains(productMember.productId)) {
@@ -56,14 +53,14 @@ categoryRollupList.each { categoryRollup
}
//NOTE: tax, etc also have productId on them, so restrict by type INV_PROD_ITEM, INV_FPROD_ITEM, INV_DPROD_ITEM, others?
-baseProductAndExprs = FastList.newInstance();
+baseProductAndExprs = [];
baseProductAndExprs.add(EntityCondition.makeCondition("invoiceTypeId", EntityOperator.EQUALS, "SALES_INVOICE"));
baseProductAndExprs.add(EntityCondition.makeCondition("invoiceItemTypeId", EntityOperator.IN, ["INV_PROD_ITEM", "INV_FPROD_ITEM", "INV_DPROD_ITEM"]));
baseProductAndExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.IN, ["INVOICE_READY", "INVOICE_PAID"]));
if (organizationPartyId) baseProductAndExprs.add(EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, organizationPartyId));
if (currencyUomId) baseProductAndExprs.add(EntityCondition.makeCondition("currencyUomId", EntityOperator.EQUALS, currencyUomId));
-baseCategoryAndExprs = FastList.newInstance();
+baseCategoryAndExprs = [];
baseCategoryAndExprs.add(EntityCondition.makeCondition("invoiceTypeId", EntityOperator.EQUALS, "SALES_INVOICE"));
baseCategoryAndExprs.add(EntityCondition.makeCondition("invoiceItemTypeId", EntityOperator.IN, ["INV_PROD_ITEM", "INV_FPROD_ITEM", "INV_DPROD_ITEM"]));
baseCategoryAndExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.IN, ["INVOICE_READY", "INVOICE_PAID"]));
@@ -83,13 +80,13 @@ nextMonthCal.setTimeInMillis(monthCal.ge
nextMonthCal.add(Calendar.MONTH, 1);
// iterate through the days and do the queries
-productResultMapByDayList = FastList.newInstance();
-productNullResultByDayList = FastList.newInstance();
-categoryResultMapByDayList = FastList.newInstance();
-
-monthProductResultMap = FastMap.newInstance();
-monthCategoryResultMap = FastMap.newInstance();
-monthProductNullResult = FastMap.newInstance();
+productResultMapByDayList = [];
+productNullResultByDayList = [];
+categoryResultMapByDayList = [];
+
+monthProductResultMap = [:];
+monthCategoryResultMap = [:];
+monthProductNullResult = [:];
daysInMonth = monthCal.getActualMaximum(Calendar.DAY_OF_MONTH);
for (int currentDay = 0; currentDay <= daysInMonth; currentDay++) {
@@ -101,14 +98,14 @@ for (int currentDay = 0; currentDay <= d
nextDayBegin = new java.sql.Timestamp(currentDayCal.getTimeInMillis());
// do the product find
- productAndExprs = FastList.newInstance();
+ productAndExprs = [];
productAndExprs.addAll(baseProductAndExprs);
if (productIdSet) productAndExprs.add(EntityCondition.makeCondition("productId", EntityOperator.IN, productIdSet));
productAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.GREATER_THAN_EQUAL_TO, currentDayBegin));
productAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.LESS_THAN, nextDayBegin));
productResultListIterator = select("productId", "quantityTotal", "amountTotal").from("InvoiceItemProductSummary").where(productAndExprs).cursorScrollInsensitive().cache(true).queryIterator();
- productResultMap = FastMap.newInstance();
+ productResultMap = [:];
while ((productResult = productResultListIterator.next())) {
productResultMap[productResult.productId] = productResult;
monthProductResult = UtilMisc.getMapFromMap(monthProductResultMap, productResult.productId);
@@ -119,13 +116,13 @@ for (int currentDay = 0; currentDay <= d
productResultMapByDayList.add(productResultMap);
// do the category find
- categoryAndExprs = FastList.newInstance();
+ categoryAndExprs = [];
categoryAndExprs.addAll(baseCategoryAndExprs);
categoryAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.GREATER_THAN_EQUAL_TO, currentDayBegin));
categoryAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.LESS_THAN, nextDayBegin));
categoryResultListIterator = select("productCategoryId", "quantityTotal", "amountTotal").from(InvoiceItemCategorySummary).where(categoryAndExprs).cursorScrollInsensitive().cache(true).queryIterator();
- categoryResultMap = FastMap.newInstance();
+ categoryResultMap = [:];
while ((categoryResult = categoryResultListIterator.next())) {
categoryResultMap[categoryResult.productCategoryId] = categoryResult;
monthCategoryResult = UtilMisc.getMapFromMap(monthCategoryResultMap, categoryResult.productCategoryId);
@@ -136,7 +133,7 @@ for (int currentDay = 0; currentDay <= d
categoryResultMapByDayList.add(categoryResultMap);
// do a find for InvoiceItem with a null productId
- productNullAndExprs = FastList.newInstance();
+ productNullAndExprs = [];
productNullAndExprs.addAll(baseProductAndExprs);
productNullAndExprs.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, null));
productNullAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.GREATER_THAN_EQUAL_TO, currentDayBegin));
@@ -151,7 +148,7 @@ for (int currentDay = 0; currentDay <= d
UtilMisc.addToBigDecimalInMap(monthProductNullResult, "amountTotal", productNullResult.getBigDecimal("amountTotal"));
} else {
// no result, add an empty Map place holder
- productNullResultByDayList.add(FastMap.newInstance());
+ productNullResultByDayList.add([:]);
}
}
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy Fri Apr 10 20:22:54 2015
@@ -28,8 +28,6 @@ import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.accounting.util.UtilAccounting;
-import javolution.util.FastList;
-
import java.sql.Date;
if (!fromDate) {
@@ -55,7 +53,7 @@ if (lastClosedDate) {
postedTotals = [];
postedTotalDebit = BigDecimal.ZERO;
postedTotalCredit = BigDecimal.ZERO;
-andExprs = FastList.newInstance();
+andExprs = [];
andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
andExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y"));
andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId));
@@ -89,7 +87,7 @@ if (postedTransactionTotals) {
accountMap.put("balance", BigDecimal.ZERO);
}
//
- List mainAndExprs = FastList.newInstance();
+ List mainAndExprs = [];
mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y"));
mainAndExprs.add(EntityCondition.makeCondition("glAccountId", EntityOperator.EQUALS, postedTransactionTotal.glAccountId));
@@ -108,7 +106,7 @@ if (postedTransactionTotals) {
postedTotals = postedTransactionTotalsMap.values().asList();
}
// Posted grand total for Debits
-andExprs = FastList.newInstance();
+andExprs = [];
andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
andExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y"));
andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId));
@@ -123,7 +121,7 @@ if (postedDebitTransactionTotals) {
}
}
// Posted grand total for Credits
-andExprs = FastList.newInstance();
+andExprs = [];
andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
andExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y"));
andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId));
@@ -145,7 +143,7 @@ context.postedTransactionTotals = posted
unpostedTotals = [];
unpostedTotalDebit = BigDecimal.ZERO;
unpostedTotalCredit = BigDecimal.ZERO;
-andExprs = FastList.newInstance();
+andExprs = [];
andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
andExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "N"));
andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId));
@@ -180,7 +178,7 @@ if (unpostedTransactionTotals) {
accountMap.put("balance", BigDecimal.ZERO);
}
//
- List mainAndExprs = FastList.newInstance();
+ List mainAndExprs = [];
mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "N"));
mainAndExprs.add(EntityCondition.makeCondition("glAccountId", EntityOperator.EQUALS, unpostedTransactionTotal.glAccountId));
@@ -199,7 +197,7 @@ if (unpostedTransactionTotals) {
unpostedTotals = unpostedTransactionTotalsMap.values().asList();
}
// Unposted grand total for Debits
-andExprs = FastList.newInstance();
+andExprs = [];
andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
andExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "N"));
andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId));
@@ -214,7 +212,7 @@ if (unpostedDebitTransactionTotals) {
}
}
// Unposted grand total for Credits
-andExprs = FastList.newInstance();
+andExprs = [];
andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
andExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "N"));
andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId));
@@ -237,7 +235,7 @@ context.unpostedTransactionTotals = unpo
allTotals = [];
allTotalDebit = BigDecimal.ZERO;
allTotalCredit = BigDecimal.ZERO;
-andExprs = FastList.newInstance();
+andExprs = [];
andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId));
andExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate));
@@ -255,7 +253,7 @@ if (allTransactionTotals) {
// Get the opening balances at the end of the last closed time period
if (UtilAccounting.isAssetAccount(glAccount) || UtilAccounting.isLiabilityAccount(glAccount) || UtilAccounting.isEquityAccount(glAccount)) {
if (lastClosedTimePeriod) {
- List timePeriodAndExprs = FastList.newInstance();
+ List timePeriodAndExprs = [];
timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.EQUALS, organizationPartyId));
timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountId", EntityOperator.EQUALS, allTransactionTotal.glAccountId));
timePeriodAndExprs.add(EntityCondition.makeCondition("customTimePeriodId", EntityOperator.EQUALS, lastClosedTimePeriod.customTimePeriodId));
@@ -275,7 +273,7 @@ if (allTransactionTotals) {
accountMap.put("balance", BigDecimal.ZERO);
}
//
- List mainAndExprs = FastList.newInstance();
+ List mainAndExprs = [];
mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "N"));
mainAndExprs.add(EntityCondition.makeCondition("glAccountId", EntityOperator.EQUALS, allTransactionTotal.glAccountId));
@@ -294,7 +292,7 @@ if (allTransactionTotals) {
allTotals = allTransactionTotalsMap.values().asList();
}
// Posted and unposted grand total for Debits
-andExprs = FastList.newInstance();
+andExprs = [];
andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId));
andExprs.add(EntityCondition.makeCondition("debitCreditFlag", EntityOperator.EQUALS, "D"));
@@ -308,7 +306,7 @@ if (allDebitTransactionTotals) {
}
}
// Posted and unposted grand total for Credits
-andExprs = FastList.newInstance();
+andExprs = [];
andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId));
andExprs.add(EntityCondition.makeCondition("debitCreditFlag", EntityOperator.EQUALS, "C"));
Modified: ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProdCatalog.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProdCatalog.groovy?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProdCatalog.groovy (original)
+++ ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProdCatalog.groovy Fri Apr 10 20:22:54 2015
@@ -18,13 +18,12 @@
*/
import org.ofbiz.base.util.*
import org.ofbiz.entity.util.EntityUtil;
- import javolution.util.FastList;
import org.ofbiz.product.catalog.*;
prodCatalog = null;
prodCatalogId = parameters.prodCatalogId;
showScreen = "origin";
- List errMsgList = FastList.newInstance();
+ List errMsgList = [];
productStore = EntityUtil.getFirst(delegator.findByAnd("ProductStore", [payToPartyId: partyId], null, false));
if(productStore){
@@ -33,7 +32,7 @@
if(UtilValidate.isEmpty(productStore)){
errMsgList.add("Product Store not set!");
showScreen = "message";
- }else{
+ } else {
facility = delegator.findOne("Facility", [facilityId : productStore.inventoryFacilityId], false);
webSite = EntityUtil.getFirst(delegator.findByAnd("WebSite", [productStoreId: productStore.productStoreId], null, false));
Modified: ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProductStoreAndWebSite.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProductStoreAndWebSite.groovy?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProductStoreAndWebSite.groovy (original)
+++ ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProductStoreAndWebSite.groovy Fri Apr 10 20:22:54 2015
@@ -18,8 +18,6 @@
*/
import org.ofbiz.base.util.*
import org.ofbiz.entity.util.EntityUtil;
- import javolution.util.FastList;
- import javolution.util.FastMap;
productStoreId = null;
Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml Fri Apr 10 20:22:54 2015
@@ -1390,7 +1390,7 @@
</entity-and>
<!-- Get all categories -->
- <call-class-method method-name="newInstance" class-name="javolution.util.FastList" ret-field="parameters.productCategories"/>
+ <set field="parameters.productCategories" value="${groovy: [];}" type="List"/>
<iterate entry="prodCatalogCategory" list="prodCatalogCategoryList">
<set field="rootProductCategoryId" from-field="prodCatalogCategory.productCategoryId"/>
<entity-and list="productCategoryRollupList" entity-name="ProductCategoryRollup" filter-by-date="true">
Modified: ofbiz/trunk/applications/content/src/ControlApplet.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/ControlApplet.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/ControlApplet.java (original)
+++ ofbiz/trunk/applications/content/src/ControlApplet.java Fri Apr 10 20:22:54 2015
@@ -28,11 +28,10 @@ import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
+import java.util.HashMap;
import java.util.Map;
import java.util.Set;
-import javolution.util.FastMap;
-
import org.ofbiz.base.util.UtilValidate;
/**
@@ -132,7 +131,7 @@ public class ControlApplet extends Apple
}
protected void pull() {
- Map<String, Object> params = FastMap.newInstance();
+ Map<String, Object> params = new HashMap<String, Object>();
params.put("sessionId", this.sessionId.trim());
params.put("visitId", this.visitId.trim());
@@ -162,7 +161,7 @@ public class ControlApplet extends Apple
}
protected void push() {
- Map<String, Object> params = FastMap.newInstance();
+ Map<String, Object> params = new HashMap<String, Object>();
params.put("sessionId", this.sessionId.trim());
params.put("visitId", this.visitId.trim());
params.put("currentPage", this.currentPage.trim());
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java Fri Apr 10 20:22:54 2015
@@ -19,6 +19,7 @@
package org.ofbiz.content;
import java.sql.Timestamp;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -27,8 +28,6 @@ import javax.servlet.http.HttpServletReq
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
-import javolution.util.FastMap;
-
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.GeneralException;
import org.ofbiz.base.util.StringUtil;
@@ -86,7 +85,7 @@ public class ContentManagementEvents {
/*
Set keySet = paramMap.keySet();
Iterator itKeySet = keySet.iterator();
- Map contentIdLookup = FastMap.newInstance();
+ Map contentIdLookup = new HashMap<String, Object>();
while (itKeySet.hasNext()) {
String idxAndContentId = (String)itKeySet.next();
int pos = idxAndContentId.indexOf("_");
@@ -110,7 +109,7 @@ public class ContentManagementEvents {
String paramName = Integer.toString(counter) + "_" + pubContentId;
String paramValue = (String)paramMap.get(paramName);
//if (Debug.infoOn()) Debug.logInfo("in updateStaticValues, contentId:" + contentId + " pubContentId:" + pubContentId + " pubValue:" + pubValue + " paramName:" + paramName + " paramValue:" + paramValue, module);
- Map<String, Object> serviceIn = FastMap.newInstance();
+ Map<String, Object> serviceIn = new HashMap<String, Object>();
serviceIn.put("userLogin", userLogin);
serviceIn.put("contentIdTo", contentId);
serviceIn.put("contentId", pubContentId);
@@ -208,7 +207,7 @@ public class ContentManagementEvents {
// make a map of the values that are passed in using the top subSite as the key.
// Content can only be linked to one subsite under a top site (ends with "_MASTER")
- Map<String, String> siteIdLookup = FastMap.newInstance();
+ Map<String, String> siteIdLookup = new HashMap<String, String>();
for (String param : paramMap.keySet()) {
int pos = param.indexOf("select_");
//if (Debug.infoOn()) Debug.logInfo("in updatePublishLinks, param:" + param + " pos:" + pos , module);
@@ -268,7 +267,7 @@ public class ContentManagementEvents {
}
}
// create new link
- Map<String, Object> serviceIn = FastMap.newInstance();
+ Map<String, Object> serviceIn = new HashMap<String, Object>();
serviceIn.put("userLogin", userLogin);
serviceIn.put("contentId", targContentId);
serviceIn.put("contentAssocTypeId", "PUBLISH_LINK");
@@ -287,7 +286,7 @@ public class ContentManagementEvents {
return "error";
}
- serviceIn = FastMap.newInstance();
+ serviceIn = new HashMap<String, Object>();
serviceIn.put("userLogin", userLogin);
serviceIn.put("contentId", targContentId);
serviceIn.put("contentAssocTypeId", "PUBLISH_LINK");
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java Fri Apr 10 20:22:54 2015
@@ -21,15 +21,14 @@ package org.ofbiz.content;
import java.math.BigDecimal;
import java.nio.ByteBuffer;
import java.sql.Timestamp;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
-import javolution.util.FastList;
-import javolution.util.FastMap;
-import javolution.util.FastSet;
-
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.StringUtil;
import org.ofbiz.base.util.UtilDateTime;
@@ -85,7 +84,7 @@ public class ContentManagementServices {
if (UtilValidate.isNotEmpty(assocTypesString)) {
List<String> lst = StringUtil.split(assocTypesString, "|");
if (assocTypes == null) {
- assocTypes = FastList.newInstance();
+ assocTypes = new LinkedList<String>();
}
assocTypes.addAll(lst);
}
@@ -162,7 +161,7 @@ public class ContentManagementServices {
// ContentPurposes can get passed in as a delimited string or a list. Combine.
List<String> contentPurposeList = UtilGenerics.checkList(context.get("contentPurposeList"));
if (contentPurposeList == null) {
- contentPurposeList = FastList.newInstance();
+ contentPurposeList = new LinkedList<String>();
}
String contentPurposeString = (String) context.get("contentPurposeString");
if (UtilValidate.isNotEmpty(contentPurposeString)) {
@@ -255,7 +254,7 @@ public class ContentManagementServices {
Debug.logInfo("in persist... dataResourceTypeId(0):" + dataResourceTypeId, null);
}
if (UtilValidate.isNotEmpty(dataResourceTypeId)) {
- Map<String, Object> dataResourceResult = FastMap.newInstance();
+ Map<String, Object> dataResourceResult = new HashMap<String, Object>();
try {
dataResourceResult = persistDataResourceAndDataMethod(dctx, context);
} catch (GenericServiceException e) {
@@ -297,12 +296,12 @@ public class ContentManagementServices {
return ServiceUtil.returnError(e.toString());
}
}
- //List targetOperations = FastList.newInstance();
+ //List targetOperations = new LinkedList<String>();
//context.put("targetOperations", targetOperations);
context.putAll(content);
if (contentExists) {
//targetOperations.add("CONTENT_UPDATE");
- Map<String, Object> contentContext = FastMap.newInstance();
+ Map<String, Object> contentContext = new HashMap<String, Object>();
ModelService contentModel = dispatcher.getDispatchContext().getModelService("updateContent");
contentContext.putAll(contentModel.makeValid(content, "IN"));
contentContext.put("userLogin", userLogin);
@@ -316,7 +315,7 @@ public class ContentManagementServices {
//Map thisResult = ContentServices.updateContentMethod(dctx, context);
} else {
//targetOperations.add("CONTENT_CREATE");
- Map<String, Object> contentContext = FastMap.newInstance();
+ Map<String, Object> contentContext = new HashMap<String, Object>();
ModelService contentModel = dispatcher.getDispatchContext().getModelService("createContent");
contentContext.putAll(contentModel.makeValid(content, "IN"));
contentContext.put("userLogin", userLogin);
@@ -353,7 +352,7 @@ public class ContentManagementServices {
} else if (UtilValidate.isNotEmpty(dataResourceTypeId) && UtilValidate.isNotEmpty(contentId)) {
// If dataResource was not previously existing, then update the associated content with its id
if (UtilValidate.isNotEmpty(dataResourceId) && !dataResourceExists) {
- Map<String, Object> map = FastMap.newInstance();
+ Map<String, Object> map = new HashMap<String, Object>();
map.put("userLogin", userLogin);
map.put("dataResourceId", dataResourceId);
map.put("contentId", contentId);
@@ -374,7 +373,7 @@ public class ContentManagementServices {
if (UtilValidate.isNotEmpty(contentAssocTypeId) && contentAssoc.get("contentId") != null && contentAssoc.get("contentIdTo") != null) {
if (Debug.infoOn())
Debug.logInfo("in persistContentAndAssoc, deactivateExisting:" + deactivateExisting, null);
- Map<String, Object> contentAssocContext = FastMap.newInstance();
+ Map<String, Object> contentAssocContext = new HashMap<String, Object>();
contentAssocContext.put("userLogin", userLogin);
contentAssocContext.put("displayFailCond", bDisplayFailCond);
contentAssocContext.put("skipPermissionCheck", context.get("skipPermissionCheck"));
@@ -447,7 +446,7 @@ public class ContentManagementServices {
Delegator delegator = dctx.getDelegator();
GenericValue userLogin = (GenericValue)context.get("userLogin");
//String userLoginPartyId = userLogin.getString("partyId");
- Map<String, Object> results = FastMap.newInstance();
+ Map<String, Object> results = new HashMap<String, Object>();
// siteContentId will equal "ADMIN_MASTER", "AGINC_MASTER", etc.
// Remember that this service is called in the "multi" mode,
// with a new siteContentId each time.
@@ -469,7 +468,7 @@ public class ContentManagementServices {
}
for (GenericValue roleType : siteRoles) {
- Map<String, Object> serviceContext = FastMap.newInstance();
+ Map<String, Object> serviceContext = new HashMap<String, Object>();
serviceContext.put("partyId", partyId);
serviceContext.put("contentId", siteContentId);
serviceContext.put("userLogin", userLogin);
@@ -494,7 +493,7 @@ public class ContentManagementServices {
//return ServiceUtil.returnError(e.toString());
if (fromDate == null) {
try {
- Map<String, Object> newContext = FastMap.newInstance();
+ Map<String, Object> newContext = new HashMap<String, Object>();
newContext.put("contentId", serviceContext.get("contentId"));
newContext.put("partyId", serviceContext.get("partyId"));
newContext.put("roleTypeId", serviceContext.get("roleTypeId"));
@@ -525,7 +524,7 @@ public class ContentManagementServices {
//Timestamp thruDate = UtilDateTime.nowTimestamp();
//serviceContext.put("thruDate", thruDate);
//serviceContext.put("fromDate", fromDate);
- Map<String, Object> newContext = FastMap.newInstance();
+ Map<String, Object> newContext = new HashMap<String, Object>();
newContext.put("contentId", serviceContext.get("contentId"));
newContext.put("partyId", serviceContext.get("partyId"));
newContext.put("roleTypeId", serviceContext.get("roleTypeId"));
@@ -552,7 +551,7 @@ public class ContentManagementServices {
LocalDispatcher dispatcher = dctx.getDispatcher();
//String contentId = (String)context.get("contentId");
Locale locale = (Locale) context.get("locale");
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
try {
//GenericValue content = EntityQuery.use(delegator).from("Content").where("contentId", contentId).queryOne();
ModelService checkPermModel = dispatcher.getDispatchContext().getModelService("checkContentPermission");
@@ -586,8 +585,8 @@ public class ContentManagementServices {
Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
- Map<String, Object> result = FastMap.newInstance();
- Map<String, Object> newDrContext = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> newDrContext = new HashMap<String, Object>();
GenericValue dataResource = delegator.makeValue("DataResource");
dataResource.setPKFields(context);
dataResource.setNonPKFields(context);
@@ -648,7 +647,7 @@ public class ContentManagementServices {
Debug.logInfo("in persist... dataResourceId(0):" + dataResourceId, null);
}
dataResource = (GenericValue)thisResult.get("dataResource");
- Map<String, Object> fileContext = FastMap.newInstance();
+ Map<String, Object> fileContext = new HashMap<String, Object>();
fileContext.put("userLogin", userLogin);
if (dataResourceTypeId.equals("IMAGE_OBJECT")) {
if (imageDataBytes != null) {
@@ -680,7 +679,7 @@ public class ContentManagementServices {
if (UtilValidate.isNotEmpty(errorMsg)) {
return ServiceUtil.returnError(errorMsg);
}
- Map<String, Object> fileContext = FastMap.newInstance();
+ Map<String, Object> fileContext = new HashMap<String, Object>();
fileContext.put("userLogin", userLogin);
String forceElectronicText = (String)context.get("forceElectronicText");
if (dataResourceTypeId.equals("IMAGE_OBJECT")) {
@@ -708,7 +707,7 @@ public class ContentManagementServices {
}
}
if (dataResourceTypeId.indexOf("_FILE") >=0) {
- Map<String, Object> uploadImage = FastMap.newInstance();
+ Map<String, Object> uploadImage = new HashMap<String, Object>();
uploadImage.put("userLogin", userLogin);
uploadImage.put("dataResourceId", dataResourceId);
uploadImage.put("dataResourceTypeId", dataResourceTypeId);
@@ -736,8 +735,8 @@ public class ContentManagementServices {
public static Map<String, Object> updateSiteRolesDyn(DispatchContext dctx, Map<String, ? extends Object> context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
Delegator delegator = dctx.getDelegator();
- Map<String, Object> results = FastMap.newInstance();
- Map<String, Object> serviceContext = FastMap.newInstance();
+ Map<String, Object> results = new HashMap<String, Object>();
+ Map<String, Object> serviceContext = new HashMap<String, Object>();
// siteContentId will equal "ADMIN_MASTER", "AGINC_MASTER", etc.
// Remember that this service is called in the "multi" mode,
// with a new siteContentId each time.
@@ -790,7 +789,7 @@ public class ContentManagementServices {
//Timestamp thruDate = UtilDateTime.nowTimestamp();
//serviceContext.put("thruDate", thruDate);
//serviceContext.put("fromDate", fromDate);
- Map<String, Object> newContext = FastMap.newInstance();
+ Map<String, Object> newContext = new HashMap<String, Object>();
newContext.put("contentId", serviceContext.get("contentId"));
newContext.put("partyId", serviceContext.get("partyId"));
newContext.put("roleTypeId", serviceContext.get("roleTypeId"));
@@ -807,12 +806,12 @@ public class ContentManagementServices {
}
public static Map<String, Object> updateOrRemove(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> results = FastMap.newInstance();
+ Map<String, Object> results = new HashMap<String, Object>();
Delegator delegator = dctx.getDelegator();
String entityName = (String)context.get("entityName");
String action = (String)context.get("action");
String pkFieldCount = (String)context.get("pkFieldCount");
- Map<String, String> pkFields = FastMap.newInstance();
+ Map<String, String> pkFields = new HashMap<String, String>();
int fieldCount = Integer.parseInt(pkFieldCount);
for (int i=0; i<fieldCount; i++) {
String fieldName = (String)context.get("fieldName" + i);
@@ -861,7 +860,7 @@ public class ContentManagementServices {
}
public static Map<String, Object> resequence(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
Delegator delegator = dctx.getDelegator();
String contentIdTo = (String)context.get("contentIdTo");
Integer seqInc = (Integer)context.get("seqInc");
@@ -871,7 +870,7 @@ public class ContentManagementServices {
int seqIncrement = seqInc.intValue();
List<String> typeList = UtilGenerics.checkList(context.get("typeList"));
if (typeList == null) {
- typeList = FastList.newInstance();
+ typeList = new LinkedList<String>();
}
String contentAssocTypeId = (String)context.get("contentAssocTypeId");
if (UtilValidate.isNotEmpty(contentAssocTypeId)) {
@@ -941,7 +940,7 @@ public class ContentManagementServices {
}
public static Map<String, Object> changeLeafToNode(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
String contentId = (String)context.get("contentId");
@@ -1007,7 +1006,7 @@ public class ContentManagementServices {
}
public static Map<String, Object> updateLeafCount(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
Delegator delegator = dctx.getDelegator();
List<String> typeList = UtilGenerics.checkList(context.get("typeList"));
if (typeList == null) {
@@ -1027,7 +1026,7 @@ public class ContentManagementServices {
/*
public static Map<String, Object> updateLeafChange(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
- Map result = FastMap.newInstance();
+ Map result = new HashMap<String, Object>();
Delegator delegator = dctx.getDelegator();
List typeList = (List)context.get("typeList");
if (typeList == null)
@@ -1090,11 +1089,11 @@ public class ContentManagementServices {
public static Map<String, Object> updatePageType(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceException{
Delegator delegator = dctx.getDelegator();
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
- Map<String, Object> results = FastMap.newInstance();
+ Map<String, Object> results = new HashMap<String, Object>();
Locale locale = (Locale) context.get("locale");
Set<String> visitedSet = UtilGenerics.checkSet(context.get("visitedSet"));
if (visitedSet == null) {
- visitedSet = FastSet.newInstance();
+ visitedSet = new HashSet<String>();
context.put("visitedSet", visitedSet);
}
String pageMode = (String)context.get("pageMode");
@@ -1130,11 +1129,11 @@ public class ContentManagementServices {
public static Map<String, Object> resetToOutlineMode(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceException{
Delegator delegator = dctx.getDelegator();
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
- Map<String, Object> results = FastMap.newInstance();
+ Map<String, Object> results = new HashMap<String, Object>();
Locale locale = (Locale) context.get("locale");
Set<String> visitedSet = UtilGenerics.checkSet(context.get("visitedSet"));
if (visitedSet == null) {
- visitedSet = FastSet.newInstance();
+ visitedSet = new HashSet<String>();
context.put("visitedSet", visitedSet);
}
String contentId = (String)context.get("contentId");
@@ -1173,7 +1172,7 @@ public class ContentManagementServices {
}
public static Map<String, Object> clearContentAssocViewCache(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
- Map<String, Object> results = FastMap.newInstance();
+ Map<String, Object> results = new HashMap<String, Object>();
UtilCache<?, ?> utilCache = UtilCache.findCache("entitycache.entity-list.default.ContentAssocViewFrom");
if (utilCache != null) {
@@ -1189,7 +1188,7 @@ public class ContentManagementServices {
}
public static Map<String, Object> clearContentAssocDataResourceViewCache(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
- Map<String, Object> results = FastMap.newInstance();
+ Map<String, Object> results = new HashMap<String, Object>();
UtilCache<?, ?> utilCache = UtilCache.findCache("entitycache.entity-list.default.ContentAssocViewDataResourceFrom");
if (utilCache != null) {
@@ -1208,7 +1207,7 @@ public class ContentManagementServices {
String contentId = content.getString("contentId");
Set<String> visitedSet = UtilGenerics.checkSet(context.get("visitedSet"));
if (visitedSet == null) {
- visitedSet = FastSet.newInstance();
+ visitedSet = new HashSet<String>();
context.put("visitedSet", visitedSet);
} else {
if (visitedSet.contains(contentId)) {
@@ -1241,7 +1240,7 @@ public class ContentManagementServices {
String contentId = content.getString("contentId");
Set<String> visitedSet = UtilGenerics.checkSet(context.get("visitedSet"));
if (visitedSet == null) {
- visitedSet = FastSet.newInstance();
+ visitedSet = new HashSet<String>();
context.put("visitedSet", visitedSet);
} else {
if (visitedSet.contains(contentId)) {
@@ -1280,7 +1279,7 @@ public class ContentManagementServices {
}
public static Map<String, Object> findSubNodes(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
- Map<String, Object> results = FastMap.newInstance();
+ Map<String, Object> results = new HashMap<String, Object>();
Delegator delegator = dctx.getDelegator();
String contentIdTo = (String)context.get("contentId");
try {
@@ -1315,7 +1314,7 @@ public class ContentManagementServices {
}
public static Map<String, Object> initContentChildCounts(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
Locale locale = (Locale) context.get("locale");
GenericValue content = (GenericValue)context.get("content");
if (content == null) {
@@ -1336,7 +1335,7 @@ public class ContentManagementServices {
}
public static Map<String, Object> incrementContentChildStats(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String contentId = (String)context.get("contentId");
@@ -1362,7 +1361,7 @@ public class ContentManagementServices {
}
public static Map<String, Object> decrementContentChildStats(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String contentId = (String)context.get("contentId");
@@ -1388,12 +1387,12 @@ public class ContentManagementServices {
}
public static Map<String, Object> updateContentChildStats(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
Delegator delegator = dctx.getDelegator();
String contentId = (String)context.get("contentId");
String contentAssocTypeId = (String)context.get("contentAssocTypeId");
- List<String> typeList = FastList.newInstance();
+ List<String> typeList = new LinkedList<String>();
if (UtilValidate.isNotEmpty(contentAssocTypeId)) {
typeList.add(contentAssocTypeId);
} else {
@@ -1409,7 +1408,7 @@ public class ContentManagementServices {
}
public static Map<String, Object> updateContentSubscription(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
@@ -1475,7 +1474,7 @@ public class ContentManagementServices {
if (hasExistingContentRole) {
contentRole.store();
} else {
- Map<String, Object> map = FastMap.newInstance();
+ Map<String, Object> map = new HashMap<String, Object>();
map.put("partyId", partyId);
map.put("roleTypeId", roleTypeId);
map.put("userLogin", userLogin);
@@ -1490,7 +1489,7 @@ public class ContentManagementServices {
public static Map<String, Object> updateContentSubscriptionByProduct(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceException{
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
String productId = (String) context.get("productId");
@@ -1542,7 +1541,7 @@ public class ContentManagementServices {
public static Map<String, Object> updateContentSubscriptionByOrder(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceException{
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
String orderId = (String) context.get("orderId");
@@ -1604,14 +1603,14 @@ public class ContentManagementServices {
String contentId = (String)context.get("contentId");
String serviceName = (String)context.get("serviceName");
String contentAssocTypeId = (String)context.get("contentAssocTypeId");
- List<String> contentAssocTypeIdList = FastList.newInstance();
+ List<String> contentAssocTypeIdList = new LinkedList<String>();
if (UtilValidate.isNotEmpty(contentAssocTypeId)) {
contentAssocTypeIdList = StringUtil.split(contentAssocTypeId, "|");
}
if (contentAssocTypeIdList.size() == 0) {
contentAssocTypeIdList.add("SUB_CONTENT");
}
- Map<String, Object> ctx = FastMap.newInstance();
+ Map<String, Object> ctx = new HashMap<String, Object>();
ctx.put("userLogin", userLogin);
ctx.put("contentAssocTypeIdList", contentAssocTypeIdList);
try {
@@ -1631,7 +1630,7 @@ public class ContentManagementServices {
Locale locale = (Locale) context.get("locale");
Set<String> visitedSet = UtilGenerics.checkSet(context.get("visitedSet"));
if (visitedSet == null) {
- visitedSet = FastSet.newInstance();
+ visitedSet = new HashSet<String>();
context.put("visitedSet", visitedSet);
} else {
if (visitedSet.contains(contentId)) {
@@ -1686,9 +1685,9 @@ public class ContentManagementServices {
return ServiceUtil.returnError(errorMsg);
}
String contentId = (String)result.get("contentId");
- List<String> parentList = FastList.newInstance();
+ List<String> parentList = new LinkedList<String>();
if (UtilValidate.isEmpty(masterRevisionContentId)) {
- Map<String, Object> traversMap = FastMap.newInstance();
+ Map<String, Object> traversMap = new HashMap<String, Object>();
traversMap.put("contentId", contentId);
traversMap.put("direction", "To");
traversMap.put("contentAssocTypeId", "COMPDOC_PART");
@@ -1699,7 +1698,7 @@ public class ContentManagementServices {
}
// Update ContentRevision and ContentRevisonItem
- Map<String, Object> contentRevisionMap = FastMap.newInstance();
+ Map<String, Object> contentRevisionMap = new HashMap<String, Object>();
contentRevisionMap.put("itemContentId", contentId);
contentRevisionMap.put("newDataResourceId", result.get("dataResourceId"));
contentRevisionMap.put("oldDataResourceId", oldDataResourceId);
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java Fri Apr 10 20:22:54 2015
@@ -22,16 +22,15 @@ import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
-import javolution.util.FastList;
-import javolution.util.FastMap;
-
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.GeneralException;
import org.ofbiz.base.util.StringUtil;
@@ -61,8 +60,8 @@ import org.ofbiz.security.Security;
public class ContentManagementWorker {
public static final String module = ContentManagementWorker.class.getName();
- public static Map<String, GenericValue> cachedWebSitePublishPoints = FastMap.newInstance();
- public static Map<String, Map<String, Object>> cachedStaticValues = FastMap.newInstance();
+ public static Map<String, GenericValue> cachedWebSitePublishPoints = new HashMap<String, GenericValue>();
+ public static Map<String, Map<String, Object>> cachedStaticValues = new HashMap<String, Map<String,Object>>();
public static void mruAdd(HttpServletRequest request, GenericEntity pk, String suffix) {
HttpSession session = request.getSession();
@@ -81,7 +80,7 @@ public class ContentManagementWorker {
Map<String, LifoSet<Object>> lookupCaches = UtilGenerics.checkMap(session.getAttribute("lookupCaches"));
if (lookupCaches == null) {
- lookupCaches = FastMap.newInstance();
+ lookupCaches = new HashMap<String, LifoSet<Object>>();
session.setAttribute("lookupCaches", lookupCaches);
}
String entityName = pk.getEntityName();
@@ -154,7 +153,7 @@ public class ContentManagementWorker {
HttpSession session = request.getSession();
Map<String, GenericEntity> currentEntityMap = UtilGenerics.checkMap(session.getAttribute("currentEntityMap"));
if (currentEntityMap == null) {
- currentEntityMap = FastMap.newInstance();
+ currentEntityMap = new HashMap<String, GenericEntity>();
session.setAttribute("currentEntityMap", currentEntityMap);
}
currentEntityMap.put(entityName, ent);
@@ -183,7 +182,7 @@ public class ContentManagementWorker {
HttpSession session = request.getSession();
Map<String, GenericPK> currentEntityMap = UtilGenerics.checkMap(session.getAttribute("currentEntityMap"));
if (currentEntityMap == null) {
- currentEntityMap = FastMap.newInstance();
+ currentEntityMap = new HashMap<String, GenericPK>();
session.setAttribute("currentEntityMap", currentEntityMap);
}
Map<String, Object> paramMap = UtilHttp.getParameterMap(request);
@@ -276,7 +275,7 @@ public class ContentManagementWorker {
}
public static List<String []> getPermittedPublishPoints(Delegator delegator, List<GenericValue> allPublishPoints, GenericValue userLogin, Security security, String permittedAction, String permittedOperations, String passedRoles) throws GeneralException {
- List<String []> permittedPublishPointList = FastList.newInstance();
+ List<String []> permittedPublishPointList = new LinkedList<String[]>();
// Check that user has permission to admin sites
for (GenericValue webSitePP : allPublishPoints) {
@@ -290,7 +289,7 @@ public class ContentManagementWorker {
}
List<String> passedPurposes = UtilMisc.toList("ARTICLE");
List<String> roles = StringUtil.split(passedRoles, "|");
- List<String> targetOperationList = FastList.newInstance();
+ List<String> targetOperationList = new LinkedList<String>();
if (UtilValidate.isEmpty(permittedOperations)) {
targetOperationList.add("CONTENT" + entityAction);
} else {
@@ -323,7 +322,7 @@ public class ContentManagementWorker {
} catch (GenericEntityException e) {
throw new GeneralException(e.getMessage());
}
- List<GenericValue> allPublishPoints = FastList.newInstance();
+ List<GenericValue> allPublishPoints = new LinkedList<GenericValue>();
GenericValue webSitePublishPoint = null;
for (GenericValue contentAssoc : relatedPubPts) {
String pub = (String)contentAssoc.get("contentId");
@@ -336,7 +335,7 @@ public class ContentManagementWorker {
public static Map<String, GenericValue> getPublishPointMap(Delegator delegator, String pubPtId) throws GeneralException {
List<GenericValue> publishPointList = getAllPublishPoints(delegator, pubPtId);
- Map<String, GenericValue> publishPointMap = FastMap.newInstance();
+ Map<String, GenericValue> publishPointMap = new HashMap<String, GenericValue>();
for (GenericValue webSitePublishPoint : publishPointList) {
String pub = (String)webSitePublishPoint.get("contentId");
publishPointMap.put(pub, webSitePublishPoint);
@@ -355,7 +354,7 @@ public class ContentManagementWorker {
}
public static Map<String, GenericValue> getPublishPointMap(Delegator delegator, List<GenericValue> publishPointList) {
- Map<String, GenericValue> publishPointMap = FastMap.newInstance();
+ Map<String, GenericValue> publishPointMap = new HashMap<String, GenericValue>();
for (GenericValue webSitePublishPoint : publishPointList) {
String pub = (String)webSitePublishPoint.get("contentId");
publishPointMap.put(pub, webSitePublishPoint);
@@ -371,13 +370,13 @@ public class ContentManagementWorker {
throw new GeneralException(e.getMessage());
}
- List<Map<String, Object>> staticValueList = FastList.newInstance();
+ List<Map<String, Object>> staticValueList = new LinkedList<Map<String,Object>>();
int counter = 0;
for (GenericValue content : assocValueList) {
String contentId = (String)content.get("contentId");
String contentName = (String)content.get("contentName");
String description = (String)content.get("description");
- Map<String, Object> map = FastMap.newInstance();
+ Map<String, Object> map = new HashMap<String, Object>();
map.put("contentId", contentId);
map.put("contentName", contentName);
map.put("description", description);
@@ -465,7 +464,7 @@ public class ContentManagementWorker {
if (!ignoreCache) {
Map<String, Object> subStaticValueMap = cachedStaticValues.get(parentPlaceholderId);
if (subStaticValueMap == null) {
- subStaticValueMap = FastMap.newInstance();
+ subStaticValueMap = new HashMap<String, Object>();
cachedStaticValues.put(parentPlaceholderId, subStaticValueMap);
}
//Map staticValueMap = (GenericValue)cachedStaticValues.get(web);
@@ -491,15 +490,15 @@ public class ContentManagementWorker {
List<GenericValue> allPublishPointList = getAllPublishPoints(delegator, rootPubId);
//if (Debug.infoOn()) Debug.logInfo("in getPublishLinks, allPublishPointList:" + allPublishPointList, module);
List<String []> publishPointList = getPermittedPublishPoints(delegator, allPublishPointList, userLogin, security , permittedAction, permittedOperations, passedRoles);
- Map<String, Object> publishPointMap = FastMap.newInstance();
- Map<String, Object> publishPointMapAll = FastMap.newInstance();
+ Map<String, Object> publishPointMap = new HashMap<String, Object>();
+ Map<String, Object> publishPointMapAll = new HashMap<String, Object>();
for (String [] arr : publishPointList) {
//GenericValue webSitePublishPoint = (GenericValue)it.next();
//String contentId = (String)webSitePublishPoint.get("contentId");
//String description = (String)webSitePublishPoint.get("description");
String contentId = arr[0];
String description = arr[1];
- List<Object []> subPointList = FastList.newInstance();
+ List<Object []> subPointList = new LinkedList<Object[]>();
Object nullObj = null;
Object [] subArr = {contentId, subPointList, description, nullObj};
publishPointMap.put(contentId, subArr);
@@ -549,7 +548,7 @@ public class ContentManagementWorker {
}
}
- List<Object []> publishedLinkList = FastList.newInstance();
+ List<Object []> publishedLinkList = new LinkedList<Object[]>();
for (String contentId : publishPointMap.keySet()) {
Object [] subPointArr = (Object [])publishPointMap.get(contentId);
publishedLinkList.add(subPointArr);
@@ -581,7 +580,7 @@ public class ContentManagementWorker {
}
public static List<String []> getPermittedDepartmentPoints(Delegator delegator, List<GenericValue> allDepartmentPoints, GenericValue userLogin, Security security, String permittedAction, String permittedOperations, String passedRoles) throws GeneralException {
- List<String []> permittedDepartmentPointList = FastList.newInstance();
+ List<String []> permittedDepartmentPointList = new LinkedList<String[]>();
// Check that user has permission to admin sites
for (GenericValue content : allDepartmentPoints) {
@@ -593,7 +592,7 @@ public class ContentManagementWorker {
entityAction = "_ADMIN";
List<String> passedPurposes = UtilMisc.<String>toList("ARTICLE");
List<String> roles = StringUtil.split(passedRoles, "|");
- List<String> targetOperationList = FastList.newInstance();
+ List<String> targetOperationList = new LinkedList<String>();
if (UtilValidate.isEmpty(permittedOperations)) {
targetOperationList.add("CONTENT" + entityAction);
} else {
@@ -627,7 +626,7 @@ public class ContentManagementWorker {
} catch (GenericEntityException e) {
throw new GeneralException(e.getMessage());
}
- List<GenericValue> allDepartmentPoints = FastList.newInstance();
+ List<GenericValue> allDepartmentPoints = new LinkedList<GenericValue>();
GenericValue departmentContent = null;
for (GenericValue contentAssoc : relatedPubPts) {
String pub = (String)contentAssoc.get("contentId");
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java Fri Apr 10 20:22:54 2015
@@ -21,12 +21,11 @@ package org.ofbiz.content;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import javolution.util.FastMap;
-
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.base.util.UtilMisc;
@@ -109,7 +108,7 @@ In order ta make this service active add
Entity.set("createdTxStamp", UtilDateTime.nowTimestamp());
delegator.create(Entity);
- Map<String, Object> contentAssoc = FastMap.newInstance();
+ Map<String, Object> contentAssoc = new HashMap<String, Object>();
contentAssoc.put("contentId", "HOME_DUCUMENT");
contentAssoc.put("contentAssocTypeId", "TREE_CHILD");
contentAssoc.put("contentIdTo", "ROOT");
@@ -193,7 +192,7 @@ In order ta make this service active add
.queryList();
if (contentAssocs.size() == 0) {
- contentAssoc = FastMap.newInstance();
+ contentAssoc = new HashMap<String, Object>();
contentAssoc.put("contentId", contentId);
contentAssoc.put("contentAssocTypeId", "TREE_CHILD");
contentAssoc.put("contentIdTo", rootContent);
@@ -284,7 +283,7 @@ In order ta make this service active add
contentId = null;
if (contentNameMatch == false) {
//create DataResource
- Map<String,Object> data = FastMap.newInstance();
+ Map<String,Object> data = new HashMap<String, Object>();
data.put("userLogin", userLogin);
String dataResourceId = dispatcher.runSync("createDataResource", data).get("dataResourceId").toString();
//Debug.logInfo("==dataResourceId" + dataResourceId);
@@ -307,7 +306,7 @@ In order ta make this service active add
delegator.create(Entity);
//Relation Content
- Map<String,Object> contentAssoc = FastMap.newInstance();
+ Map<String,Object> contentAssoc = new HashMap<String, Object>();
contentAssoc.put("contentId", contentId);
contentAssoc.put("contentAssocTypeId", "SUB_CONTENT");
contentAssoc.put("contentIdTo", rootContent);
@@ -346,7 +345,7 @@ In order ta make this service active add
contentId = null;
if (contentNameMatch == false) {
//create DataResource
- Map<String,Object> data = FastMap.newInstance();
+ Map<String,Object> data = new HashMap<String, Object>();
data.put("userLogin", userLogin);
String dataResourceId = dispatcher.runSync("createDataResource",data).get("dataResourceId").toString();
//Debug.logInfo("==dataResourceId" + dataResourceId);
@@ -369,7 +368,7 @@ In order ta make this service active add
delegator.create(Entity);
//create ContentAssoc
- Map<String,Object> contentAssoc = FastMap.newInstance();
+ Map<String,Object> contentAssoc = new HashMap<String, Object>();
contentAssoc.put("contentId", contentId);
contentAssoc.put("contentAssocTypeId", "SUB_CONTENT");
contentAssoc.put("contentIdTo", rootContent);