Author: jleroux Date: Mon Sep 29 07:08:04 2014 New Revision: 1628129 URL: http://svn.apache.org/r1628129 Log: Keeps in sync with OFBiz trunk HEAD
Added: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/config/README - copied unchanged from r1628128, ofbiz/trunk/framework/base/config/README ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java - copied unchanged from r1628128, ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java Removed: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/securityext/src/META-INF/services/ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/cert/ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/concurrent/DependencyPool.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/concurrent/GeneratedResult.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/concurrent/TTLCachedObject.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/concurrent/test/ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/lang/ObjectWrapper.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/MemoryHelper.java Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/ (props changed) ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/script/org/ofbiz/content/content/ContentServices.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/src/org/ofbiz/content/cms/CmsEvents.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_feature.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/securityext/build.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/build.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/HttpClient.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/testdef/basetests.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/catalina/ofbiz-component.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/build.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/dtd/entity-config.xsd ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/DelegatorFactory.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/config/model/Datasource.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/GenericHelper.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/GenericHelperDAO.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/test/MiniLangTests.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/cmssite/template/cms/HtmlHead.ftl Propchange: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1626687-1628128 Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java?rev=1628129&r1=1628128&r2=1628129&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java Mon Sep 29 07:08:04 2014 @@ -160,7 +160,7 @@ public class PaymentWorker { try { paymentAddresses = delegator.findByAnd("PartyContactWithPurpose", UtilMisc.toMap("partyId", partyId, "contactMechPurposeTypeId", "PAYMENT_LOCATION"), - UtilMisc.toList("-fromDate"), false); + UtilMisc.toList("-purposeFromDate"), false); paymentAddresses = EntityUtil.filterByDate(paymentAddresses, null, "contactFromDate", "contactThruDate", true); paymentAddresses = EntityUtil.filterByDate(paymentAddresses, null, "purposeFromDate", "purposeThruDate", true); } catch (GenericEntityException e) { Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml?rev=1628129&r1=1628128&r2=1628129&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml Mon Sep 29 07:08:04 2014 @@ -197,12 +197,16 @@ under the License. <results-to-map map-name="pResults"/> </call-service> <!-- put all the result fields in this service's result --> - <iterate-map map="pResults" key="key" value="val"> - <if-compare field="key" operator="equals" value="responseMessage"> - <continue/> - </if-compare> - <field-to-result field="val" result-name="${key}"/> - </iterate-map> + <field-to-result field="pResults.contentRevisionSeqId" result-name="contentRevisionSeqId"/> + <field-to-result field="pResults.contentId" result-name="contentId"/> + <field-to-result field="pResults.dataResourceId" result-name="dataResourceId"/> + <field-to-result field="pResults.drDataResourceId" result-name="drDataResourceId"/> + <field-to-result field="pResults.caContentIdTo" result-name="caContentIdTo"/> + <field-to-result field="pResults.caContentId" result-name="caContentId"/> + <field-to-result field="pResults.caContentAssocTypeId" result-name="caContentAssocTypeId"/> + <field-to-result field="pResults.caFromDate" result-name="caFromDate"/> + <field-to-result field="pResults.caSequenceNum" result-name="caSequenceNum"/> + <field-to-result field="pResults.roleTypeList" result-name="roleTypeList"/> <log level="info" message="pResults : ${pResults}"/> <if-not-empty field="pResults.contentIdTo"> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/script/org/ofbiz/content/content/ContentServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/script/org/ofbiz/content/content/ContentServices.xml?rev=1628129&r1=1628128&r2=1628129&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/script/org/ofbiz/content/content/ContentServices.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/script/org/ofbiz/content/content/ContentServices.xml Mon Sep 29 07:08:04 2014 @@ -779,13 +779,17 @@ <results-to-map map-name="persistOut"/> </call-service> - <set-service-fields service-name="createCommContentDataResource" mode="OUT" map="persistOut" to-map="filteredPersistOut"/> - <iterate-map key="key" value="val" map="filteredPersistOut"> - <if-compare field="key" operator="equals" value="responseMessage"> - <continue/> - </if-compare> - <field-to-result field="val" result-name="${key}"/> - </iterate-map> + <field-to-result field="persistOut.contentId" result-name="contentId"/> + <field-to-result field="persistOut.dataResourceId" result-name="dataResourceId"/> + <field-to-result field="persistOut.drDataResourceId" result-name="drDataResourceId"/> + <field-to-result field="persistOut.caContentIdTo" result-name="caContentIdTo"/> + <field-to-result field="persistOut.caContentId" result-name="caContentId"/> + <field-to-result field="persistOut.caContentAssocTypeId" result-name="caContentAssocTypeId"/> + <field-to-result field="persistOut.caFromDate" result-name="caFromDate"/> + <field-to-result field="persistOut.caSequenceNum" result-name="caSequenceNum"/> + <field-to-result field="persistOut.roleTypeList" result-name="roleTypeList"/> + <field-to-result field="persistOut.fromDate" result-name="fromDate"/> + <set field="mapIn.contentId" from-field="persistOut.contentId"/> <set field="mapIn.communicationEventId" from-field="parameters.communicationEventId"/> <set field="mapIn.sequenceNum" from-field="parameters.sequenceNum"/> @@ -819,12 +823,15 @@ <call-service service-name="updateCommEventContentAssoc" in-map-name="mapIn"> </call-service> - <iterate-map key="key" value="val" map="persistOut"> - <if-compare field="key" operator="equals" value="responseMessage"> - <continue/> - </if-compare> - <field-to-result field="val" result-name="${key}"/> - </iterate-map> + <field-to-result field="persistOut.contentId" result-name="contentId"/> + <field-to-result field="persistOut.dataResourceId" result-name="dataResourceId"/> + <field-to-result field="persistOut.drDataResourceId" result-name="drDataResourceId"/> + <field-to-result field="persistOut.caContentIdTo" result-name="caContentIdTo"/> + <field-to-result field="persistOut.caContentId" result-name="caContentId"/> + <field-to-result field="persistOut.caContentAssocTypeId" result-name="caContentAssocTypeId"/> + <field-to-result field="persistOut.caFromDate" result-name="caFromDate"/> + <field-to-result field="persistOut.caSequenceNum" result-name="caSequenceNum"/> + <field-to-result field="persistOut.roleTypeList" result-name="roleTypeList"/> </simple-method> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/src/org/ofbiz/content/cms/CmsEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/src/org/ofbiz/content/cms/CmsEvents.java?rev=1628129&r1=1628128&r2=1628129&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/src/org/ofbiz/content/cms/CmsEvents.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/src/org/ofbiz/content/cms/CmsEvents.java Mon Sep 29 07:08:04 2014 @@ -79,6 +79,7 @@ public class CmsEvents { // is this a default request or called from a defined request mapping String targetRequest = (String) request.getAttribute("targetRequestUri"); String actualRequest = (String) request.getAttribute("thisRequestUri"); + if (targetRequest != null) { targetRequest = targetRequest.replaceAll("\\W", ""); } else { @@ -139,7 +140,6 @@ public class CmsEvents { if (pathInfo.endsWith("/")) { pathInfo = pathInfo.substring(0, pathInfo.length() - 1); } - Debug.logInfo("Path INFO for Alias: " + pathInfo, module); GenericValue pathAlias = null; try { @@ -155,7 +155,6 @@ public class CmsEvents { if (!alias.startsWith("/")) { alias = "/" + alias; } - RequestDispatcher rd = request.getRequestDispatcher(request.getServletPath() + alias); try { rd.forward(request, response); @@ -268,8 +267,6 @@ public class CmsEvents { // TODO: replace "screen" to support dynamic rendering of different output FormStringRenderer formStringRenderer = new MacroFormRenderer(UtilProperties.getPropertyValue("widget", "screen.formrenderer"), request, response); templateMap.put("formStringRenderer", formStringRenderer); - //include DOCTYPE for cms screens - writer.append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"); // if use web analytics List<GenericValue> webAnalytics = delegator.findByAnd("WebAnalyticsConfig", UtilMisc.toMap("webSiteId", webSiteId), null, false); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy?rev=1628129&r1=1628128&r2=1628129&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy Mon Sep 29 07:08:04 2014 @@ -577,7 +577,7 @@ if (product) { context.availableInventory = availableInventory; // get product associations - alsoBoughtProducts = dispatcher.runSync("getAssociatedProducts", [productId : productId, type : "ALSO_BOUGHT", checkViewAllow : true, prodCatalogId : currentCatalogId, bidirectional : true, sortDescending : true]); + alsoBoughtProducts = dispatcher.runSync("getAssociatedProducts", [productId : productId, type : "ALSO_BOUGHT", checkViewAllow : true, prodCatalogId : currentCatalogId, bidirectional : false, sortDescending : true]); context.alsoBoughtProducts = alsoBoughtProducts.assocProducts; obsoleteProducts = dispatcher.runSync("getAssociatedProducts", [productId : productId, type : "PRODUCT_OBSOLESCENCE", checkViewAllow : true, prodCatalogId : currentCatalogId]); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java?rev=1628129&r1=1628128&r2=1628129&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java Mon Sep 29 07:08:04 2014 @@ -27,6 +27,8 @@ import java.net.URL; import java.nio.ByteBuffer; import java.sql.Timestamp; import java.util.Enumeration; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -42,9 +44,6 @@ import javax.mail.internet.InternetAddre import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.location.FlexibleLocation; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; @@ -84,7 +83,7 @@ public class CommunicationEventServices String communicationEventId = (String) context.get("communicationEventId"); Map<String, Object> result = ServiceUtil.returnSuccess(); - List<Object> errorMessages = FastList.newInstance(); // used to keep a list of all error messages returned from sending emails to contact list + List<Object> errorMessages = new LinkedList<Object>(); // used to keep a list of all error messages returned from sending emails to contact list try { // find the communication event and make sure that it is actually an email @@ -116,7 +115,7 @@ public class CommunicationEventServices } // prepare the email - Map<String, Object> sendMailParams = FastMap.newInstance(); + Map<String, Object> sendMailParams = new HashMap<String, Object>(); sendMailParams.put("sendFrom", communicationEvent.getRelatedOne("FromContactMech", false).getString("infoString")); sendMailParams.put("subject", communicationEvent.getString("subject")); sendMailParams.put("contentType", communicationEvent.getString("contentMimeTypeId")); @@ -129,7 +128,7 @@ public class CommunicationEventServices List <GenericValue> comEventContents = communicationEvent.getRelated("CommEventContentAssoc", null, null, false); if (UtilValidate.isNotEmpty(comEventContents)) { isMultiPart = true; - List<Map<String, ? extends Object>> bodyParts = FastList.newInstance(); + List<Map<String, ? extends Object>> bodyParts = new LinkedList<Map<String,? extends Object>>(); if (UtilValidate.isNotEmpty(communicationEvent.getString("content"))) { bodyParts.add(UtilMisc.<String, Object>toMap("content", communicationEvent.getString("content"), "type", communicationEvent.getString("contentMimeTypeId"))); } @@ -241,7 +240,7 @@ public class CommunicationEventServices } else { // Call the sendEmailToContactList service if there's a contactListId present - Map<String, Object> sendEmailToContactListContext = FastMap.newInstance(); + Map<String, Object> sendEmailToContactListContext = new HashMap<String, Object>(); sendEmailToContactListContext.put("contactListId", communicationEvent.getString("contactListId")); sendEmailToContactListContext.put("communicationEventId", communicationEventId); sendEmailToContactListContext.put("userLogin", userLogin); @@ -273,7 +272,7 @@ public class CommunicationEventServices GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); - List<Object> errorMessages = FastList.newInstance(); + List<Object> errorMessages = new LinkedList<Object>(); String errorCallingUpdateContactListPartyService = UtilProperties.getMessage(resource, "commeventservices.errorCallingUpdateContactListPartyService", locale); String errorCallingSendMailService = UtilProperties.getMessage(resource, "commeventservices.errorCallingSendMailService", locale); String errorInSendEmailToContactListService = UtilProperties.getMessage(resource, "commeventservices.errorInSendEmailToContactListService", locale); @@ -289,7 +288,7 @@ public class CommunicationEventServices GenericValue communicationEvent = delegator.findOne("CommunicationEvent", UtilMisc.toMap("communicationEventId", communicationEventId), false); GenericValue contactList = delegator.findOne("ContactList", UtilMisc.toMap("contactListId", contactListId), false); - Map<String, Object> sendMailParams = FastMap.newInstance(); + Map<String, Object> sendMailParams = new HashMap<String, Object>(); sendMailParams.put("sendFrom", communicationEvent.getRelatedOne("FromContactMech", false).getString("infoString")); sendMailParams.put("subject", communicationEvent.getString("subject")); sendMailParams.put("contentType", communicationEvent.getString("contentMimeTypeId")); @@ -346,7 +345,6 @@ public class CommunicationEventServices sendMailParams.put("sendTo", emailAddress); sendMailParams.put("partyId", partyId); - // if it is a NEWSLETTER then we do not want the outgoing emails stored, so put a communicationEventId in the sendMail context to prevent storeEmailAsCommunicationEvent from running /* @@ -371,19 +369,19 @@ public class CommunicationEventServices // There was a successful earlier attempt, so skip this address continue; } - + // Send e-mail Debug.logInfo("Sending email to contact list [" + contactListId + "] party [" + partyId + "] : " + emailAddress, module); // Make the attempt to send the email to the address - + Map<String, Object> tmpResult = null; - + // Retrieve a contact list party status List<GenericValue> contactListPartyStatuses = delegator.findByAnd("ContactListPartyStatus", UtilMisc.toMap("contactListId", contactListId, "partyId", contactListPartyAndContactMech.getString("partyId"), "fromDate", contactListPartyAndContactMech.getTimestamp("fromDate"), "statusId", "CLPT_ACCEPTED"), null, false); GenericValue contactListPartyStatus = EntityUtil.getFirst(contactListPartyStatuses); if (UtilValidate.isNotEmpty(contactListPartyStatus)) { // prepare body parameters - Map<String, Object> bodyParameters = FastMap.newInstance(); + Map<String, Object> bodyParameters = new HashMap<String, Object>(); bodyParameters.put("contactListId", contactListId); bodyParameters.put("partyId", contactListPartyAndContactMech.getString("partyId")); bodyParameters.put("preferredContactMechId", contactListPartyAndContactMech.getString("preferredContactMechId")); @@ -409,7 +407,7 @@ public class CommunicationEventServices } } } - + // If the e-mail does not be sent then send normal e-mail if (UtilValidate.isEmpty(tmpResult)) { sendMailParams.put("body", communicationEvent.getString("content")); @@ -576,7 +574,7 @@ public class CommunicationEventServices Timestamp now = UtilDateTime.nowTimestamp(); - Map<String, Object> commEventMap = FastMap.newInstance(); + Map<String, Object> commEventMap = new HashMap<String, Object>(); commEventMap.put("communicationEventTypeId", "EMAIL_COMMUNICATION"); commEventMap.put("contactMechTypeId", "EMAIL_ADDRESS"); commEventMap.put("contactMechIdFrom", contactMechIdFrom); @@ -624,7 +622,7 @@ public class CommunicationEventServices String communicationEventId = (String) context.get("communicationEventId"); MimeMessageWrapper wrapper = (MimeMessageWrapper) context.get("messageWrapper"); - Map<String, Object> commEventMap = FastMap.newInstance(); + Map<String, Object> commEventMap = new HashMap<String, Object>(); commEventMap.put("communicationEventId", communicationEventId); commEventMap.put("subject", wrapper.getSubject()); commEventMap.put("statusId", "COM_COMPLETE"); @@ -789,7 +787,7 @@ public class CommunicationEventServices partyIdFrom = (String)result.get("partyId"); contactMechIdFrom = (String)result.get("contactMechId"); - Map<String, Object> commEventMap = FastMap.newInstance(); + Map<String, Object> commEventMap = new HashMap<String, Object>(); commEventMap.put("communicationEventTypeId", "AUTO_EMAIL_COMM"); commEventMap.put("contactMechTypeId", "EMAIL_ADDRESS"); commEventMap.put("messageId", messageId); @@ -983,7 +981,7 @@ public class CommunicationEventServices if (attachmentIndexes.size() > 0) { Debug.logInfo("=== message has attachments [" + attachmentIndexes.size() + "] =====", module); for (String attachmentIdx : attachmentIndexes) { - Map<String, Object> attachmentMap = FastMap.newInstance(); + Map<String, Object> attachmentMap = new HashMap<String, Object>(); attachmentMap.put("communicationEventId", communicationEventId); attachmentMap.put("contentTypeId", "DOCUMENT"); attachmentMap.put("mimeTypeId", "text/html"); @@ -1082,7 +1080,7 @@ public class CommunicationEventServices } if (emailAddress != null) { - map = FastMap.newInstance(); + map = new HashMap<String, Object>(); map.put("address", emailAddress.getAddress()); map.put("userLogin", userLogin); result = dispatcher.runSync("findPartyFromEmailAddress", map); @@ -1097,7 +1095,7 @@ public class CommunicationEventServices private static List<Map<String, Object>> buildListOfPartyInfoFromEmailAddresses(Address [] addresses, GenericValue userLogin, LocalDispatcher dispatcher) throws GenericServiceException { InternetAddress emailAddress = null; Map<String, Object> result = null; - List<Map<String, Object>> tempResults = FastList.newInstance(); + List<Map<String, Object>> tempResults = new LinkedList<Map<String,Object>>(); if (addresses != null) { for (Address addr: addresses) { @@ -1123,7 +1121,7 @@ public class CommunicationEventServices private static List<Map<String, Object>> buildListOfWorkEffortInfoFromEmailAddresses(Address [] addresses, GenericValue userLogin, LocalDispatcher dispatcher) throws GenericServiceException { InternetAddress emailAddress = null; Map<String, Object> result = null; - List<Map<String, Object>> tempResults = FastList.newInstance(); + List<Map<String, Object>> tempResults = new LinkedList<Map<String,Object>>(); String caseInsensitiveEmail = org.ofbiz.base.util.UtilProperties.getPropertyValue("general.properties", "mail.address.caseInsensitive", "N"); if (addresses != null) { @@ -1132,7 +1130,7 @@ public class CommunicationEventServices emailAddress = (InternetAddress)addr; if (emailAddress != null) { - Map<String, String> inputFields = FastMap.newInstance(); + Map<String, String> inputFields = new HashMap<String, String>(); inputFields.put("infoString", emailAddress.getAddress()); inputFields.put("infoString_ic", caseInsensitiveEmail); result = dispatcher.runSync("performFind", UtilMisc.<String, Object>toMap("entityName", "WorkEffortContactMechView" @@ -1226,7 +1224,7 @@ public class CommunicationEventServices GenericValue value = values.get(0); // update the communication event status - Map<String, Object> updateCtx = FastMap.newInstance(); + Map<String, Object> updateCtx = new HashMap<String, Object>(); updateCtx.put("communicationEventId", value.getString("communicationEventId")); updateCtx.put("statusId", "COM_BOUNCED"); updateCtx.put("userLogin", context.get("userLogin")); @@ -1257,7 +1255,7 @@ public class CommunicationEventServices // there should be only one; unique key GenericValue value = values.get(0); - Map<String, Object> updateCtx = FastMap.newInstance(); + Map<String, Object> updateCtx = new HashMap<String, Object>(); updateCtx.put("communicationEventId", value.getString("communicationEventId")); updateCtx.put("contactListId", value.getString("contactListId")); updateCtx.put("contactMechId", value.getString("contactMechId")); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml?rev=1628129&r1=1628128&r2=1628129&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml Mon Sep 29 07:08:04 2014 @@ -20,101 +20,6 @@ under the License. <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd"> - <simple-method method-name="createProductFeatureCategory" short-description="Create Product Feature Category"> - <check-permission permission="CATALOG" action="_CREATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogCreatePermissionError"/> - </check-permission> - <check-errors/> - - <make-value entity-name="ProductFeatureCategory" value-field="newEntity"/> - <set-nonpk-fields value-field="newEntity" map="parameters"/> - - <sequenced-id sequence-name="ProductFeatureCategory" field="newEntity.productFeatureCategoryId"/> - <field-to-result field="newEntity.productFeatureCategoryId" result-name="productFeatureCategoryId"/> - - <create-value value-field="newEntity"/> - </simple-method> - <simple-method method-name="updateProductFeatureCategory" short-description="Update Product Feature Category"> - <check-permission permission="CATALOG" action="_UPDATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogUpdatePermissionError"/> - </check-permission> - <check-errors/> - - <entity-one entity-name="ProductFeatureCategory" value-field="productFeatureCategory"/> - <set-nonpk-fields value-field="productFeatureCategory" map="parameters"/> - <store-value value-field="productFeatureCategory"/> - </simple-method> - - <simple-method method-name="createProductFeature" short-description="Create Product Feature"> - <check-permission permission="CATALOG" action="_CREATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogCreatePermissionError"/> - </check-permission> - <check-errors/> - - <make-value value-field="newEntity" entity-name="ProductFeature"/> - <set-nonpk-fields map="parameters" value-field="newEntity"/> - <if-empty field="parameters.productFeatureId"> - <sequenced-id sequence-name="ProductFeature" field="newEntity.productFeatureId"/> - <else> - <set field="newEntity.productFeatureId" from-field="parameters.productFeatureId"/> - </else> - </if-empty> - <field-to-result field="newEntity.productFeatureId" result-name="productFeatureId"/> - - <create-value value-field="newEntity"/> - </simple-method> - <simple-method method-name="updateProductFeature" short-description="Update Product Feature"> - <check-permission permission="CATALOG" action="_UPDATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogUpdatePermissionError"/> - </check-permission> - <check-errors/> - - <entity-one entity-name="ProductFeature" value-field="productFeature"/> - <set-nonpk-fields map="parameters" value-field="productFeature"/> - <store-value value-field="productFeature"/> - </simple-method> - - <simple-method method-name="applyFeatureToProduct" short-description="Apply Feature to Product"> - <set field="callingMethodName" value="applyFeatureToProduct"/> - <set field="checkAction" value="CREATE"/> - <call-simple-method method-name="checkProductRelatedPermission" xml-resource="component://product/script/org/ofbiz/product/product/ProductServices.xml"/> - <check-errors/> - - <if-empty field="parameters.fromDate"> - <now-timestamp field="parameters.fromDate"/> - </if-empty> - <make-value value-field="newEntity" entity-name="ProductFeatureAppl"/> - <set-pk-fields map="parameters" value-field="newEntity"/> - <set-nonpk-fields map="parameters" value-field="newEntity"/> - <create-value value-field="newEntity"/> - </simple-method> - <simple-method method-name="updateFeatureToProductApplication" short-description="Update Feature to Product Application"> - <set field="callingMethodName" value="updateFeatureToProductApplication"/> - <set field="checkAction" value="UPDATE"/> - <call-simple-method method-name="checkProductRelatedPermission" xml-resource="component://product/script/org/ofbiz/product/product/ProductServices.xml"/> - <check-errors/> - - <entity-one entity-name="ProductFeatureAppl" value-field="productFeatureAppl"/> - <set-nonpk-fields map="parameters" value-field="productFeatureAppl"/> - <store-value value-field="productFeatureAppl"/> - </simple-method> - <simple-method method-name="removeFeatureFromProduct" short-description="Remove Feature from Product"> - <set field="callingMethodName" value="removeFeatureFromProduct"/> - <set field="checkAction" value="DELETE"/> - <call-simple-method method-name="checkProductRelatedPermission" xml-resource="component://product/script/org/ofbiz/product/product/ProductServices.xml"/> - <check-errors/> - - <entity-one entity-name="ProductFeatureAppl" value-field="productFeatureAppl"/> - <!-- This is old code that just sets the thru date; the current codes actually removes the db row - <if-empty field="parameters.thruDate"> - <now-timestamp field="nowStamp"/> - <env-to-field env-name="nowStamp" field-name="thruDate" map-name="parameters"/> - </if-empty> - <field-to-field field-name="thruDate" map-name="parameters" to-map-name="productFeatureAppl"/> - <store-value value-field="productFeatureAppl"/> - --> - <remove-value value-field="productFeatureAppl"/> - </simple-method> <simple-method method-name="applyFeatureToProductFromTypeAndCode" short-description="Apply Feature to Product using Feature Type and ID Code"> <set field="callingMethodName" value="applyFeatureToProductFromTypeAndCode"/> @@ -139,176 +44,6 @@ under the License. <call-service service-name="applyFeatureToProduct" in-map-name="applyFeatureContext"/> </iterate> </simple-method> - - <!-- Methods for ProductFeatureCategoryAppl --> - <simple-method method-name="createProductFeatureCategoryAppl" short-description="Create an Product Feature Category Application"> - <check-permission permission="CATALOG" action="_CREATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogCreatePermissionError"/> - </check-permission> - <check-errors/> - - <make-value value-field="newEntity" entity-name="ProductFeatureCategoryAppl"/> - <set-nonpk-fields map="parameters" value-field="newEntity"/> - <set-pk-fields map="parameters" value-field="newEntity"/> - - <if-empty field="newEntity.fromDate"> - <now-timestamp field="newEntity.fromDate"/> - </if-empty> - - <create-value value-field="newEntity"/> - </simple-method> - <simple-method method-name="updateProductFeatureCategoryAppl" short-description="Update an Product Feature Category Application"> - <check-permission permission="CATALOG" action="_UPDATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogCreatePermissionError"/> - </check-permission> - <check-errors/> - - <make-value value-field="lookupKeyValue" entity-name="ProductFeatureCategoryAppl"/> - <set-pk-fields map="parameters" value-field="lookupKeyValue"/> - <find-by-primary-key map="lookupKeyValue" value-field="lookedUpValue"/> - <set-nonpk-fields map="parameters" value-field="lookedUpValue"/> - <store-value value-field="lookedUpValue"/> - </simple-method> - <simple-method method-name="removeProductFeatureCategoryAppl" short-description="Remove a Product Feature Category Application"> - <check-permission permission="CATALOG" action="_DELETE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogDeletePermissionError"/> - </check-permission> - <check-errors/> - - <make-value value-field="lookupKeyValue" entity-name="ProductFeatureCategoryAppl"/> - <set-pk-fields map="parameters" value-field="lookupKeyValue"/> - <find-by-primary-key map="lookupKeyValue" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> - - <!-- Methods for ProductFeatureCatGrpAppl --> - <simple-method method-name="createProductFeatureCatGrpAppl" short-description="Create a ProductFeatureGroup to ProductCategory Application"> - <check-permission permission="CATALOG" action="_CREATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogCreatePermissionError"/> - </check-permission> - <check-errors/> - - <make-value value-field="newEntity" entity-name="ProductFeatureCatGrpAppl"/> - <set-nonpk-fields map="parameters" value-field="newEntity"/> - <set-pk-fields map="parameters" value-field="newEntity"/> - - <if-empty field="newEntity.fromDate"> - <now-timestamp field="newEntity.fromDate"/> - </if-empty> - - <create-value value-field="newEntity"/> - </simple-method> - <simple-method method-name="updateProductFeatureCatGrpAppl" short-description="Update a ProductFeatureGroup to ProductCategory Application"> - <check-permission permission="CATALOG" action="_UPDATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogUpdatePermissionError"/> - </check-permission> - <check-errors/> - - <make-value value-field="lookupKeyValue" entity-name="ProductFeatureCatGrpAppl"/> - <set-pk-fields map="parameters" value-field="lookupKeyValue"/> - <find-by-primary-key map="lookupKeyValue" value-field="lookedUpValue"/> - <set-nonpk-fields map="parameters" value-field="lookedUpValue"/> - <store-value value-field="lookedUpValue"/> - </simple-method> - <simple-method method-name="removeProductFeatureCatGrpAppl" short-description="Remove a ProductFeatureGroup to ProductCategory Application"> - <check-permission permission="CATALOG" action="_DELETE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogDeletePermissionError"/> - </check-permission> - <check-errors/> - - <make-value value-field="lookupKeyValue" entity-name="ProductFeatureCatGrpAppl"/> - <set-pk-fields map="parameters" value-field="lookupKeyValue"/> - <find-by-primary-key map="lookupKeyValue" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> - - <!-- ProductFeatureGroup Services --> - <simple-method method-name="createProductFeatureGroup" short-description="Create Product Feature Group"> - <check-permission permission="CATALOG" action="_CREATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogCreatePermissionError"/> - </check-permission> - <check-errors/> - - <make-value value-field="newEntity" entity-name="ProductFeatureGroup"/> - <set-nonpk-fields map="parameters" value-field="newEntity"/> - - <sequenced-id sequence-name="ProductFeatureGroup" field="newEntity.productFeatureGroupId"/> - <field-to-result field="newEntity.productFeatureGroupId" result-name="productFeatureGroupId"/> - - <create-value value-field="newEntity"/> - </simple-method> - <simple-method method-name="updateProductFeatureGroup" short-description="Update Product Feature Group"> - <check-permission permission="CATALOG" action="_UPDATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogUpdatePermissionError"/> - </check-permission> - <check-errors/> - - <entity-one entity-name="ProductFeatureGroup" value-field="productFeatureGroup"/> - <set-nonpk-fields map="parameters" value-field="productFeatureGroup"/> - <store-value value-field="productFeatureGroup"/> - </simple-method> - <simple-method method-name="createProductFeatureGroupAppl" short-description="Create an Product Feature Group Application"> - <check-permission permission="CATALOG" action="_CREATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogCreatePermissionError"/> - </check-permission> - <check-errors/> - - <make-value value-field="newEntity" entity-name="ProductFeatureGroupAppl"/> - <set-nonpk-fields map="parameters" value-field="newEntity"/> - <set-pk-fields map="parameters" value-field="newEntity"/> - - <if-empty field="newEntity.fromDate"> - <now-timestamp field="newEntity.fromDate"/> - </if-empty> - - <create-value value-field="newEntity"/> - </simple-method> - <simple-method method-name="updateProductFeatureGroupAppl" short-description="Update an Product Feature Group Application"> - <check-permission permission="CATALOG" action="_UPDATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogUpdatePermissionError"/> - </check-permission> - <check-errors/> - - <make-value value-field="lookupKeyValue" entity-name="ProductFeatureGroupAppl"/> - <set-pk-fields map="parameters" value-field="lookupKeyValue"/> - <find-by-primary-key entity-name="ProductFeatureGroupAppl" map="lookupKeyValue" value-field="lookedUpValue"/> - <set-nonpk-fields map="parameters" value-field="lookedUpValue"/> - <store-value value-field="lookedUpValue"/> - </simple-method> - <simple-method method-name="removeProductFeatureGroupAppl" short-description="Remove a Product Feature Group Application"> - <check-permission permission="CATALOG" action="_DELETE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogDeletePermissionError"/> - </check-permission> - <check-errors/> - - <make-value value-field="lookupKeyValue" entity-name="ProductFeatureGroupAppl"/> - <set-pk-fields map="parameters" value-field="lookupKeyValue"/> - <find-by-primary-key entity-name="ProductFeatureGroupAppl" map="lookupKeyValue" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> - - <!-- Methods for ProductFeatureIactn --> - <simple-method method-name="createProductFeatureIactn" short-description="Create a Product Feature Interaction"> - <check-permission permission="CATALOG" action="_CREATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogCreatePermissionError"/> - </check-permission> - <check-errors/> - <make-value value-field="newEntity" entity-name="ProductFeatureIactn"/> - <set-pk-fields map="parameters" value-field="newEntity"/> - <set-nonpk-fields map="parameters" value-field="newEntity"/> - <create-value value-field="newEntity"/> - </simple-method> - <simple-method method-name="removeProductFeatureIactn" short-description="Remove a Product Feature Interaction"> - <check-permission permission="CATALOG" action="_DELETE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogDeletePermissionError"/> - </check-permission> - <check-errors/> - - <make-value value-field="lookupKeyValue" entity-name="ProductFeatureIactn"/> - <set-pk-fields map="parameters" value-field="lookupKeyValue"/> - <find-by-primary-key map="lookupKeyValue" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> <!-- Methods for ProductFeatureType --> <simple-method method-name="createProductFeatureType" short-description="Create a Product Feature Type"> <check-permission permission="CATALOG" action="_CREATE"> @@ -346,30 +81,6 @@ under the License. <create-value value-field="newEntity"/> </simple-method> - <simple-method method-name="updateProductFeatureType" short-description="Update an Product Feature Type"> - <check-permission permission="CATALOG" action="_UPDATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogUpdatePermissionError"/> - </check-permission> - <check-errors/> - - <make-value value-field="lookupKeyValue" entity-name="ProductFeatureType"/> - <set-pk-fields map="parameters" value-field="lookupKeyValue"/> - <find-by-primary-key map="lookupKeyValue" value-field="lookedUpValue"/> - <set-nonpk-fields map="parameters" value-field="lookedUpValue"/> - <store-value value-field="lookedUpValue"/> - </simple-method> - <simple-method method-name="removeProductFeatureType" short-description="Remove a Product Feature Type"> - <check-permission permission="CATALOG" action="_DELETE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogDeletePermissionError"/> - </check-permission> - <check-errors/> - - <make-value value-field="lookupKeyValue" entity-name="ProductFeatureType"/> - <set-pk-fields map="parameters" value-field="lookupKeyValue"/> - <find-by-primary-key map="lookupKeyValue" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> - <!-- create a new ProductFeatureApplAttr --> <simple-method method-name="createProductFeatureApplAttr" short-description="Create a ProductFeatureApplAttr"> <check-permission permission="CATALOG" action="_CREATE"> @@ -394,70 +105,4 @@ under the License. <check-errors/> </simple-method> - <!-- update an existing ProductFeatureApplAttr --> - <simple-method method-name="updateProductFeatureApplAttr" short-description="Update an existing ProductFeatureApplAttr"> - <check-permission permission="CATALOG" action="_UPDATE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogUpdatePermissionError"/> - </check-permission> - <check-errors/> - <entity-one entity-name="ProductFeatureApplAttr" value-field="productFeatureApplAttr" auto-field-map="true"/> - <check-errors/> - <set-nonpk-fields map="parameters" value-field="productFeatureApplAttr"/> - <store-value value-field="productFeatureApplAttr"/> - <check-errors/> - </simple-method> - - <!-- remove an existing ProductFeatureApplAttr --> - <simple-method method-name="removeProductFeatureApplAttr" short-description="Remove an existing ProductFeatureApplAttr"> - <check-permission permission="CATALOG" action="_DELETE"> - <fail-property resource="ProductUiLabels" property="ProductCatalogDeletePermissionError"/> - </check-permission> - <check-errors/> - <entity-one entity-name="ProductFeatureApplAttr" value-field="productFeatureApplAttr" auto-field-map="true"/> - <check-errors/> - <remove-value value-field="productFeatureApplAttr"/> - <check-errors/> - </simple-method> - - <!-- Feature Price Service --> - <simple-method method-name="createFeaturePrice" short-description="Create a Feature Price"> - <make-value value-field="newEntity" entity-name="ProductFeaturePrice"/> - <if-empty field="parameters.productFeatureId"> - <sequenced-id sequence-name="ProductFeaturePrice" field="parameters.productFeatureId"/> - </if-empty> - <set-nonpk-fields map="parameters" value-field="newEntity"/> - <set-pk-fields map="parameters" value-field="newEntity"/> - - <now-timestamp field="nowTimestamp"/> - - <if-empty field="newEntity.fromDate"> - <set field="newEntity.fromDate" from-field="nowTimestamp"/> - </if-empty> - <field-to-result field="newEntity.fromDate" result-name="fromDate"/> - - <set field="newEntity.lastModifiedDate" from-field="nowTimestamp"/> - <set field="newEntity.createdDate" from-field="nowTimestamp"/> - <set field="newEntity.lastModifiedByUserLogin" from-field="userLogin.userLoginId"/> - <set field="newEntity.createdByUserLogin" from-field="userLogin.userLoginId"/> - - <create-value value-field="newEntity"/> - </simple-method> - <simple-method method-name="updateFeaturePrice" short-description="Update a feature price"> - <entity-one entity-name="ProductFeaturePrice" value-field="lookedUpValue"/> - - <set-nonpk-fields map="parameters" value-field="lookedUpValue"/> - - <now-timestamp field="nowTimestamp"/> - <set field="lookedUpValue.lastModifiedDate" from-field="nowTimestamp"/> - <set field="lookedUpValue.lastModifiedByUserLogin" from-field="userLogin.userLoginId"/> - - <store-value value-field="lookedUpValue"/> - </simple-method> - <simple-method method-name="deleteFeaturePrice" short-description="Delete a feature price"> - <make-value entity-name="ProductFeaturePrice" value-field="lookupPKMap"/> - <set-pk-fields map="parameters" value-field="lookupPKMap"/> - <find-by-primary-key entity-name="ProductFeaturePrice" map="lookupPKMap" value-field="lookedUpValue"/> - - <remove-value value-field="lookedUpValue"/> - </simple-method> </simple-methods> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_feature.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_feature.xml?rev=1628129&r1=1628128&r2=1628129&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_feature.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_feature.xml Mon Sep 29 07:08:04 2014 @@ -25,85 +25,57 @@ under the License. <version>1.0</version> <!-- Product Feature Services --> - <service name="createProductFeatureCategory" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="createProductFeatureCategory" auth="true"> + <service name="createProductFeatureCategory" engine="entity-auto" invoke="create" default-entity-name="ProductFeatureCategory" auth="true"> <description>Create a ProductFeatureCategory record</description> + <permission-service service-name="productGenericPermission" main-action="CREATE"/> <attribute name="parentCategoryId" type="String" mode="IN" optional="true"/> <attribute name="description" type="String" mode="IN" optional="false"/> <attribute name="productFeatureCategoryId" type="String" mode="OUT" optional="false"/> </service> - <service name="updateProductFeatureCategory" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="updateProductFeatureCategory" auth="true"> + <service name="updateProductFeatureCategory" engine="entity-auto" invoke="update" default-entity-name="ProductFeatureCategory" auth="true"> <description>Update a ProductFeatureCategory record</description> + <permission-service service-name="productGenericPermission" main-action="UPDATE"/> <attribute name="productFeatureCategoryId" type="String" mode="IN" optional="false"/> <attribute name="parentCategoryId" type="String" mode="IN" optional="true"/> <attribute name="description" type="String" mode="IN" optional="false"/> </service> - <service name="createProductFeature" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="createProductFeature" auth="true"> + <service name="createProductFeature" engine="entity-auto" invoke="create" default-entity-name="ProductFeature" auth="true"> <description>Create a ProductFeature record</description> - <attribute name="productFeatureTypeId" type="String" mode="IN" optional="false"/> - <attribute name="productFeatureCategoryId" type="String" mode="IN" optional="true"/> - <attribute name="description" type="String" mode="IN" optional="false"/> - <attribute name="uomId" type="String" mode="IN" optional="true"/> - <attribute name="numberSpecified" type="BigDecimal" mode="IN" optional="true"/> - <attribute name="defaultAmount" type="BigDecimal" mode="IN" optional="true"/> - <attribute name="productFeatureId" type="String" mode="IN" optional="true"/> + <auto-attributes include="all" mode="IN" optional="true"/> <attribute name="productFeatureId" type="String" mode="OUT" optional="false"/> - <attribute name="defaultSequenceNum" type="Long" mode="IN" optional="true"/> - <attribute name="idCode" type="String" mode="IN" optional="true"/> - <attribute name="abbrev" type="String" mode="IN" optional="true"/> + <override name="productFeatureTypeId" mode="IN" optional="false"/> + <override name="description" mode="IN" optional="false"/> </service> - <service name="updateProductFeature" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="updateProductFeature" auth="true"> + <service name="updateProductFeature" engine="entity-auto" invoke="update" default-entity-name="ProductFeature" auth="true"> <description>Update a ProductFeature record</description> - <attribute name="productFeatureId" type="String" mode="IN" optional="false"/> - <attribute name="productFeatureTypeId" type="String" mode="IN" optional="false"/> - <attribute name="productFeatureCategoryId" type="String" mode="IN" optional="true"/> - <attribute name="description" type="String" mode="IN" optional="false"/> - <attribute name="uomId" type="String" mode="IN" optional="true"/> - <attribute name="numberSpecified" type="BigDecimal" mode="IN" optional="true"/> - <attribute name="defaultAmount" type="BigDecimal" mode="IN" optional="true"/> - <attribute name="defaultSequenceNum" type="Long" mode="IN" optional="true"/> - <attribute name="idCode" type="String" mode="IN" optional="true"/> - <attribute name="abbrev" type="String" mode="IN" optional="true"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <override name="productFeatureTypeId" mode="IN" optional="false"/> + <override name="description" mode="IN" optional="false"/> </service> - <service name="applyFeatureToProduct" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="applyFeatureToProduct" auth="true"> + <service name="applyFeatureToProduct" engine="entity-auto" invoke="create" default-entity-name="ProductFeatureAppl" auth="true"> <description>Apply a ProductFeature to a Product; a fromDate can be used to specify when the feature will be applied, if no fromDate is specified, it will be applied now.</description> - <attribute name="productId" type="String" mode="IN" optional="false"/> - <attribute name="productFeatureId" type="String" mode="IN" optional="false"/> - <attribute name="productFeatureApplTypeId" type="String" mode="IN" optional="false"/> - <attribute name="fromDate" type="java.sql.Timestamp" mode="IN" optional="true"/> - <attribute name="thruDate" type="java.sql.Timestamp" mode="IN" optional="true"/> - <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/> - <attribute name="amount" type="BigDecimal" mode="IN" optional="true"/> + <permission-service service-name="productGenericPermission" main-action="CREATE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <override name="productFeatureApplTypeId" mode="IN" optional="false"/> + <override name="fromDate" mode="IN" optional="true"/> </service> - <service name="updateFeatureToProductApplication" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="updateFeatureToProductApplication" auth="true"> + <service name="updateFeatureToProductApplication" engine="entity-auto" invoke="update" default-entity-name="ProductFeatureAppl" auth="true"> <description>Update a ProductFeature to Product Application</description> - <attribute name="productId" type="String" mode="IN" optional="false"/> - <attribute name="productFeatureId" type="String" mode="IN" optional="false"/> - <attribute name="productFeatureApplTypeId" type="String" mode="IN" optional="false"/> - <attribute name="fromDate" type="java.sql.Timestamp" mode="IN" optional="false"/> - <attribute name="thruDate" type="java.sql.Timestamp" mode="IN" optional="true"/> - <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/> - <attribute name="amount" type="BigDecimal" mode="IN" optional="true"/> - <attribute name="recurringAmount" type="BigDecimal" mode="IN" optional="true"/> + <permission-service service-name="productGenericPermission" main-action="UPDATE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <override name="productFeatureApplTypeId" mode="IN" optional="false"/> </service> - <service name="removeFeatureFromProduct" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="removeFeatureFromProduct" auth="true"> - <description>Remove a ProductFeature from a Product; a thruDate can be used - to specify when the feature will be removed, if no thruDate is specified, - it will be removed now.</description> - <attribute name="productId" type="String" mode="IN" optional="false"/> - <attribute name="productFeatureId" type="String" mode="IN" optional="false"/> - <attribute name="fromDate" type="java.sql.Timestamp" mode="IN" optional="false"/> - <attribute name="thruDate" type="java.sql.Timestamp" mode="IN" optional="true"/> + <service name="removeFeatureFromProduct" engine="entity-auto" invoke="delete" default-entity-name="ProductFeatureAppl" auth="true"> + <description>Remove a ProductFeature from a Product</description> + <permission-service service-name="productGenericPermission" main-action="DELETE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> </service> <service name="applyFeatureToProductFromTypeAndCode" engine="simple" location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="applyFeatureToProductFromTypeAndCode" auth="true"> @@ -118,94 +90,89 @@ under the License. </service> <!-- ProductFeatureCategoryAppl Services --> - <service name="createProductFeatureCategoryAppl" default-entity-name="ProductFeatureCategoryAppl" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="createProductFeatureCategoryAppl" auth="true"> + <service name="createProductFeatureCategoryAppl" default-entity-name="ProductFeatureCategoryAppl" engine="entity-auto" invoke="create" auth="true"> <description>Create a ProductFeatureCategory to ProductCategory Application</description> + <permission-service service-name="productGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="fromDate" optional="true"/> </service> - <service name="updateProductFeatureCategoryAppl" default-entity-name="ProductFeatureCategoryAppl" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="updateProductFeatureCategoryAppl" auth="true"> + <service name="updateProductFeatureCategoryAppl" default-entity-name="ProductFeatureCategoryAppl" engine="entity-auto" invoke="update" auth="true"> <description>Update a ProductFeatureCategory to ProductCategory Application</description> + <permission-service service-name="productGenericPermission" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> - <service name="removeProductFeatureCategoryAppl" default-entity-name="ProductFeatureCategoryAppl" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="removeProductFeatureCategoryAppl" auth="true"> + <service name="removeProductFeatureCategoryAppl" default-entity-name="ProductFeatureCategoryAppl" engine="entity-auto" invoke="delete" auth="true"> <description>Remove a ProductFeatureCategory to ProductCategory Application</description> + <permission-service service-name="productGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> <!-- ProductFeatureCatGrpAppl Services --> - <service name="createProductFeatureCatGrpAppl" default-entity-name="ProductFeatureCatGrpAppl" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="createProductFeatureCatGrpAppl" auth="true"> + <service name="createProductFeatureCatGrpAppl" default-entity-name="ProductFeatureCatGrpAppl" engine="entity-auto" invoke="create" auth="true"> <description>Create a ProductFeatureGroup to ProductCategory Application</description> + <permission-service service-name="productGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="fromDate" optional="true"/> </service> - <service name="updateProductFeatureCatGrpAppl" default-entity-name="ProductFeatureCatGrpAppl" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="updateProductFeatureCatGrpAppl" auth="true"> + <service name="updateProductFeatureCatGrpAppl" default-entity-name="ProductFeatureCatGrpAppl" engine="entity-auto" invoke="update" auth="true"> <description>Update a ProductFeatureGroup to ProductCategory Application</description> + <permission-service service-name="productGenericPermission" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> - <service name="removeProductFeatureCatGrpAppl" default-entity-name="ProductFeatureCatGrpAppl" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="removeProductFeatureCatGrpAppl" auth="true"> + <service name="removeProductFeatureCatGrpAppl" default-entity-name="ProductFeatureCatGrpAppl" engine="entity-auto" invoke="delete" auth="true"> <description>Remove a ProductFeatureGroup to ProductCategory Application</description> + <permission-service service-name="productGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> <!-- ProductFeatureGroup Services --> - <service name="createProductFeatureGroup" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="createProductFeatureGroup" auth="true"> + <service name="createProductFeatureGroup" default-entity-name="ProductFeatureGroup" engine="entity-auto" invoke="create" auth="true"> <description>Create a ProductFeatureGroup</description> + <permission-service service-name="productGenericPermission" main-action="CREATE"/> <attribute name="description" type="String" mode="IN" optional="true"/> <attribute name="productFeatureGroupId" type="String" mode="OUT" optional="false"/> </service> - <service name="updateProductFeatureGroup" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="updateProductFeatureGroup" auth="true"> + <service name="updateProductFeatureGroup" default-entity-name="ProductFeatureGroup" engine="entity-auto" invoke="update" auth="true"> <description>Create a ProductFeatureGroup</description> + <permission-service service-name="productGenericPermission" main-action="UPDATE"/> <attribute name="productFeatureGroupId" type="String" mode="IN" optional="false"/> <attribute name="description" type="String" mode="IN" optional="true"/> </service> - <service name="createProductFeatureGroupAppl" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="createProductFeatureGroupAppl" auth="true"> + <service name="createProductFeatureGroupAppl" default-entity-name="ProductFeatureGroupAppl" engine="entity-auto" invoke="create" auth="true"> <description>Create a ProductFeatureGroup to ProductFeature Application</description> - <attribute name="productFeatureGroupId" type="String" mode="IN" optional="false"/> - <attribute name="productFeatureId" type="String" mode="IN" optional="false"/> - <attribute name="fromDate" type="java.sql.Timestamp" mode="IN" optional="true"/> - <attribute name="thruDate" type="java.sql.Timestamp" mode="IN" optional="true"/> - <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/> + <permission-service service-name="productGenericPermission" main-action="CREATE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <override name="fromDate" mode="IN" optional="true"/> </service> - <service name="updateProductFeatureGroupAppl" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="updateProductFeatureGroupAppl" auth="true"> + <service name="updateProductFeatureGroupAppl" default-entity-name="ProductFeatureGroupAppl" engine="entity-auto" invoke="update" auth="true"> <description>Update a ProductFeatureGroup to ProductFeature Application</description> - <attribute name="productFeatureGroupId" type="String" mode="IN" optional="false"/> - <attribute name="productFeatureId" type="String" mode="IN" optional="false"/> - <attribute name="fromDate" type="java.sql.Timestamp" mode="IN" optional="false"/> - <attribute name="thruDate" type="java.sql.Timestamp" mode="IN" optional="true"/> - <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/> + <permission-service service-name="productGenericPermission" main-action="UPDATE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> - <service name="removeProductFeatureGroupAppl" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="removeProductFeatureGroupAppl" auth="true"> + <service name="removeProductFeatureGroupAppl" default-entity-name="ProductFeatureGroupAppl" engine="entity-auto" invoke="delete" auth="true"> <description>Remove a ProductFeatureGroup to ProductFeature Application</description> + <permission-service service-name="productGenericPermission" main-action="DELETE"/> <attribute name="productFeatureGroupId" type="String" mode="IN" optional="false"/> <attribute name="productFeatureId" type="String" mode="IN" optional="false"/> <attribute name="fromDate" type="java.sql.Timestamp" mode="IN" optional="false"/> </service> <!-- ProductFeatureIactn Services --> - <service name="createProductFeatureIactn" default-entity-name="ProductFeatureIactn" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="createProductFeatureIactn" auth="true"> + <service name="createProductFeatureIactn" default-entity-name="ProductFeatureIactn" engine="entity-auto" invoke="create" auth="true"> <description>Create a ProductFeatureIactn</description> + <permission-service service-name="productGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="productFeatureIactnTypeId" mode="IN" optional="false"/> </service> - <service name="removeProductFeatureIactn" default-entity-name="ProductFeatureIactn" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="removeProductFeatureIactn" auth="true"> + <service name="removeProductFeatureIactn" default-entity-name="ProductFeatureIactn" engine="entity-auto" invoke="delete" auth="true"> <description>Remove a ProductFeatureIactn</description> + <permission-service service-name="productGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> <!-- ProductFeatureType Services --> @@ -216,41 +183,41 @@ under the License. <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="productFeatureTypeId" mode="IN" optional="true" /> </service> - <service name="updateProductFeatureType" default-entity-name="ProductFeatureType" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="updateProductFeatureType" auth="true"> + <service name="updateProductFeatureType" default-entity-name="ProductFeatureType" engine="entity-auto" invoke="update" auth="true"> <description>Update a ProductFeatureType</description> + <permission-service service-name="productGenericPermission" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> - <service name="removeProductFeatureType" default-entity-name="ProductFeatureType" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="removeProductFeatureType" auth="true"> + <service name="removeProductFeatureType" default-entity-name="ProductFeatureType" engine="entity-auto" invoke="delete" auth="true"> <description>Remove a ProductFeatureType</description> + <permission-service service-name="productGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> <!-- ProductFeatureApplAttr --> <service name="createProductFeatureApplAttr" default-entity-name="ProductFeatureApplAttr" engine="simple" location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="createProductFeatureApplAttr" auth="true"> <description>Create a ProductFeatureApplAttr</description> + <permission-service service-name="productGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="fromDate" optional="true"/> </service> - <service name="updateProductFeatureApplAttr" default-entity-name="ProductFeatureApplAttr" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="updateProductFeatureApplAttr" auth="true"> + <service name="updateProductFeatureApplAttr" default-entity-name="ProductFeatureApplAttr" engine="entity-auto" invoke="update" auth="true"> <description>Update a ProductFeatureApplAttr</description> + <permission-service service-name="productGenericPermission" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> - <service name="removeProductFeatureApplAttr" default-entity-name="ProductFeatureApplAttr" engine="simple" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="removeProductFeatureApplAttr" auth="true"> + <service name="removeProductFeatureApplAttr" default-entity-name="ProductFeatureApplAttr" engine="entity-auto" invoke="delete" auth="true"> <description>Remove a ProductFeatureApplAttr</description> + <permission-service service-name="productGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> <!-- Feature Price Service --> - <service name="createFeaturePrice" engine="simple" default-entity-name="ProductFeaturePrice" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="createFeaturePrice" auth="true"> + <service name="createFeaturePrice" default-entity-name="ProductFeaturePrice" engine="entity-auto" invoke="create" auth="true"> <description>Create a Feature Price</description> + <permission-service service-name="productGenericPermission" main-action="CREATE"/> <auto-attributes mode="IN" include="pk" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"> <exclude field-name="createdDate"/> @@ -262,9 +229,9 @@ under the License. <override name="fromDate" mode="INOUT" optional="true"/> <override name="price" optional="false"/> </service> - <service name="updateFeaturePrice" engine="simple" default-entity-name="ProductFeaturePrice" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="updateFeaturePrice" auth="true"> + <service name="updateFeaturePrice" default-entity-name="ProductFeaturePrice" engine="entity-auto" invoke="update" auth="true"> <description>Update a Feature Price</description> + <permission-service service-name="productGenericPermission" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"> <exclude field-name="createdDate"/> @@ -274,9 +241,9 @@ under the License. </auto-attributes> <override name="price" optional="false"/> </service> - <service name="deleteFeaturePrice" engine="simple" default-entity-name="ProductFeaturePrice" - location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="deleteFeaturePrice" auth="true"> + <service name="deleteFeaturePrice" default-entity-name="ProductFeaturePrice" engine="entity-auto" invoke="delete" auth="true"> <description>Delete a Feature Price</description> + <permission-service service-name="productGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> </services> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/securityext/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/securityext/build.xml?rev=1628129&r1=1628128&r2=1628129&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/securityext/build.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/securityext/build.xml Mon Sep 29 07:08:04 2014 @@ -58,11 +58,6 @@ under the License. <target name="jar" depends="classes"> <main-jar/> - <test-jar> - <test-selector> - <filename name="META-INF/services"/> - <filename name="META-INF/services/*"/> - </test-selector> - </test-jar> + <test-jar/> </target> </project> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml?rev=1628129&r1=1628128&r2=1628129&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml Mon Sep 29 07:08:04 2014 @@ -221,7 +221,7 @@ under the License. <basename property="releasePath" file="${info.entry.url}"/> <tstamp> <format property="dateTime" pattern="yyyy-MM-dd HH:mm:ss"/> - </tstamp> + </tstamp> <echo message=" - Release-revision : ${releasePath}-r${info.entry.commit(revision)}, ${uiLabelMap.CommonBuiltOn} ${dateTime}" file="runtime/svninfo.ftl"/> <delete file="runtime/svninfo_tmp.xml"/> <echo message="Done!"/> @@ -266,7 +266,7 @@ under the License. <target name="build-dev" - description="Patch sources in a dev environment if patch files are present in runtime/patches."> + description="Patch sources in a dev environment if patch files are present in runtime/patches. Needs a Subversion client installed"> <!-- patch task can't handle a fileset => create a global patch --> <concat destfile="${basedir}/runtime/patches/dev.patch" encoding="UTF-8" outputencoding="UTF-8"> <fileset dir="${basedir}/runtime/patches" casesensitive="no"> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/build.xml?rev=1628129&r1=1628128&r2=1628129&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/build.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/build.xml Mon Sep 29 07:08:04 2014 @@ -54,10 +54,6 @@ under the License. <file name="org/ofbiz/base/util/test/UtilIOTests.java"/> <file name="org/ofbiz/base/test/BaseUnitTests.java"/> <file name="org/ofbiz/base/util/collections/test/GenericMapTest.java"/> - <file name="org/ofbiz/base/concurrent/test/DependencyPoolTests.java"/> - <file name="org/ofbiz/base/concurrent/test/SyncTTLObjectTest.java"/> - <file name="org/ofbiz/base/concurrent/test/AsyncTTLObjectTest.java"/> - <file name="org/ofbiz/base/concurrent/test/TTLCachedObjectTest.java"/> </filelist> <patternset id="cobertura-src-dirs"> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java?rev=1628129&r1=1628128&r2=1628129&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java Mon Sep 29 07:08:04 2014 @@ -19,12 +19,12 @@ package org.ofbiz.base.concurrent; import java.util.Collection; -import java.util.Iterator; import java.util.List; import java.util.concurrent.DelayQueue; import java.util.concurrent.Delayed; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.ScheduledExecutorService; @@ -42,14 +42,14 @@ import org.ofbiz.base.util.Debug; @SourceMonitored public final class ExecutionPool { public static final String module = ExecutionPool.class.getName(); - public static final ExecutorService GLOBAL_BATCH = getPooledExecutor(null, "OFBiz-batch", -1, Integer.MAX_VALUE, false); - public static final ScheduledExecutorService GLOBAL_EXECUTOR = getScheduledExecutor(null, "OFBiz-config", -1, false); - public static final ForkJoinPool GLOBAL_FORK_JOIN = getForkJoinPool(-1); + public static final ExecutorService GLOBAL_BATCH = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 5, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), new ExecutionPoolThreadFactory(null, "OFBiz-batch")); + public static final ForkJoinPool GLOBAL_FORK_JOIN = new ForkJoinPool(); + private static final ExecutorService pulseExecutionPool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors(), new ExecutionPoolThreadFactory(null, "OFBiz-ExecutionPoolPulseWorker")); protected static class ExecutionPoolThreadFactory implements ThreadFactory { private final ThreadGroup group; private final String namePrefix; - private int count = 0; + private volatile int count = 1; protected ExecutionPoolThreadFactory(ThreadGroup group, String namePrefix) { this.group = group; @@ -65,48 +65,18 @@ public final class ExecutionPool { } } - public static ThreadFactory createThreadFactory(ThreadGroup group, String namePrefix) { - return new ExecutionPoolThreadFactory(group, namePrefix); - } - - public static int autoAdjustThreadCount(int threadCount) { - if (threadCount == 0) { - return 1; - } else if (threadCount < 0) { - int numCpus = Runtime.getRuntime().availableProcessors(); - return Math.abs(threadCount) * numCpus; - } else { - return threadCount; + public static ScheduledExecutorService getScheduledExecutor(ThreadGroup group, String namePrefix, int threadCount, long keepAliveSeconds, boolean preStart) { + ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(threadCount, new ExecutionPoolThreadFactory(group, namePrefix)); + if (keepAliveSeconds > 0) { + executor.setKeepAliveTime(keepAliveSeconds, TimeUnit.SECONDS); + executor.allowCoreThreadTimeOut(true); } - } - - @Deprecated - public static ScheduledExecutorService getExecutor(ThreadGroup group, String namePrefix, int threadCount, boolean preStart) { - return getScheduledExecutor(group, namePrefix, threadCount, preStart); - } - - public static ScheduledExecutorService getScheduledExecutor(ThreadGroup group, String namePrefix, int threadCount, boolean preStart) { - ThreadFactory threadFactory = createThreadFactory(group, namePrefix); - ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(autoAdjustThreadCount(threadCount), threadFactory); if (preStart) { executor.prestartAllCoreThreads(); } return executor; } - public static ExecutorService getPooledExecutor(ThreadGroup group, String namePrefix, int threadCount, int maximumPoolSize, boolean preStart) { - ThreadFactory threadFactory = createThreadFactory(group, namePrefix); - ThreadPoolExecutor executor = new ThreadPoolExecutor(autoAdjustThreadCount(threadCount), maximumPoolSize, 5, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), threadFactory); - if (preStart) { - executor.prestartAllCoreThreads(); - } - return executor; - } - - public static ForkJoinPool getForkJoinPool(int threadCount) { - return new ForkJoinPool(autoAdjustThreadCount(threadCount)); - } - public static <F> List<F> getAllFutures(Collection<Future<F>> futureList) { List<F> result = FastList.newInstance(); for (Future<F> future: futureList) { @@ -129,25 +99,10 @@ public final class ExecutionPool { delayQueue.remove(pulse); } - public static void pulseAll(Class<? extends Pulse> match) { - Iterator<Pulse> it = delayQueue.iterator(); - while (it.hasNext()) { - Pulse pulse = it.next(); - if (match.isInstance(pulse)) { - it.remove(); - pulse.run(); - } - } - } - static { - ExecutionPoolPulseWorker worker = new ExecutionPoolPulseWorker(); - int processorCount = Runtime.getRuntime().availableProcessors(); - for (int i = 0; i < processorCount; i++) { - Thread t = new Thread(worker); - t.setDaemon(true); - t.setName("OFBiz-ExecutionPoolPulseWorker-" + i); - t.start(); + int numberOfExecutionPoolPulseWorkers = Runtime.getRuntime().availableProcessors(); + for (int i = 0; i < numberOfExecutionPoolPulseWorkers; i++) { + pulseExecutionPool.execute(new ExecutionPoolPulseWorker()); } }