Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java Sun Aug 3 21:02:01 2008 @@ -33,6 +33,7 @@ import javax.xml.parsers.ParserConfigurationException; +import javolution.util.FastList; import javolution.util.FastMap; import org.ofbiz.base.util.BshUtil; @@ -385,27 +386,27 @@ contentId = (String) content.get("contentId"); contentTypeId = (String) content.get("contentTypeId"); List topicList = content.getRelatedByAnd("ToContentAssoc", UtilMisc.toMap("contentAssocTypeId", "TOPIC")); - List topics = new ArrayList(); + List topics = FastList.newInstance(); for (int i = 0; i < topicList.size(); i++) { GenericValue assoc = (GenericValue) topicList.get(i); topics.add(assoc.get("contentId")); } List keywordList = content.getRelatedByAnd("ToContentAssoc", UtilMisc.toMap("contentAssocTypeId", "KEYWORD")); - List keywords = new ArrayList(); + List keywords = FastList.newInstance(); for (int i = 0; i < keywordList.size(); i++) { GenericValue assoc = (GenericValue) keywordList.get(i); keywords.add(assoc.get("contentId")); } List purposeValueList = content.getRelatedCache("ContentPurpose"); - List purposes = new ArrayList(); + List purposes = FastList.newInstance(); for (int i = 0; i < purposeValueList.size(); i++) { GenericValue purposeValue = (GenericValue) purposeValueList.get(i); purposes.add(purposeValue.get("contentPurposeTypeId")); } - List contentTypeAncestry = new ArrayList(); + List contentTypeAncestry = FastList.newInstance(); getContentTypeAncestry(delegator, contentTypeId, contentTypeAncestry); - Map context = new HashMap(); + Map context = FastMap.newInstance(); context.put("content", content); context.put("contentAssocTypeId", contentAssocTypeId); //context.put("related", related); @@ -417,13 +418,13 @@ boolean isReturnBefore = checkReturnWhen(context, (String) whenMap.get("returnBeforePickWhen")); Map thisNode = null; if (isPick || !isReturnBefore) { - thisNode = new HashMap(); + thisNode = FastMap.newInstance(); thisNode.put("contentId", contentId); thisNode.put("contentTypeId", contentTypeId); thisNode.put("contentAssocTypeId", contentAssocTypeId); List kids = (List) masterNode.get("kids"); if (kids == null) { - kids = new ArrayList(); + kids = FastList.newInstance(); masterNode.put("kids", kids); } kids.add(thisNode); @@ -435,9 +436,9 @@ boolean isReturnAfter = checkReturnWhen(context, (String) whenMap.get("returnAfterPickWhen")); if (!isReturnAfter) { - List relatedAssocs = getContentAssocsWithId(delegator, contentId, fromDate, thruDate, direction, new ArrayList()); + List relatedAssocs = getContentAssocsWithId(delegator, contentId, fromDate, thruDate, direction, FastList.newInstance()); Iterator it = relatedAssocs.iterator(); - Map assocContext = new HashMap(); + Map assocContext = FastMap.newInstance(); assocContext.put("related", relatedAssocs); while (it.hasNext()) { GenericValue assocValue = (GenericValue) it.next(); @@ -560,7 +561,7 @@ } public static List getPurposes(GenericValue content) { - List purposes = new ArrayList(); + List purposes = FastList.newInstance(); try { List purposeValueList = content.getRelatedCache("ContentPurpose"); for (int i = 0; i < purposeValueList.size(); i++) { @@ -574,7 +575,7 @@ } public static List getSections(GenericValue content) { - List sections = new ArrayList(); + List sections = FastList.newInstance(); try { List sectionValueList = content.getRelatedCache("FromContentAssoc"); for (int i = 0; i < sectionValueList.size(); i++) { @@ -591,7 +592,7 @@ } public static List getTopics(GenericValue content) { - List topics = new ArrayList(); + List topics = FastList.newInstance(); try { List topicValueList = content.getRelatedCache("FromContentAssoc"); for (int i = 0; i < topicValueList.size(); i++) { @@ -616,7 +617,7 @@ String parentContentId = (String) parentContent.get("contentId"); //if (Debug.infoOn()) Debug.logInfo("traverse, contentAssocTypeId:" + contentAssocTypeId,null); Map whenMap = (Map) ctx.get("whenMap"); - List kids = new ArrayList(); + List kids = FastList.newInstance(); currentNode.put("kids", kids); String direction = (String) ctx.get("direction"); if (UtilValidate.isEmpty(direction)) @@ -707,7 +708,7 @@ } if (Debug.infoOn()) Debug.logInfo("assocList:" + assocList.size() + " contentId:" + currentContent.getString("contentId"), ""); - List contentList = new ArrayList(); + List contentList = FastList.newInstance(); String contentIdName = "contentId"; if (linkDir != null && linkDir.equalsIgnoreCase("TO")) { contentIdName = contentIdName.concat("To"); @@ -737,8 +738,8 @@ } public static List getAssociatedContentView(GenericValue currentContent, String linkDir, List assocTypes, List contentTypes, String fromDate, String thruDate) throws GenericEntityException { - List contentList = new ArrayList(); - List exprListAnd = new ArrayList(); + List contentList = FastList.newInstance(); + List exprListAnd = FastList.newInstance(); String origContentId = (String) currentContent.get("contentId"); String contentIdName = "contentId"; @@ -751,7 +752,7 @@ exprListAnd.add(expr); if (contentTypes.size() > 0) { - List exprListOr = new ArrayList(); + List exprListOr = FastList.newInstance(); Iterator it = contentTypes.iterator(); while (it.hasNext()) { String contentType = (String) it.next(); @@ -762,7 +763,7 @@ exprListAnd.add(contentExprList); } if (assocTypes.size() > 0) { - List exprListOr = new ArrayList(); + List exprListOr = FastList.newInstance(); Iterator it = assocTypes.iterator(); while (it.hasNext()) { String assocType = (String) it.next(); @@ -807,7 +808,7 @@ } public static List getContentAssocsWithId(GenericDelegator delegator, String contentId, Timestamp fromDate, Timestamp thruDate, String direction, List assocTypes) throws GenericEntityException { - List exprList = new ArrayList(); + List exprList = FastList.newInstance(); EntityExpr joinExpr = null; EntityExpr expr = null; if (direction != null && direction.equalsIgnoreCase("From")) { @@ -817,7 +818,7 @@ } exprList.add(joinExpr); if (assocTypes != null && assocTypes.size() > 0) { - List exprListOr = new ArrayList(); + List exprListOr = FastList.newInstance(); Iterator it = assocTypes.iterator(); while (it.hasNext()) { String assocType = (String) it.next(); @@ -832,7 +833,7 @@ exprList.add(fromExpr); } if (thruDate != null) { - List thruList = new ArrayList(); + List thruList = FastList.newInstance(); //thruDate = UtilDateTime.getDayStart(thruDate, daysLater); EntityExpr thruExpr = EntityCondition.makeCondition("thruDate", EntityOperator.LESS_THAN, thruDate); @@ -842,7 +843,7 @@ EntityConditionList thruExprList = EntityCondition.makeCondition(thruList, EntityOperator.OR); exprList.add(thruExprList); } else if (fromDate != null) { - List thruList = new ArrayList(); + List thruList = FastList.newInstance(); EntityExpr thruExpr = EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, fromDate); thruList.add(thruExpr); @@ -950,8 +951,8 @@ public static List getContentAncestryNodeTrail(GenericDelegator delegator, String contentId, String contentAssocTypeId, String direction) throws GenericEntityException { - List contentAncestorList = new ArrayList(); - List nodeTrail = new ArrayList(); + List contentAncestorList = FastList.newInstance(); + List nodeTrail = FastList.newInstance(); getContentAncestry(delegator, contentId, contentAssocTypeId, direction, contentAncestorList); Iterator contentAncestorListIter = contentAncestorList.iterator(); while (contentAncestorListIter.hasNext()) { @@ -964,7 +965,7 @@ public static String getContentAncestryNodeTrailCsv(GenericDelegator delegator, String contentId, String contentAssocTypeId, String direction) throws GenericEntityException { - List contentAncestorList = new ArrayList(); + List contentAncestorList = FastList.newInstance(); getContentAncestry(delegator, contentId, contentAssocTypeId, direction, contentAncestorList); String csv = StringUtil.join(contentAncestorList, ","); return csv; @@ -1018,14 +1019,14 @@ public static Map callContentPermissionCheckResult(GenericDelegator delegator, LocalDispatcher dispatcher, Map context) { - Map permResults = new HashMap(); + Map permResults = FastMap.newInstance(); String skipPermissionCheck = (String) context.get("skipPermissionCheck"); if (skipPermissionCheck == null || skipPermissionCheck.length() == 0 || (!skipPermissionCheck.equalsIgnoreCase("true") && !skipPermissionCheck.equalsIgnoreCase("granted"))) { GenericValue userLogin = (GenericValue) context.get("userLogin"); - Map serviceInMap = new HashMap(); + Map serviceInMap = FastMap.newInstance(); serviceInMap.put("userLogin", userLogin); serviceInMap.put("targetOperationList", context.get("targetOperationList")); serviceInMap.put("contentPurposeList", context.get("contentPurposeList")); @@ -1133,9 +1134,9 @@ GenericValue currentContent = null; String viewContentId = null; if (trail != null && trail.size() > 0) { - passedGlobalNodeTrail = new ArrayList(trail); + passedGlobalNodeTrail = UtilMisc.makeListWritable(trail); } else { - passedGlobalNodeTrail = new ArrayList(); + passedGlobalNodeTrail = FastList.newInstance(); } //if (Debug.infoOn()) Debug.logInfo("in getCurrentContent, passedGlobalNodeTrail(3):" + passedGlobalNodeTrail , module); int sz = passedGlobalNodeTrail.size(); @@ -1201,7 +1202,7 @@ public static Map buildPickContext(GenericDelegator delegator, String contentAssocTypeId, String assocContentId, String direction, GenericValue thisContent) throws GenericEntityException { - Map ctx = new HashMap(); + Map ctx = FastMap.newInstance(); ctx.put("contentAssocTypeId", contentAssocTypeId); ctx.put("contentId", assocContentId); String assocRelation = null; @@ -1219,7 +1220,7 @@ ctx.put("content", thisContent); List purposes = getPurposes(thisContent); ctx.put("purposes", purposes); - List contentTypeAncestry = new ArrayList(); + List contentTypeAncestry = FastList.newInstance(); String contentTypeId = (String)thisContent.get("contentTypeId"); getContentTypeAncestry(delegator, contentTypeId, contentTypeAncestry); ctx.put("typeAncestry", contentTypeAncestry); @@ -1233,14 +1234,14 @@ public static void checkConditions(GenericDelegator delegator, Map trailNode, Map contentAssoc, Map whenMap) { - Map context = new HashMap(); + Map context = FastMap.newInstance(); GenericValue content = (GenericValue)trailNode.get("value"); String contentId = (String)trailNode.get("contentId"); if (contentAssoc == null && content != null && (content.getEntityName().indexOf("Assoc") >= 0)) { contentAssoc = delegator.makeValue("ContentAssoc"); try { // TODO: locale needs to be gotten correctly - SimpleMapProcessor.runSimpleMapProcessor("org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", content, contentAssoc, new ArrayList(), Locale.getDefault()); + SimpleMapProcessor.runSimpleMapProcessor("org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", content, contentAssoc, FastList.newInstance(), Locale.getDefault()); context.put("contentAssocTypeId", contentAssoc.get("contentAssocTypeId")); context.put("contentAssocPredicateId", contentAssoc.get("contentAssocPredicateId")); context.put("mapKey", contentAssoc.get("mapKey")); @@ -1261,7 +1262,7 @@ List topics = getTopics(content); context.put("topics", topics); String contentTypeId = (String)content.get("contentTypeId"); - List contentTypeAncestry = new ArrayList(); + List contentTypeAncestry = FastList.newInstance(); try { getContentTypeAncestry(delegator, contentTypeId, contentTypeAncestry); } catch(GenericEntityException e) { @@ -1296,12 +1297,12 @@ if (UtilValidate.isNotEmpty(targetOperationString) ) { List opsFromString = StringUtil.split(targetOperationString, "|"); if (UtilValidate.isEmpty(targetOperationList)) { - targetOperationList = new ArrayList(); + targetOperationList = FastList.newInstance(); } targetOperationList.addAll(opsFromString); } if (UtilValidate.isEmpty(targetOperationList)) { - targetOperationList = new ArrayList(); + targetOperationList = FastList.newInstance(); if (UtilValidate.isEmpty(md)) md ="_CREATE"; targetOperationList.add("CONTENT" + md); @@ -1324,12 +1325,12 @@ if (UtilValidate.isNotEmpty(contentPurposeString) ) { List purposesFromString = StringUtil.split(contentPurposeString, "|"); if (UtilValidate.isEmpty(contentPurposeList)) { - contentPurposeList = new ArrayList(); + contentPurposeList = FastList.newInstance(); } contentPurposeList.addAll(purposesFromString); } if (UtilValidate.isEmpty(contentPurposeList)) { - contentPurposeList = new ArrayList(); + contentPurposeList = FastList.newInstance(); } if (Debug.infoOn()) Debug.logInfo("in prepContentPurposeList, contentPurposeList(0):" + contentPurposeList, ""); return contentPurposeList; @@ -1352,7 +1353,7 @@ public static List getContentAssocViewList(GenericDelegator delegator, String contentIdTo, String contentId, String contentAssocTypeId, String statusId, String privilegeEnumId) throws GenericEntityException { - List exprListAnd = new ArrayList(); + List exprListAnd = FastList.newInstance(); if (UtilValidate.isNotEmpty(contentIdTo)) { EntityExpr expr = EntityCondition.makeCondition("caContentIdTo", EntityOperator.EQUALS, contentIdTo); @@ -1401,7 +1402,7 @@ if (thisContent == null) return thisNode; - thisNode = new HashMap(); + thisNode = FastMap.newInstance(); thisNode.put("value", thisContent); String contentId = (String)thisContent.get("contentId"); thisNode.put("contentId", contentId); @@ -1443,12 +1444,12 @@ public static List csvToList(String csv, GenericDelegator delegator) { - ArrayList outList = new ArrayList(); + List outList = FastList.newInstance(); List contentIdList = StringUtil.split(csv, ","); GenericValue content = null; String contentId = null; String contentName = null; - ArrayList values = null; + List values = null; Iterator it = contentIdList.iterator(); while (it.hasNext()) { contentId = (String)it.next(); @@ -1456,10 +1457,10 @@ content = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", contentId)); } catch(GenericEntityException e) { Debug.logError(e.getMessage(), module); - return new ArrayList(); + return FastList.newInstance(); } contentName = (String)content.get("contentName"); - values = new ArrayList(); + values = FastList.newInstance(); values.add(contentId); values.add(contentName); outList.add(values); @@ -1469,11 +1470,11 @@ public static List csvToContentList(String csv, GenericDelegator delegator) { - List trail = new ArrayList(); + List trail = FastList.newInstance(); if (csv == null) return trail; - ArrayList outList = new ArrayList(); + List outList = FastList.newInstance(); List contentIdList = StringUtil.split(csv, ","); GenericValue content = null; String contentId = null; @@ -1484,7 +1485,7 @@ content = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", contentId)); } catch(GenericEntityException e) { Debug.logError(e.getMessage(), module); - return new ArrayList(); + return FastList.newInstance(); } trail.add(content); } @@ -1493,7 +1494,7 @@ public static List csvToTrail(String csv, GenericDelegator delegator) { - ArrayList trail = new ArrayList(); + List trail = FastList.newInstance(); if (csv == null) return trail; Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java Sun Aug 3 21:02:01 2008 @@ -18,12 +18,14 @@ *******************************************************************************/ package org.ofbiz.content.content; -import java.util.ArrayList; -import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; +import javolution.util.FastList; +import javolution.util.FastMap; + +import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilProperties; import org.ofbiz.entity.GenericValue; @@ -40,7 +42,7 @@ protected boolean isOn = false; protected GenericValue userLogin; - protected List permCheckResults = new ArrayList(); + protected List permCheckResults = FastList.newInstance(); protected boolean entityPermCheckResult = false; protected String currentContentId = ""; protected Map currentContentMap; @@ -125,10 +127,10 @@ public void setCurrentContentId(String id) { if (!currentContentId.equals(id)) { - currentContentMap = new HashMap(); + currentContentMap = FastMap.newInstance(); permCheckResults.add(currentContentMap); currentContentMap.put("contentId", id); - currentContentMap.put("checkResults", new ArrayList()); + currentContentMap.put("checkResults", FastList.newInstance()); } currentContentId = id; } @@ -157,7 +159,7 @@ public void startMatchGroup(List targetOperations, List purposes, List roles, List targStatusList, String targPrivilegeEnumId, String contentId) { - currentContentMap = new HashMap(); + currentContentMap = FastMap.newInstance(); permCheckResults.add(currentContentMap); String s = null; if (targetOperations != null) { @@ -186,7 +188,7 @@ } currentContentMap.put("privilegeEnumId", privilegeEnumId); currentContentMap.put("contentId", contentId); - currentContentMap.put("checkResultList", new ArrayList()); + currentContentMap.put("checkResultList", FastList.newInstance()); currentContentMap.put("matches", null); currentContentId = contentId; //if (Debug.infoOn()) Debug.logInfo("startMatchGroup, currentContentMap:" + currentContentMap, module); @@ -194,7 +196,7 @@ public void record(GenericValue purposeOp, boolean targetOpCond, boolean purposeCond, boolean statusCond, boolean privilegeCond, boolean roleCond) { - Map map = new HashMap(purposeOp); + Map map = UtilMisc.makeMapWritable(purposeOp); map.put("contentOperationIdCond", new Boolean(targetOpCond)); map.put("contentPurposeTypeIdCond", new Boolean(purposeCond)); map.put("statusIdCond", new Boolean(statusCond)); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java Sun Aug 3 21:02:01 2008 @@ -19,8 +19,6 @@ package org.ofbiz.content.content; import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; @@ -29,6 +27,9 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; +import javolution.util.FastList; +import javolution.util.FastMap; + import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilDateTime; @@ -97,7 +98,7 @@ return "error"; } - Map passedParams = new HashMap(); + Map passedParams = FastMap.newInstance(); FileItem fi = null; FileItem imageFi = null; byte[] imageBytes = {}; @@ -123,7 +124,7 @@ List targetOperationList = ContentWorker.prepTargetOperationList(passedParams, entityOperation); passedParams.put("targetOperationList", targetOperationList ); // Create or update FTL template - Map ftlContext = new HashMap(); + Map ftlContext = FastMap.newInstance(); ftlContext.put("userLogin", userLogin); ftlContext.put("contentId", passedParams.get("ftlContentId")); ftlContext.put("ownerContentId", passedParams.get("ownerContentId")); @@ -154,7 +155,7 @@ } String ftlContentId = (String)ftlResults.get("contentId"); if (UtilValidate.isNotEmpty(contentIdTo) ) { - Map map = new HashMap(); + Map map = FastMap.newInstance(); map.put("fromDate", UtilDateTime.nowTimestamp()); map.put("contentId", ftlContentId); map.put("contentIdTo", contentIdTo); @@ -196,7 +197,7 @@ //if (Debug.infoOn()) Debug.logInfo("[UploadContentAndImage]ftlDataResourceId:" + ftlDataResourceId, module); // Create or update summary text subContent if ( passedParams.containsKey("summaryData") ) { - Map sumContext = new HashMap(); + Map sumContext = FastMap.newInstance(); sumContext.put("userLogin", userLogin); sumContext.put("contentId", passedParams.get("sumContentId")); sumContext.put("ownerContentId", ftlContentId); @@ -226,7 +227,7 @@ // Create or update electronic text subContent if ( passedParams.containsKey("textData") ) { - Map txtContext = new HashMap(); + Map txtContext = FastMap.newInstance(); txtContext.put("userLogin", userLogin); txtContext.put("contentId", passedParams.get("txtContentId")); txtContext.put("ownerContentId", ftlContentId); @@ -255,7 +256,7 @@ } // Create or update image subContent - Map imgContext = new HashMap(); + Map imgContext = FastMap.newInstance(); if (imageBytes.length > 0) { imgContext.put("userLogin", userLogin); imgContext.put("contentId", passedParams.get("imgContentId")); @@ -361,7 +362,7 @@ return "error"; } - Map passedParams = new HashMap(); + Map passedParams = FastMap.newInstance(); FileItem fi = null; FileItem imageFi = null; byte[] imageBytes = {}; @@ -428,7 +429,7 @@ GenericDelegator delegator = (GenericDelegator)request.getAttribute("delegator"); HttpSession session = request.getSession(); GenericValue userLogin = (GenericValue)session.getAttribute("userLogin"); - Map ftlContext = new HashMap(); + Map ftlContext = FastMap.newInstance(); String contentPurposeString = (String)passedParams.get("contentPurposeString" + suffix); if (UtilValidate.isEmpty(contentPurposeString)) { @@ -460,25 +461,25 @@ ModelEntity modelEntity = delegator.getModelEntity("ContentAssocDataResourceViewFrom"); List fieldNames = modelEntity.getAllFieldNames(); Iterator iter = fieldNames.iterator(); - Map ftlContext2 = new HashMap(); - Map ftlContext3 = new HashMap(); + Map ftlContext2 = FastMap.newInstance(); + Map ftlContext3 = FastMap.newInstance(); while (iter.hasNext()) { String keyName = (String)iter.next(); Object obj = passedParams.get(keyName + suffix); ftlContext2.put(keyName, obj); } if (Debug.infoOn()) Debug.logInfo("[UploadContentStuff]ftlContext2:" + ftlContext2, module); - List errorMessages = new ArrayList(); + List errorMessages = FastList.newInstance(); Locale loc = Locale.getDefault(); try { SimpleMapProcessor.runSimpleMapProcessor( "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentIn", ftlContext2, ftlContext3, errorMessages, loc); SimpleMapProcessor.runSimpleMapProcessor( "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentOut", ftlContext3, ftlContext, errorMessages, loc); - ftlContext3 = new HashMap(); + ftlContext3 = FastMap.newInstance(); SimpleMapProcessor.runSimpleMapProcessor( "org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceIn", ftlContext2, ftlContext3, errorMessages, loc); SimpleMapProcessor.runSimpleMapProcessor( "org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceOut", ftlContext3, ftlContext, errorMessages, loc); - ftlContext3 = new HashMap(); + ftlContext3 = FastMap.newInstance(); SimpleMapProcessor.runSimpleMapProcessor( "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", ftlContext2, ftlContext3, errorMessages, loc); SimpleMapProcessor.runSimpleMapProcessor( "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocOut", ftlContext3, ftlContext, errorMessages, loc); } catch(MiniLangException e) { @@ -503,7 +504,7 @@ if (Debug.infoOn()) Debug.logInfo("[UploadContentStuff]errorMsgList:" + errorMsgList, module); if (Debug.infoOn()) Debug.logInfo("[UploadContentStuff]msg:" + msg, module); if (errorMsgList == null) { - errorMsgList = new ArrayList(); + errorMsgList = FastList.newInstance(); request.setAttribute("errorMessageList", errorMsgList); } errorMsgList.add(msg); @@ -514,7 +515,7 @@ request.setAttribute("_ERROR_MESSAGE_", msg); List errorMsgList = (List)request.getAttribute("_EVENT_MESSAGE_LIST_"); if (errorMsgList == null) { - errorMsgList = new ArrayList(); + errorMsgList = FastList.newInstance(); request.setAttribute("errorMessageList", errorMsgList); } errorMsgList.add(msg); @@ -532,7 +533,7 @@ String caContentIdTo = (String)passedParams.get("caContentIdTo"); if (UtilValidate.isNotEmpty(caContentIdTo)) { - Map resequenceContext = new HashMap(); + Map resequenceContext = FastMap.newInstance(); resequenceContext.put("contentIdTo", caContentIdTo); resequenceContext.put("userLogin", userLogin); try { @@ -544,7 +545,7 @@ if (Debug.infoOn()) Debug.logInfo("[UploadContentStuff]errorMsgList:" + errorMsgList, module); if (Debug.infoOn()) Debug.logInfo("[UploadContentStuff]msg:" + msg, module); if (errorMsgList == null) { - errorMsgList = new ArrayList(); + errorMsgList = FastList.newInstance(); request.setAttribute("errorMessageList", errorMsgList); } errorMsgList.add(msg); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java Sun Aug 3 21:02:01 2008 @@ -22,7 +22,6 @@ import java.net.URL; import java.net.URLConnection; import java.nio.ByteBuffer; -import java.util.ArrayList; import java.util.Comparator; import java.util.HashMap; import java.util.List; @@ -34,6 +33,9 @@ import javax.servlet.http.HttpSession; import javax.xml.parsers.ParserConfigurationException; +import javolution.util.FastList; +import javolution.util.FastMap; + import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileUploadException; import org.apache.commons.fileupload.disk.DiskFileItemFactory; @@ -101,12 +103,12 @@ } List categoryValues = delegator.findByAndCache("DataCategory", UtilMisc.toMap("parentCategoryId", matchValue)); categoryNode.put("count", new Integer(categoryValues.size())); - List subCategoryIds = new ArrayList(); + List subCategoryIds = FastList.newInstance(); for (int i = 0; i < categoryValues.size(); i++) { GenericValue category = (GenericValue) categoryValues.get(i); String id = (String) category.get("dataCategoryId"); String categoryName = (String) category.get("categoryName"); - Map newNode = new HashMap(); + Map newNode = FastMap.newInstance(); newNode.put("id", id); newNode.put("name", categoryName); errorMsg = getDataCategoryMap(delegator, depth + 1, newNode, categoryTypeIds, getAll); @@ -148,13 +150,13 @@ * Takes a DataCategory structure and builds a list of maps, one value (id) is the dataCategoryId value and the other is an indented string suitable for * use in a drop-down pick list. */ - public static void buildList(HashMap nd, List lst, int depth) { + public static void buildList(Map nd, List lst, int depth) { String id = (String) nd.get("id"); String nm = (String) nd.get("name"); String spc = ""; for (int i = 0; i < depth; i++) spc += " "; - HashMap map = new HashMap(); + Map map = FastMap.newInstance(); map.put("dataCategoryId", id); map.put("categoryName", spc + nm); if (id != null && !id.equals("ROOT") && !id.equals("")) { @@ -163,7 +165,7 @@ List kids = (List) nd.get("kids"); int sz = kids.size(); for (int i = 0; i < sz; i++) { - HashMap kidNode = (HashMap) kids.get(i); + Map kidNode = (Map) kids.get(i); buildList(kidNode, lst, depth + 1); } } @@ -199,7 +201,7 @@ FileItem fi = null; FileItem imageFi = null; String imageFileName = null; - Map passedParams = new HashMap(); + Map passedParams = FastMap.newInstance(); HttpSession session = request.getSession(); GenericValue userLogin = (GenericValue)session.getAttribute("userLogin"); passedParams.put("userLogin", userLogin); @@ -275,7 +277,7 @@ */ public static Map callDataResourcePermissionCheckResult(GenericDelegator delegator, LocalDispatcher dispatcher, Map context) { - Map permResults = new HashMap(); + Map permResults = FastMap.newInstance(); String skipPermissionCheck = (String) context.get("skipPermissionCheck"); if (Debug.infoOn()) Debug.logInfo("in callDataResourcePermissionCheckResult, skipPermissionCheck:" + skipPermissionCheck,""); @@ -283,7 +285,7 @@ || skipPermissionCheck.length() == 0 || (!skipPermissionCheck.equalsIgnoreCase("true") && !skipPermissionCheck.equalsIgnoreCase("granted"))) { GenericValue userLogin = (GenericValue) context.get("userLogin"); - Map serviceInMap = new HashMap(); + Map serviceInMap = FastMap.newInstance(); serviceInMap.put("userLogin", userLogin); serviceInMap.put("targetOperationList", context.get("targetOperationList")); serviceInMap.put("contentPurposeList", context.get("contentPurposeList")); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataServices.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataServices.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataServices.java Sun Aug 3 21:02:01 2008 @@ -28,11 +28,12 @@ import java.io.Writer; import java.nio.ByteBuffer; import java.sql.Timestamp; -import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; +import javolution.util.FastMap; + import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -57,7 +58,7 @@ * A top-level service for creating a DataResource and ElectronicText together. */ public static Map createDataResourceAndText(DispatchContext dctx, Map context) { - Map result = new HashMap(); + Map result = FastMap.newInstance(); Map thisResult = createDataResourceMethod(dctx, context); if (thisResult.get(ModelService.RESPONSE_MESSAGE) != null) { @@ -87,7 +88,7 @@ } public static Map createDataResourceMethod(DispatchContext dctx, Map context) { - Map result = new HashMap(); + Map result = FastMap.newInstance(); GenericDelegator delegator = dctx.getDelegator(); GenericValue userLogin = (GenericValue) context.get("userLogin"); String userLoginId = (String) userLogin.get("userLoginId"); @@ -145,7 +146,7 @@ } public static Map createElectronicTextMethod(DispatchContext dctx, Map context) { - HashMap result = new HashMap(); + Map result = FastMap.newInstance(); GenericDelegator delegator = dctx.getDelegator(); String dataResourceId = (String) context.get("dataResourceId"); String textData = (String) context.get("textData"); @@ -276,7 +277,7 @@ public static Map updateDataResourceMethod(DispatchContext dctx, Map context) { - Map result = new HashMap(); + Map result = FastMap.newInstance(); GenericDelegator delegator = dctx.getDelegator(); GenericValue dataResource = null; //Locale locale = (Locale) context.get("locale"); @@ -325,7 +326,7 @@ * @return */ public static Map updateElectronicTextMethod(DispatchContext dctx, Map context) { - HashMap result = new HashMap(); + Map result = FastMap.newInstance(); GenericDelegator delegator = dctx.getDelegator(); GenericValue electronicText = null; //Locale locale = (Locale) context.get("locale"); @@ -374,7 +375,7 @@ } public static Map updateFileMethod(DispatchContext dctx, Map context) throws GenericServiceException { - HashMap result = new HashMap(); + Map result = FastMap.newInstance(); //GenericValue fileText = null; //Locale locale = (Locale) context.get("locale"); //String dataResourceId = (String) dataResource.get("dataResourceId"); @@ -448,7 +449,7 @@ } public static Map renderDataResourceAsText(DispatchContext dctx, Map context) throws GeneralException, IOException { - Map results = new HashMap(); + Map results = FastMap.newInstance(); GenericDelegator delegator = dctx.getDelegator(); //LocalDispatcher dispatcher = dctx.getDispatcher(); Writer out = (Writer) context.get("outWriter"); @@ -466,7 +467,7 @@ Locale locale = (Locale) context.get("locale"); if (templateContext == null) { - templateContext = new HashMap(); + templateContext = FastMap.newInstance(); } GenericValue view = (GenericValue) context.get("subContentDataResourceView"); @@ -491,7 +492,7 @@ } public static Map updateImageMethod(DispatchContext dctx, Map context) { - HashMap result = new HashMap(); + Map result = FastMap.newInstance(); GenericDelegator delegator = dctx.getDelegator(); //Locale locale = (Locale) context.get("locale"); String dataResourceId = (String) context.get("dataResourceId"); @@ -525,7 +526,7 @@ } public static Map createImageMethod(DispatchContext dctx, Map context) { - HashMap result = new HashMap(); + Map result = FastMap.newInstance(); GenericDelegator delegator = dctx.getDelegator(); String dataResourceId = (String) context.get("dataResourceId"); ByteBuffer byteBuffer = (ByteBuffer)context.get("imageData"); @@ -559,7 +560,7 @@ } public static Map createBinaryFileMethod(DispatchContext dctx, Map context) throws GenericServiceException { - HashMap result = new HashMap(); + Map result = FastMap.newInstance(); GenericValue dataResource = (GenericValue) context.get("dataResource"); //String dataResourceId = (String) dataResource.get("dataResourceId"); String dataResourceTypeId = (String) dataResource.get("dataResourceTypeId"); @@ -611,7 +612,7 @@ } public static Map updateBinaryFileMethod(DispatchContext dctx, Map context) throws GenericServiceException { - HashMap result = new HashMap(); + Map result = FastMap.newInstance(); GenericValue dataResource = (GenericValue) context.get("dataResource"); //String dataResourceId = (String) dataResource.get("dataResourceId"); String dataResourceTypeId = (String) dataResource.get("dataResourceTypeId"); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java Sun Aug 3 21:02:01 2008 @@ -604,7 +604,7 @@ } if (!UtilValidate.isEmpty(emailAddress)) { - map = new HashMap(); + map = FastMap.newInstance(); map.put("address", emailAddress.getAddress()); map.put("userLogin", userLogin); result = dispatcher.runSync("findPartyFromEmailAddress", map); @@ -622,7 +622,7 @@ Address addr = null; Map map = null; Map result = null; - List tempResults = new ArrayList(); + List tempResults = FastList.newInstance(); if (addresses != null) { for (int i = 0; i < addresses.length; i++) { @@ -830,7 +830,7 @@ partyIdFrom = (String)result.get("partyId"); contactMechIdFrom = (String)result.get("contactMechId"); - Map commEventMap = new HashMap(); + Map commEventMap = FastMap.newInstance(); commEventMap.put("communicationEventTypeId", "AUTO_EMAIL_COMM"); commEventMap.put("contactMechTypeId", "EMAIL_ADDRESS"); commEventMap.put("messageId", messageId); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.java Sun Aug 3 21:02:01 2008 @@ -19,7 +19,6 @@ package org.ofbiz.content.email; import java.util.Map; -import java.util.HashMap; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.io.IOException; @@ -30,6 +29,8 @@ import javax.mail.Multipart; import javax.mail.Part; +import javolution.util.FastMap; + import org.ofbiz.entity.GenericValue; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilValidate; @@ -47,7 +48,7 @@ public static int addAttachmentsToCommEvent(MimeMessage message, String communicationEventId, LocalDispatcher dispatcher, GenericValue userLogin) throws MessagingException, IOException, GenericServiceException { - Map commEventMap = new HashMap(); + Map commEventMap = FastMap.newInstance(); commEventMap.put("communicationEventId", communicationEventId); commEventMap.put("contentTypeId", "DOCUMENT"); commEventMap.put("mimeTypeId", "text/html"); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/email/NotificationServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/email/NotificationServices.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/email/NotificationServices.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/email/NotificationServices.java Sun Aug 3 21:02:01 2008 @@ -25,9 +25,10 @@ import java.net.InetAddress; import java.net.URL; import java.net.UnknownHostException; -import java.util.HashMap; import java.util.Map; +import javolution.util.FastMap; + import freemarker.template.TemplateException; import org.ofbiz.base.util.Debug; @@ -142,7 +143,7 @@ // make sure we have a valid body before sending if (body != null) { // retain only the required attributes for the sendMail service - Map emailContext = new HashMap(); + Map emailContext = FastMap.newInstance(); emailContext.put("sendTo", context.get("sendTo")); emailContext.put("body", body); emailContext.put("sendCc", context.get("sendCc")); @@ -190,7 +191,7 @@ Map result = null; if (templateData == null) { - templateData = new HashMap(); + templateData = FastMap.newInstance(); } try { Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/search/ContentDocument.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/search/ContentDocument.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/search/ContentDocument.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/search/ContentDocument.java Sun Aug 3 21:02:01 2008 @@ -20,13 +20,14 @@ import java.io.IOException; import java.sql.Timestamp; -import java.util.ArrayList; -import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; +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; @@ -64,7 +65,7 @@ return doc; } - Map map = new HashMap(); + Map map = FastMap.newInstance(); doc = Document(content, map, dispatcher); return doc; } @@ -94,7 +95,7 @@ String description = content.getString("description"); if (UtilValidate.isNotEmpty(description)) doc.add(new Field("description", description, Store.YES, Index.TOKENIZED, TermVector.NO)); - List ancestorList = new ArrayList(); + List ancestorList = FastList.newInstance(); GenericDelegator delegator = content.getDelegator(); ContentWorker.getContentAncestryAll(delegator, contentId, "WEB_SITE_PUB_PT", "TO", ancestorList); String ancestorString = StringUtil.join(ancestorList, " "); @@ -177,7 +178,7 @@ badIndexList.add(contentId + " - " + e.getMessage()); return false; } - List featureList = new ArrayList(); + List featureList = FastList.newInstance(); Iterator iter = featureDataResourceList.iterator(); while (iter.hasNext()) { GenericValue productFeatureDataResource = (GenericValue) iter .next(); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchEvents.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchEvents.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchEvents.java Sun Aug 3 21:02:01 2008 @@ -18,13 +18,14 @@ *******************************************************************************/ package org.ofbiz.content.search; -import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; 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.StringUtil; import org.ofbiz.base.util.UtilHttp; @@ -46,7 +47,7 @@ public static String indexTree(HttpServletRequest request, HttpServletResponse response) { Map result; - Map serviceInMap = new HashMap(); + Map serviceInMap = FastMap.newInstance(); HttpSession session = request.getSession(); GenericValue userLogin = (GenericValue)session.getAttribute("userLogin"); serviceInMap.put("userLogin", userLogin); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchServices.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchServices.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchServices.java Sun Aug 3 21:02:01 2008 @@ -18,11 +18,12 @@ *******************************************************************************/ package org.ofbiz.content.search; -import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; +import javolution.util.FastList; +import javolution.util.FastMap; + import org.ofbiz.base.util.Debug; import org.ofbiz.entity.GenericDelegator; import org.ofbiz.service.DispatchContext; @@ -43,10 +44,10 @@ String siteId = (String) context.get("contentId"); String path = (String) context.get("path"); - Map envContext = new HashMap(); + Map envContext = FastMap.newInstance(); if (Debug.infoOn()) Debug.logInfo("in indexTree, siteId:" + siteId, module); - List badIndexList = new ArrayList(); + List badIndexList = FastList.newInstance(); envContext.put("badIndexList", badIndexList); envContext.put("goodIndexCount", new Integer(0)); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchWorker.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchWorker.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchWorker.java Sun Aug 3 21:02:01 2008 @@ -19,12 +19,13 @@ package org.ofbiz.content.search; import java.io.FileNotFoundException; -import java.util.ArrayList; -import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; +import javolution.util.FastList; +import javolution.util.FastMap; + import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilMisc; @@ -53,7 +54,7 @@ public static Map indexTree(LocalDispatcher dispatcher, GenericDelegator delegator, String siteId, Map context, String path) throws Exception { - Map results = new HashMap(); + Map results = FastMap.newInstance(); GenericValue content = delegator.makeValue("Content", UtilMisc.toMap("contentId", siteId)); if (Debug.infoOn()) Debug.logInfo("in indexTree, siteId:" + siteId + " content:" + content, module); List siteList = ContentWorker.getAssociatedContent(content, "From", UtilMisc.toList("SUBSITE", "PUBLISH_LINK"), null, UtilDateTime.nowTimestamp().toString(), null); @@ -66,7 +67,7 @@ List subContentList = ContentWorker.getAssociatedContent(siteContent, "From", UtilMisc.toList("SUBSITE", "PUBLISH_LINK", "SUB_CONTENT"), null, UtilDateTime.nowTimestamp().toString(), null); //if (Debug.infoOn()) Debug.logInfo("in indexTree, subContentList:" + subContentList, module); if (subContentList != null) { - List contentIdList = new ArrayList(); + List contentIdList = FastList.newInstance(); Iterator iter2 = subContentList.iterator(); while (iter2.hasNext()) { GenericValue subContent = (GenericValue)iter2.next(); @@ -113,7 +114,7 @@ } //if (Debug.infoOn()) Debug.logInfo("in indexContent, reader:" + // reader, module); - contentList = new ArrayList(); + contentList = FastList.newInstance(); iter = idList.iterator(); while (iter.hasNext()) { String id = (String) iter.next(); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java Sun Aug 3 21:02:01 2008 @@ -25,15 +25,16 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.sql.Timestamp; -import java.util.ArrayList; import java.util.Date; -import java.util.HashMap; import java.util.Iterator; 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 org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -87,7 +88,7 @@ PdfReader pdfReader = new PdfReader(byteBuffer.array()); PdfStamper pdfStamper = new PdfStamper(pdfReader, os); AcroFields acroFields = pdfStamper.getAcroFields(); - HashMap acroFieldMap = acroFields.getFields(); + Map acroFieldMap = acroFields.getFields(); String contentId = (String) context.get("contentId"); GenericValue survey = null; @@ -269,7 +270,7 @@ PdfReader r = new PdfReader(byteBuffer.array()); PdfStamper s = new PdfStamper(r,os); AcroFields fs = s.getAcroFields(); - HashMap hm = fs.getFields(); + Map hm = fs.getFields(); s.setFormFlattening(true); @@ -319,7 +320,7 @@ */ public static Map getAcroFieldsFromPdf(DispatchContext dctx, Map context) { - Map acroFieldMap = new HashMap(); + Map acroFieldMap = FastMap.newInstance(); try { ByteArrayOutputStream os = new ByteArrayOutputStream(); GenericDelegator delegator = dctx.getDelegator(); @@ -327,7 +328,7 @@ PdfReader r = new PdfReader(byteBuffer.array()); PdfStamper s = new PdfStamper(r,os); AcroFields fs = s.getAcroFields(); - HashMap map = fs.getFields(); + Map map = fs.getFields(); s.setFormFlattening(true); @@ -508,7 +509,7 @@ Map results = ServiceUtil.returnSuccess(); String surveyResponseId = (String)context.get("surveyResponseId"); String surveyId = null; - List qAndA = new ArrayList(); + List qAndA = FastList.newInstance(); Document document = new Document(); try { @@ -543,7 +544,7 @@ GenericDelegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Map results = ServiceUtil.returnSuccess(); - Map acroFieldMap = new HashMap(); + Map acroFieldMap = FastMap.newInstance(); String surveyResponseId = (String)context.get("surveyResponseId"); String acroFormContentId = null; Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java Sun Aug 3 21:02:01 2008 @@ -24,12 +24,11 @@ import java.io.StringWriter; import java.io.Writer; import java.net.URL; -import java.util.HashMap; import java.util.Iterator; -import java.util.LinkedList; import java.util.List; import java.util.Map; +import javolution.util.FastList; import javolution.util.FastMap; import javolution.util.FastSet; @@ -278,7 +277,7 @@ // returns a list of SurveyQuestions (in order by sequence number) for the current Survey public List getSurveyQuestionAndAppls() { - List questions = new LinkedList(); + List questions = FastList.newInstance(); try { Map fields = UtilMisc.toMap("surveyId", surveyId); @@ -350,7 +349,7 @@ // returns a Map of answers keyed on SurveyQuestion ID from the most current SurveyResponse ID public Map getResponseAnswers(String responseId) throws SurveyWrapperException { - Map answerMap = new HashMap(); + Map answerMap = FastMap.newInstance(); if (responseId != null) { List answers = null; @@ -377,7 +376,7 @@ if (key.toUpperCase().startsWith("ANSWERS_")) { int splitIndex = key.indexOf('_'); String questionId = key.substring(splitIndex+1); - Map thisAnswer = new HashMap(); + Map thisAnswer = FastMap.newInstance(); String answer = (String) passThru.remove(key); thisAnswer.put("booleanResponse", answer); thisAnswer.put("currencyResponse", answer); @@ -430,7 +429,7 @@ } public Map getResults(List questions) throws SurveyWrapperException { - Map questionResults = new HashMap(); + Map questionResults = FastMap.newInstance(); if (questions != null) { Iterator i = questions.iterator(); while (i.hasNext()) { @@ -446,7 +445,7 @@ // returns a map of question reqsults public Map getResultInfo(GenericValue question) throws SurveyWrapperException { - Map resultMap = new HashMap(); + Map resultMap = FastMap.newInstance(); // special keys in the result: // "_q_type" - question type (SurveyQuestionTypeId) @@ -476,7 +475,7 @@ // create the map of option info ("_total", "_percent") Iterator i = thisResult.keySet().iterator(); while (i.hasNext()) { - Map optMap = new HashMap(); + Map optMap = FastMap.newInstance(); String optId = (String) i.next(); Long optTotal = (Long) thisResult.get(optId); if (optTotal == null) optTotal = new Long(0); @@ -661,7 +660,7 @@ } private Map getOptionResult(GenericValue question) throws SurveyWrapperException { - Map result = new HashMap(); + Map result = FastMap.newInstance(); long total = 0; boolean beganTransaction = false; Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/CheckPermissionTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/CheckPermissionTransform.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/CheckPermissionTransform.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/CheckPermissionTransform.java Sun Aug 3 21:02:01 2008 @@ -20,13 +20,14 @@ import java.io.IOException; import java.io.Writer; -import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; +import javolution.util.FastList; +import javolution.util.FastMap; + import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilValidate; @@ -83,7 +84,7 @@ FreeMarkerWorker.overrideWithArgs(templateCtx, args); final String mode = (String)templateCtx.get("mode"); final String quickCheckContentId = (String)templateCtx.get("quickCheckContentId"); - final Map savedValues = new HashMap(); + final Map savedValues = FastMap.newInstance(); //Debug.logInfo("in CheckPermission, contentId(1):" + templateCtx.get("contentId"),""); //Debug.logInfo("in CheckPermission, subContentId(1):" + templateCtx.get("subContentId"),""); @@ -135,7 +136,7 @@ String passedStatusId = (String)templateCtx.get("statusId"); List statusList = StringUtil.split(passedStatusId, "|"); if (statusList == null) - statusList = new ArrayList(); + statusList = FastList.newInstance(); if (UtilValidate.isNotEmpty(statusId) && !statusList.contains(statusId)) { statusList.add(statusId); } @@ -153,7 +154,7 @@ //Debug.logInfo("in CheckPermission, templateCtx:" + templateCtx,""); throw new IOException("targetOperationList has zero size."); } - List roleList = new ArrayList(); + List roleList = FastList.newInstance(); String privilegeEnumId = (String)currentContent.get("privilegeEnumId"); Map results = EntityPermissionChecker.checkPermission(currentContent, statusList, userLogin, purposeList, targetOperationList, roleList, delegator, security, entityOperation, privilegeEnumId, quickCheckContentId); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java Sun Aug 3 21:02:01 2008 @@ -20,7 +20,6 @@ import java.io.IOException; import java.io.Writer; -import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; @@ -29,8 +28,11 @@ import javax.servlet.http.HttpServletRequest; +import javolution.util.FastMap; + import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; +import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.template.FreeMarkerWorker; import org.ofbiz.content.content.ContentWorker; @@ -115,7 +117,7 @@ templateCtx.put("dataResourceId", dataResourceId); templateCtx.put("subContentIdSub", subContentIdSub); templateCtx.put("subDataResourceTypeId", subDataResourceTypeId); - final Map savedValues = new HashMap(); + final Map savedValues = FastMap.newInstance(); FreeMarkerWorker.saveContextValues(templateCtx, saveKeyNames, savedValues); return new Writer(out) { @@ -142,10 +144,10 @@ Map templateRootTemplate = (Map)templateCtx.get("templateRootTemplate"); if (templateRootTemplate == null) { Map templateRootTmp = FreeMarkerWorker.createEnvironmentMap(env); - templateRoot = new HashMap(templateRootTmp); + templateRoot = UtilMisc.makeMapWritable(templateRootTmp); templateCtx.put("templateRootTemplate", templateRootTmp); } else { - templateRoot = new HashMap(templateRootTemplate); + templateRoot = UtilMisc.makeMapWritable(templateRootTemplate); } templateRoot.put("context", templateCtx); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java Sun Aug 3 21:02:01 2008 @@ -21,14 +21,15 @@ import java.io.IOException; import java.io.Writer; import java.sql.Timestamp; -import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; +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; @@ -82,9 +83,9 @@ final GenericDelegator delegator = (GenericDelegator) FreeMarkerWorker.getWrappedObject("delegator", env); final HttpServletRequest request = (HttpServletRequest) FreeMarkerWorker.getWrappedObject("request", env); FreeMarkerWorker.getSiteParameters(request, templateRoot); - final Map savedValuesUp = new HashMap(); + final Map savedValuesUp = FastMap.newInstance(); FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); - final Map savedValues = new HashMap(); + final Map savedValues = FastMap.newInstance(); FreeMarkerWorker.overrideWithArgs(templateRoot, args); String contentAssocTypeId = (String) templateRoot.get("contentAssocTypeId"); @@ -93,7 +94,7 @@ templateRoot.put("contentAssocTypeId ", contentAssocTypeId); } - final Map pickedEntityIds = new HashMap(); + final Map pickedEntityIds = FastMap.newInstance(); List assocTypes = StringUtil.split(contentAssocTypeId, "|"); String contentPurposeTypeId = (String) templateRoot.get("contentPurposeTypeId"); @@ -105,7 +106,7 @@ templateRoot.put("locale", locale); } - Map whenMap = new HashMap(); + Map whenMap = FastMap.newInstance(); whenMap.put("followWhen", (String) templateRoot.get("followWhen")); whenMap.put("pickWhen", (String) templateRoot.get("pickWhen")); whenMap.put("returnBeforePickWhen", (String) templateRoot.get("returnBeforePickWhen")); @@ -252,7 +253,7 @@ isPickObj.booleanValue()) || (isFollowObj != null && isFollowObj.booleanValue()))) { List globalNodeTrail = (List) ctx.get("globalNodeTrail"); if (globalNodeTrail == null) { - globalNodeTrail = new ArrayList(); + globalNodeTrail = FastList.newInstance(); } globalNodeTrail.add(trailNode); ctx.put("globalNodeTrail", globalNodeTrail); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAndSubContent.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAndSubContent.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAndSubContent.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAndSubContent.java Sun Aug 3 21:02:01 2008 @@ -20,7 +20,6 @@ import java.io.IOException; import java.io.Writer; -import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -28,6 +27,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javolution.util.FastMap; + import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilFormatOut; @@ -67,11 +68,11 @@ ((MapStack)templateRoot).push(envMap); if (Debug.verboseOn()) Debug.logVerbose("in RenderContentAndSubContent, contentId(0):" + templateRoot.get("contentId"), module); FreeMarkerWorker.getSiteParameters(request, templateRoot); -// final Map savedValuesUp = new HashMap(); +// final Map savedValuesUp = FastMap.newInstance(); //FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); FreeMarkerWorker.overrideWithArgs(templateRoot, args); - final Map savedValues = new HashMap(); + final Map savedValues = FastMap.newInstance(); return new Writer(out) { Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java Sun Aug 3 21:02:01 2008 @@ -20,7 +20,6 @@ import java.io.IOException; import java.io.Writer; -import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -28,6 +27,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javolution.util.FastMap; + import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilFormatOut; @@ -57,7 +58,7 @@ public Writer getWriter(final Writer out, Map args) { final Environment env = Environment.getCurrentEnvironment(); //final Map templateCtx = (Map) FreeMarkerWorker.getWrappedObject("context", env); - //final Map templateCtx = new HashMap(); + //final Map templateCtx = FastMap.newInstance(); final LocalDispatcher dispatcher = (LocalDispatcher) FreeMarkerWorker.getWrappedObject("dispatcher", env); final GenericDelegator delegator = (GenericDelegator) FreeMarkerWorker.getWrappedObject("delegator", env); final HttpServletRequest request = (HttpServletRequest) FreeMarkerWorker.getWrappedObject("request", env); @@ -65,7 +66,7 @@ final Map templateRoot = FreeMarkerWorker.createEnvironmentMap(env); if (Debug.verboseOn()) Debug.logVerbose("in RenderSubContent, contentId(0):" + templateRoot.get("contentId"), module); FreeMarkerWorker.getSiteParameters(request, templateRoot); - final Map savedValuesUp = new HashMap(); + final Map savedValuesUp = FastMap.newInstance(); FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); FreeMarkerWorker.overrideWithArgs(templateRoot, args); if (Debug.verboseOn()) Debug.logVerbose("in RenderSubContent, contentId(2):" + templateRoot.get("contentId"), module); @@ -120,7 +121,7 @@ templateRoot.put("subDataResourceTypeId", subDataResourceTypeId); */ - final Map savedValues = new HashMap(); + final Map savedValues = FastMap.newInstance(); return new Writer(out) { Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java Sun Aug 3 21:02:01 2008 @@ -21,7 +21,6 @@ import java.io.IOException; import java.io.Writer; import java.sql.Timestamp; -import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -29,6 +28,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javolution.util.FastMap; + import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -58,7 +59,7 @@ public Writer getWriter(final Writer out, Map args) { final Environment env = Environment.getCurrentEnvironment(); //final Map templateCtx = (Map) FreeMarkerWorker.getWrappedObject("context", env); - //final Map templateCtx = new HashMap(); + //final Map templateCtx = FastMap.newInstance(); final LocalDispatcher dispatcher = (LocalDispatcher) FreeMarkerWorker.getWrappedObject("dispatcher", env); final GenericDelegator delegator = (GenericDelegator) FreeMarkerWorker.getWrappedObject("delegator", env); final HttpServletRequest request = (HttpServletRequest) FreeMarkerWorker.getWrappedObject("request", env); @@ -66,7 +67,7 @@ final Map templateRoot = FreeMarkerWorker.createEnvironmentMap(env); if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId(0):" + templateRoot.get("contentId"), module); FreeMarkerWorker.getSiteParameters(request, templateRoot); - final Map savedValuesUp = new HashMap(); + final Map savedValuesUp = FastMap.newInstance(); FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); FreeMarkerWorker.overrideWithArgs(templateRoot, args); if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId(2):" + templateRoot.get("contentId"), module); @@ -121,7 +122,7 @@ templateRoot.put("subDataResourceTypeId", subDataResourceTypeId); */ - final Map savedValues = new HashMap(); + final Map savedValues = FastMap.newInstance(); return new Writer(out) { Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java Sun Aug 3 21:02:01 2008 @@ -21,7 +21,6 @@ import java.io.IOException; import java.io.Writer; import java.sql.Timestamp; -import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -29,6 +28,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javolution.util.FastMap; + import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -59,7 +60,7 @@ final StringBuffer buf = new StringBuffer(); final Environment env = Environment.getCurrentEnvironment(); //final Map templateCtx = (Map) FreeMarkerWorker.getWrappedObject("context", env); - //final Map templateCtx = new HashMap(); + //final Map templateCtx = FastMap.newInstance(); final LocalDispatcher dispatcher = (LocalDispatcher) FreeMarkerWorker.getWrappedObject("dispatcher", env); final GenericDelegator delegator = (GenericDelegator) FreeMarkerWorker.getWrappedObject("delegator", env); final HttpServletRequest request = (HttpServletRequest) FreeMarkerWorker.getWrappedObject("request", env); @@ -67,7 +68,7 @@ final Map templateRoot = FreeMarkerWorker.createEnvironmentMap(env); //if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId(0):" + templateRoot.get( "contentId"), module); FreeMarkerWorker.getSiteParameters(request, templateRoot); - final Map savedValuesUp = new HashMap(); + final Map savedValuesUp = FastMap.newInstance(); FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); FreeMarkerWorker.overrideWithArgs(templateRoot, args); //if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId(2):" + templateRoot.get( "contentId"), module); @@ -118,7 +119,7 @@ templateRoot.put( "subContentId", subContentIdSub); templateRoot.put( "subDataResourceTypeId", subDataResourceTypeId); - //final Map savedValues = new HashMap(); + //final Map savedValues = FastMap.newInstance(); //FreeMarkerWorker.saveContextValues(templateCtx, saveKeyNames, savedValues); return new Writer(out) { Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java Sun Aug 3 21:02:01 2008 @@ -21,7 +21,6 @@ import java.io.IOException; import java.io.Writer; import java.sql.Timestamp; -import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -29,6 +28,8 @@ import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; +import javolution.util.FastMap; + import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -70,7 +71,7 @@ final Environment env = Environment.getCurrentEnvironment(); Map ctx = (Map) FreeMarkerWorker.getWrappedObject("context", env); if (ctx == null) { - ctx = new HashMap(); + ctx = FastMap.newInstance(); } final String mapKey = getArg(args, "mapKey", ctx); final String subContentId = getArg(args, "subContentId", ctx); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java Sun Aug 3 21:02:01 2008 @@ -21,13 +21,14 @@ import java.io.IOException; import java.io.Writer; import java.sql.Timestamp; -import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; +import javolution.util.FastList; +import javolution.util.FastMap; + import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilValidate; @@ -73,9 +74,9 @@ //final Map templateRoot = (Map) FreeMarkerWorker.getWrappedObject("context", env); final Map templateRoot = FreeMarkerWorker.createEnvironmentMap(env); //FreeMarkerWorker.convertContext(templateRoot); - final Map savedValuesUp = new HashMap(); + final Map savedValuesUp = FastMap.newInstance(); FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); - final Map savedValues = new HashMap(); + final Map savedValues = FastMap.newInstance(); FreeMarkerWorker.overrideWithArgs(templateRoot, args); String startContentAssocTypeId = (String)templateRoot.get( "contentAssocTypeId"); //if (Debug.infoOn()) Debug.logInfo("in TraverseSubContentCache, startContentAssocTypeId:" + startContentAssocTypeId, module); @@ -103,9 +104,9 @@ final GenericValue view = val; - final Map traverseContext = new HashMap(); + final Map traverseContext = FastMap.newInstance(); traverseContext.put("delegator", delegator); - Map whenMap = new HashMap(); + Map whenMap = FastMap.newInstance(); whenMap.put("followWhen", (String)templateRoot.get( "followWhen")); whenMap.put("pickWhen", (String)templateRoot.get( "pickWhen")); whenMap.put("returnBeforePickWhen", (String)templateRoot.get( "returnBeforePickWhen")); @@ -157,7 +158,7 @@ //if (Debug.infoOn()) Debug.logInfo("in TraverseSubContentCache, onStart, trailCsv(1):" + trailCsv , module); if (globalNodeTrail.size() > 0) { int sz = globalNodeTrail.size() ; - nodeTrail = new ArrayList(); + nodeTrail = FastList.newInstance(); //nodeTrail = passedGlobalNodeTrail.subList(sz - 1, sz); node = (Map)globalNodeTrail.get(sz - 1); //if (Debug.infoOn()) Debug.logInfo("in TraverseSubContentCache, onStart, node(1):" + node , module); @@ -254,7 +255,7 @@ Map ndStart = (Map)nodeTrail.get(0); contentIdStart = (String)ndStart.get("contentId"); } else { - globalNodeTrail = new ArrayList(); + globalNodeTrail = FastList.newInstance(); } //if (Debug.infoOn()) Debug.logInfo("in TraverseSubContentCache, populateContext, contentIdEnd(1):" + contentIdEnd + " contentIdStart:" + contentIdStart + " equals:" + (contentIdStart.equals(contentIdEnd)), module); boolean bIdEnd = UtilValidate.isNotEmpty(contentIdEnd); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java?rev=682251&r1=682250&r2=682251&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java Sun Aug 3 21:02:01 2008 @@ -21,12 +21,13 @@ import java.io.IOException; import java.io.Writer; import java.sql.Timestamp; -import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; +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.UtilDateTime; @@ -122,9 +123,9 @@ final GenericValue subContentDataResourceView = view; - final Map traverseContext = new HashMap(); + final Map traverseContext = FastMap.newInstance(); traverseContext.put("delegator", delegator); - Map whenMap = new HashMap(); + Map whenMap = FastMap.newInstance(); whenMap.put("followWhen", (String)templateCtx.get( "followWhen")); whenMap.put("pickWhen", (String)templateCtx.get( "pickWhen")); whenMap.put("returnBeforePickWhen", (String)templateCtx.get( "returnBeforePickWhen")); @@ -166,7 +167,7 @@ public int onStart() throws TemplateModelException, IOException { //templateContext.put("buf", new StringBuffer()); - List nodeTrail = new ArrayList(); + List nodeTrail = FastList.newInstance(); traverseContext.put("nodeTrail", nodeTrail); GenericValue content = null; /* @@ -278,7 +279,7 @@ private boolean checkWhen (GenericValue thisContent, String contentAssocTypeId) { boolean isPick = false; - Map assocContext = new HashMap(); + Map assocContext = FastMap.newInstance(); if (UtilValidate.isEmpty(contentAssocTypeId)) contentAssocTypeId = ""; assocContext.put("contentAssocTypeId", contentAssocTypeId); @@ -299,7 +300,7 @@ assocContext.put("content", thisContent); List purposes = ContentWorker.getPurposes(thisContent); assocContext.put("purposes", purposes); - List contentTypeAncestry = new ArrayList(); + List contentTypeAncestry = FastList.newInstance(); String contentTypeId = (String)thisContent.get("contentTypeId"); try { ContentWorker.getContentTypeAncestry(delegator, contentTypeId, contentTypeAncestry); |
Free forum by Nabble | Edit this page |