Author: jleroux
Date: Mon Aug 17 08:20:38 2009 New Revision: 804895 URL: http://svn.apache.org/viewvc?rev=804895&view=rev Log: Some fusiness Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataServices.java ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeByteArrayInputStream.java ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeByteArrayOutputStream.java ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeWorker.java ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchWorker.java ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/InjectNodeTrailCsvTransform.java ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderEvents.java ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryWorker.java ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java ofbiz/trunk/applications/product/src/org/ofbiz/product/test/StockMovesTest.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilGenerics.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilJavaParse.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/XslTransform.java ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonServices.java ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java ofbiz/trunk/framework/common/src/org/ofbiz/common/image/ImageTransform.java ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityDateFilterCondition.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityOperator.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelRelation.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncServices.java ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/While.java ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/AbstractEngine.java ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/DataLoader.java ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/DataLoop.java ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/GroovyRunner.java ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/InitJython.java ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/JythonRunner.java ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumIDEConverter.java ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/util/TestUtils.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/DojoJSONServiceEventHandler.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizAmountTransform.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/FopRenderer.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapper.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/TreeStringRenderer.java ofbiz/trunk/specialpurpose/crowd/src/org/ofbiz/crowd/security/SecurityServerHttpBindingStub.java ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java ofbiz/trunk/specialpurpose/hhfacility/src/org/ofbiz/hhfacility/FacilityServices.java ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Input.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/InputWithPassword.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/SecurityEvents.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/NullPosPrinter.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/Keyboard.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PosDialog.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/XFocusDialog.java ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java ofbiz/trunk/specialpurpose/shark/src/org/enhydra/shark/ThreadedToolAgentManager.java ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/container/SharkContainer.java ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/mapping/EntityApplicationMap.java ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfActivityImpl.java Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java Mon Aug 17 08:20:38 2009 @@ -176,7 +176,7 @@ if (days >= 0) { partyCommissionResult.put("days", Long.valueOf(days)); } - if(!commissions.contains(partyCommissionResult)) { + if (!commissions.contains(partyCommissionResult)) { commissions.add(partyCommissionResult); } } Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java Mon Aug 17 08:20:38 2009 @@ -897,7 +897,7 @@ // Determine commission parties for this invoiceItem if (productId != null && productId.length() > 0) { Map resultMap = null; - try{ + try { resultMap = dispatcher.runSync("getCommissionForProduct", UtilMisc.<String, Object>toMap( "productId", productId, "invoiceId", invoiceId, @@ -963,7 +963,7 @@ createInvoiceMap.put("userLogin", userLogin); // store the invoice first Map createInvoiceResult = null; - try{ + try { createInvoiceResult = dispatcher.runSync("createInvoice", createInvoiceMap); } catch (GenericServiceException e) { return ServiceUtil.returnError(UtilProperties.getMessage(resource,"AccountingInvoiceCommissionError",locale), null, null, createInvoiceResult); @@ -1493,7 +1493,7 @@ invoiceableShipments = delegator.findList("Shipment", EntityCondition.makeCondition("shipmentId", EntityOperator.IN, invoiceableShipmentIds), null, null, null, false); } } - } catch ( GenericEntityException e ) { + } catch (GenericEntityException e) { String errMsg = UtilProperties.getMessage(resource, "AccountingTroubleCallingCreateInvoicesFromShipmentsService", locale); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); @@ -1549,7 +1549,7 @@ GenericValue destinationContactMech = null; try { destinationContactMech = shipment.getRelatedOne("DestinationPostalAddress"); - } catch ( GenericEntityException e ) { + } catch (GenericEntityException e) { String errMsg = UtilProperties.getMessage(resource, "AccountingTroubleCallingCreateInvoicesFromShipmentService", locale); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); @@ -1594,7 +1594,7 @@ } try { delegator.storeAll(orderAdjustments); - } catch ( GenericEntityException e ) { + } catch (GenericEntityException e) { String errMsg = UtilProperties.getMessage(resource, "AccountingProblemStoringOrderAdjustments", UtilMisc.toMap("orderAdjustments", orderAdjustments), locale); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); @@ -1605,7 +1605,7 @@ List orderPaymentPreferences = null; try { orderPaymentPreferences = delegator.findByAnd("OrderPaymentPreference", UtilMisc.toMap("orderId", orderId, "paymentMethodTypeId", "CREDIT_CARD")); - } catch ( GenericEntityException e ) { + } catch (GenericEntityException e) { String errMsg = UtilProperties.getMessage(resource, "AccountingProblemGettingOrderPaymentPreferences", locale); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); @@ -1618,7 +1618,7 @@ paymentMethodId = cardOrderPaymentPref.getString("paymentMethodId"); } - if (paymentMethodId != null ) { + if (paymentMethodId != null) { // Release all outstanding (not settled or cancelled) authorizations, while keeping a running // total of their amounts so that the total plus the additional shipping charges can be authorized again @@ -1638,7 +1638,7 @@ Map prefReleaseResult = null; try { prefReleaseResult = dispatcher.runSync("releaseOrderPaymentPreference", UtilMisc.toMap("orderPaymentPreferenceId", orderPaymentPreference.getString("orderPaymentPreferenceId"), "userLogin", context.get("userLogin"))); - } catch ( GenericServiceException e ) { + } catch (GenericServiceException e) { String errMsg = UtilProperties.getMessage(resource, "AccountingTroubleCallingReleaseOrderPaymentPreferenceService", locale); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); @@ -1678,8 +1678,8 @@ } // If the authorization fails, create the invoice anyway, but make a note of it - boolean authFinished = ( (Boolean) authResult.get("finished") ).booleanValue(); - boolean authErrors = ( (Boolean) authResult.get("errors") ).booleanValue(); + boolean authFinished = ((Boolean) authResult.get("finished")).booleanValue(); + boolean authErrors = ((Boolean) authResult.get("errors")).booleanValue(); if (authErrors || ! authFinished) { String errMsg = UtilProperties.getMessage(resource, "AccountingUnableToAuthAdditionalShipCharges", UtilMisc.toMap("shipmentId", shipmentId, "paymentMethodId", paymentMethodId, "orderPaymentPreferenceId", orderPaymentPreferenceId), locale); Debug.logError(errMsg, module); @@ -1697,7 +1697,7 @@ String shipmentId = (String) shipmentIds.get(0); try { shipmentItemBillings = delegator.findByAnd("ShipmentItemBilling", UtilMisc.toMap("shipmentId", shipmentId)); - } catch ( GenericEntityException e ) { + } catch (GenericEntityException e) { String errMsg = UtilProperties.getMessage(resource, "AccountingProblemGettingShipmentItemBilling", locale); return ServiceUtil.returnError(errMsg); } @@ -1784,7 +1784,7 @@ // group the shipments by returnId (because we want a seperate itemized invoice for each return) Map itemsShippedGroupedByReturn = FastMap.newInstance(); - for (Iterator iter = shippedItems.iterator(); iter.hasNext(); ) { + for (Iterator iter = shippedItems.iterator(); iter.hasNext();) { GenericValue item = (GenericValue) iter.next(); String returnId = null; String returnItemSeqId = null; @@ -1819,7 +1819,7 @@ } // loop through the returnId keys in the map and invoke the createInvoiceFromReturn service for each - for (Iterator iter = itemsShippedGroupedByReturn.keySet().iterator(); iter.hasNext(); ) { + for (Iterator iter = itemsShippedGroupedByReturn.keySet().iterator(); iter.hasNext();) { String returnId = (String) iter.next(); List billItems = (List) itemsShippedGroupedByReturn.get(returnId); if (Debug.verboseOn()) { @@ -1894,7 +1894,7 @@ int invoiceItemSeqNum = 1; String invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, INVOICE_ITEM_SEQUENCE_ID_DIGITS); - for (Iterator iter = billItems.iterator(); iter.hasNext(); ) { + for (Iterator iter = billItems.iterator(); iter.hasNext();) { GenericValue item = (GenericValue) iter.next(); boolean shipmentReceiptFound = false; boolean itemIssuanceFound = false; @@ -1985,7 +1985,7 @@ // for each adjustment related to this ReturnItem, create a separate invoice item List adjustments = returnItem.getRelatedCache("ReturnAdjustment"); - for (Iterator adjIter = adjustments.iterator(); adjIter.hasNext(); ) { + for (Iterator adjIter = adjustments.iterator(); adjIter.hasNext();) { GenericValue adjustment = (GenericValue) adjIter.next(); if (adjustment.get("amount") == null) { @@ -2052,7 +2052,7 @@ // loop through return-wide adjustments and create invoice items for each List adjustments = returnHeader.getRelatedByAndCache("ReturnAdjustment", UtilMisc.toMap("returnItemSeqId", "_NA_")); - for (Iterator iter = adjustments.iterator(); iter.hasNext(); ) { + for (Iterator iter = adjustments.iterator(); iter.hasNext();) { GenericValue adjustment = (GenericValue) iter.next(); // determine invoice item type from the return item type @@ -2126,7 +2126,7 @@ GenericValue invoice = null ; try { invoice = delegator.findByPrimaryKey("Invoice", UtilMisc.toMap("invoiceId", invoiceId)); - } catch ( GenericEntityException e ) { + } catch (GenericEntityException e) { Debug.logError(e, "Problem getting Invoice for Invoice ID" + invoiceId, module); return ServiceUtil.returnError("Problem getting Invoice for Invoice ID" + invoiceId); } @@ -2141,7 +2141,7 @@ try { paymentAppl = delegator.findByAnd("PaymentAndApplication", UtilMisc.toMap("invoiceId", invoiceId)); // For each payment application, select only those that are RECEIVED or SENT based on whether the payment is a RECEIPT or DISBURSEMENT respectively - for (Iterator iter = paymentAppl.iterator(); iter.hasNext(); ) { + for (Iterator iter = paymentAppl.iterator(); iter.hasNext();) { GenericValue payment = (GenericValue) iter.next(); if ("PMNT_RECEIVED".equals(payment.get("statusId")) && UtilAccounting.isReceipt(payment)) { continue; // keep @@ -2243,7 +2243,7 @@ Map createInvoiceItemResult = null; try { createInvoiceItemResult = dispatcher.runSync("createInvoiceItem", createInvoiceItemContext); - } catch ( GenericServiceException e ) { + } catch (GenericServiceException e) { String errMsg = UtilProperties.getMessage(resource,"AccountingServiceErrorCreatingInvoiceItemFromOrder",locale) + ": " + e.toString(); Debug.logError(e, errMsg, module); ServiceUtil.returnError(errMsg); @@ -2262,7 +2262,7 @@ try { Map createOrderAdjustmentBillingResult = dispatcher.runSync("createOrderAdjustmentBilling", createOrderAdjustmentBillingContext); - } catch ( GenericServiceException e ) { + } catch (GenericServiceException e) { ServiceUtil.returnError(UtilProperties.getMessage(resource,"AccountingErrorCreatingOrderAdjustmentBillingFromOrder",locale), null, null, createOrderAdjustmentBillingContext); } @@ -2301,7 +2301,7 @@ Map createInvoiceItemResult = null; try { createInvoiceItemResult = dispatcher.runSync("createInvoiceItem", createInvoiceItemContext); - } catch ( GenericServiceException e ) { + } catch (GenericServiceException e) { String errMsg = UtilProperties.getMessage(resource,"AccountingServiceErrorCreatingInvoiceItemFromOrder",locale) + ": " + e.toString(); Debug.logError(e, errMsg, module); ServiceUtil.returnError(errMsg); @@ -2320,7 +2320,7 @@ try { Map createOrderAdjustmentBillingResult = dispatcher.runSync("createOrderAdjustmentBilling", createOrderAdjustmentBillingContext); - } catch ( GenericServiceException e ) { + } catch (GenericServiceException e) { ServiceUtil.returnError(UtilProperties.getMessage(resource,"AccountingErrorCreatingOrderAdjustmentBillingFromOrder",locale), null, null, createOrderAdjustmentBillingContext); } @@ -2339,7 +2339,7 @@ private static void createInvoiceTerms(GenericDelegator delegator, LocalDispatcher dispatcher, String invoiceId, List terms, GenericValue userLogin, Locale locale) { List invoiceTerms = new LinkedList(); if ((terms != null) && (terms.size() > 0)) { - for (Iterator termsIter = terms.iterator(); termsIter.hasNext(); ) { + for (Iterator termsIter = terms.iterator(); termsIter.hasNext();) { GenericValue term = (GenericValue) termsIter.next(); Map createInvoiceTermContext = FastMap.newInstance(); @@ -2358,7 +2358,7 @@ Map createInvoiceTermResult = null; try { createInvoiceTermResult = dispatcher.runSync("createInvoiceTerm", createInvoiceTermContext); - } catch ( GenericServiceException e ) { + } catch (GenericServiceException e) { String errMsg = UtilProperties.getMessage(resource,"AccountingServiceErrorCreatingInvoiceTermFromOrder",locale) + ": " + e.toString(); Debug.logError(e, errMsg, module); ServiceUtil.returnError(errMsg); @@ -3122,7 +3122,7 @@ List invoicedAdjustments = null; try { invoicedAdjustments = delegator.findByAnd("OrderAdjustmentBilling", UtilMisc.toMap("orderAdjustmentId", orderAdjustment.getString("orderAdjustmentId"))); - } catch ( GenericEntityException e ) { + } catch (GenericEntityException e) { String errMsg = UtilProperties.getMessage(resource, "AccountingTroubleCallingCalculateInvoicedAdjustmentTotalService" + ": " + e.getMessage(), locale); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); @@ -3171,7 +3171,7 @@ // 1 record exists just update and if diffrent ID delete other record and add together. GenericValue checkAppl = (GenericValue) checkAppls.get(0); // if new record add to the already existing one. - if ( paymentApplication.get("paymentApplicationId") == null) { + if (paymentApplication.get("paymentApplicationId") == null) { // add 2 amounts together checkAppl.set("amountApplied", paymentApplication.getBigDecimal("amountApplied"). add(checkAppl.getBigDecimal("amountApplied")).setScale(decimals,rounding)); Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java Mon Aug 17 08:20:38 2009 @@ -98,7 +98,7 @@ public static List getTaxableInvoiceItemTypeIds(GenericDelegator delegator) throws GenericEntityException { List typeIds = FastList.newInstance(); List invoiceItemTaxTypes = delegator.findByAndCache("Enumeration", UtilMisc.toMap("enumTypeId", "TAXABLE_INV_ITM_TY")); - for (Iterator iter = invoiceItemTaxTypes.iterator(); iter.hasNext(); ) { + for (Iterator iter = invoiceItemTaxTypes.iterator(); iter.hasNext();) { GenericValue invoiceItemTaxType = (GenericValue) iter.next(); typeIds.add(invoiceItemTaxType.get("enumId")); } @@ -114,10 +114,10 @@ List invoiceTaxItems = null; try { GenericDelegator delegator = invoice.getDelegator(); - EntityConditionList condition = EntityCondition.makeCondition( UtilMisc.toList( + EntityConditionList condition = EntityCondition.makeCondition(UtilMisc.toList( EntityCondition.makeCondition("invoiceId", invoice.get("invoiceId")), EntityCondition.makeCondition("invoiceItemTypeId", EntityOperator.IN, getTaxableInvoiceItemTypeIds(delegator)) - ), EntityOperator.AND); + ), EntityOperator.AND); invoiceTaxItems = delegator.findList("InvoiceItem", condition, null, null, null, false); } catch (GenericEntityException e) { Debug.logError(e, "Trouble getting InvoiceItem list", module); @@ -172,9 +172,9 @@ if (quantity == null) quantity = BigDecimal.ONE; if ("ITM_SALES_TAX".equals(invoiceItem.get("invoiceItemTypeId"))) { - invoiceTaxTotal = invoiceTaxTotal.add( amount.multiply(quantity)).setScale(taxDecimals, taxRounding); + invoiceTaxTotal = invoiceTaxTotal.add(amount.multiply(quantity)).setScale(taxDecimals, taxRounding); } else { - invoiceTotal = invoiceTotal.add( amount.multiply(quantity)).setScale(decimals,rounding); + invoiceTotal = invoiceTotal.add(amount.multiply(quantity)).setScale(decimals,rounding); } } } Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java Mon Aug 17 08:20:38 2009 @@ -152,10 +152,10 @@ EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, "EXT_BILLACT"), EntityCondition.makeCondition("statusId", EntityOperator.NOT_IN, UtilMisc.toList("ORDER_CANCELLED", "ORDER_REJECTED")), EntityCondition.makeCondition("preferenceStatusId", EntityOperator.NOT_IN, UtilMisc.toList("PAYMENT_SETTLED", "PAYMENT_RECEIVED", "PAYMENT_DECLINED", "PAYMENT_CANCELLED")) // PAYMENT_NOT_AUTH - ), EntityOperator.AND); + ), EntityOperator.AND); List orderPaymentPreferenceSums = delegator.findList("OrderPurchasePaymentSummary", whereConditions, UtilMisc.toSet("maxAmount"), null, null, false); - for (Iterator oppsi = orderPaymentPreferenceSums.iterator(); oppsi.hasNext(); ) { + for (Iterator oppsi = orderPaymentPreferenceSums.iterator(); oppsi.hasNext();) { GenericValue orderPaymentPreferenceSum = (GenericValue) oppsi.next(); BigDecimal maxAmount = orderPaymentPreferenceSum.getBigDecimal("maxAmount"); balance = maxAmount != null ? balance.subtract(maxAmount) : balance; @@ -163,7 +163,7 @@ List paymentAppls = delegator.findByAnd("PaymentApplication", UtilMisc.toMap("billingAccountId", billingAccountId)); // TODO: cancelled payments? - for (Iterator pAi = paymentAppls.iterator(); pAi.hasNext(); ) { + for (Iterator pAi = paymentAppls.iterator(); pAi.hasNext();) { GenericValue paymentAppl = (GenericValue) pAi.next(); if (paymentAppl.getString("invoiceId") == null) { BigDecimal amountApplied = paymentAppl.getBigDecimal("amountApplied"); @@ -254,7 +254,7 @@ // search through all PaymentApplications and add the amount that was applied to invoice and subtract the amount applied from payments List paymentAppls = delegator.findByAnd("PaymentApplication", UtilMisc.toMap("billingAccountId", billingAccountId)); - for (Iterator pAi = paymentAppls.iterator(); pAi.hasNext(); ) { + for (Iterator pAi = paymentAppls.iterator(); pAi.hasNext();) { GenericValue paymentAppl = (GenericValue) pAi.next(); BigDecimal amountApplied = paymentAppl.getBigDecimal("amountApplied"); GenericValue invoice = paymentAppl.getRelatedOne("Invoice"); Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Mon Aug 17 08:20:38 2009 @@ -693,7 +693,7 @@ else { orderId = (String) context.get("orderId"); } - } catch ( GenericEntityException e ) { + } catch (GenericEntityException e) { String errMsg = "Problem getting OrderPaymentPreference for orderPaymentPreferenceId " + orderPaymentPreferenceId; Debug.logWarning(e, errMsg, module); return ServiceUtil.returnError(errMsg); @@ -738,7 +738,7 @@ Map<String, Object> releaseResult = null; try { releaseResult = dispatcher.runSync("releaseOrderPaymentPreference", releaseContext); - } catch ( GenericServiceException e ) { + } catch (GenericServiceException e) { String errMsg = "Problem calling releaseOrderPaymentPreference service for orderPaymentPreferenceId" + paymentPref.getString("orderPaymentPreferenceId"); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); @@ -853,7 +853,7 @@ GenericValue paymentPref = null; try { paymentPref = delegator.findByPrimaryKey("OrderPaymentPreference", UtilMisc.toMap("orderPaymentPreferenceId", orderPaymentPreferenceId)); - } catch ( GenericEntityException e ) { + } catch (GenericEntityException e) { String errMsg = "Problem getting OrderPaymentPreference for orderPaymentPreferenceId " + orderPaymentPreferenceId; Debug.logWarning(e, errMsg, module); return ServiceUtil.returnError(errMsg); @@ -869,7 +869,7 @@ String orderId = paymentPref.getString("orderId"); try { orderHeader = delegator.findByPrimaryKey("OrderHeader", UtilMisc.toMap("orderId", orderId)); - } catch ( GenericEntityException e ) { + } catch (GenericEntityException e) { String errMsg = "Problem getting OrderHeader for orderId " + orderId; Debug.logWarning(e, errMsg, module); return ServiceUtil.returnError(errMsg); @@ -2205,7 +2205,7 @@ } catch (GenericEntityException e) { String message = "Failed to process capture result: Could not find invoice ["+invoiceId+"] due to entity error: " + e.getMessage(); Debug.logError(e, message, module); - return ServiceUtil.returnError(message ); + return ServiceUtil.returnError(message); } } @@ -2985,7 +2985,7 @@ GenericValue paymentPref = null; try { paymentPref = delegator.findOne("OrderPaymentPreference", UtilMisc.toMap("orderPaymentPreferenceId", orderPaymentPreferenceId), false); - } catch ( GenericEntityException e ) { + } catch (GenericEntityException e) { String errMsg = "Problem getting OrderPaymentPreference for orderPaymentPreferenceId " + orderPaymentPreferenceId; Debug.logWarning(e, errMsg, module); return ServiceUtil.returnError(errMsg); @@ -3001,7 +3001,7 @@ String orderId = paymentPref.getString("orderId"); try { orderHeader = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId", orderId), false); - } catch ( GenericEntityException e ) { + } catch (GenericEntityException e) { String errMsg = "Problem getting OrderHeader for orderId " + orderId; Debug.logWarning(e, errMsg, module); return ServiceUtil.returnError(errMsg); Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java Mon Aug 17 08:20:38 2009 @@ -307,7 +307,7 @@ List cond = UtilMisc.toList( EntityCondition.makeCondition("paymentId", EntityOperator.EQUALS, payment.getString("paymentId")), EntityCondition.makeCondition("toPaymentId", EntityOperator.EQUALS, payment.getString("paymentId")) - ); + ); EntityCondition partyCond = EntityCondition.makeCondition(cond, EntityOperator.OR); paymentApplications = payment.getDelegator().findList("PaymentApplication", partyCond, null, UtilMisc.toList("invoiceId", "billingAccountId"), null, false); if (UtilValidate.isNotEmpty(paymentApplications)) { Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java Mon Aug 17 08:20:38 2009 @@ -156,7 +156,7 @@ Set taxAuthoritySet = FastSet.newInstance(); GenericValue productStore = null; // Check value productStore *** New - if (productStoreId!=null){ + if (productStoreId!=null) { try { getTaxAuthorities(delegator, shippingAddress, taxAuthoritySet); if (productStoreId != null) { @@ -175,9 +175,9 @@ } else { - try{ + try { getTaxAuthorities(delegator, shippingAddress, taxAuthoritySet); - }catch (GenericEntityException e){ + } catch (GenericEntityException e) { String errMsg = "Data error getting tax settings: " + e.toString(); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java Mon Aug 17 08:20:38 2009 @@ -106,7 +106,7 @@ "billingAddress", billingAddress, "shippingAddress", shippingAddress, "orderId", orderId - ); + ); serviceInput.put("processAmount", new BigDecimal("200.00")); // run the service (make sure in payment @@ -140,7 +140,7 @@ "billToEmail", emailAddr, "creditCard", creditCard, "creditAmount", new BigDecimal("200.00") - ); + ); // run the service Map result = dispatcher.runSync("clearCommerceCCCredit",serviceMap); @@ -172,7 +172,7 @@ "billToEmail", emailAddr, "creditCard", creditCard, "pbOrder", pbOrder // if supplied, the crediting is for a subscription and credit by period is managed by ClearCommerce - ); + ); serviceMap.put("creditAmount", new BigDecimal("200.00")); // run the service @@ -222,7 +222,7 @@ Map serviceMap = UtilMisc.toMap( "orderId", "4488668f-2db0-3002-002b-0003ba1d84d5", "paymentConfig", configFile - ); + ); // run the service Map result = dispatcher.runSync("clearCommerceCCReport",serviceMap); Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Mon Aug 17 08:20:38 2009 @@ -138,7 +138,7 @@ || UtilValidate.isEmpty(notifyUrl) || UtilValidate.isEmpty(returnUrl) || UtilValidate.isEmpty(imageUrl) - || UtilValidate.isEmpty(payPalAccount) ) { + || UtilValidate.isEmpty(payPalAccount)) { Debug.logError("Payment properties is not configured properly, some notify URL from PayPal is not correctly defined!", module); request.setAttribute("_ERROR_MESSAGE_", UtilProperties.getMessage(resourceErr, "payPalEvents.problemsGettingMerchantConfiguration", locale)); return "error"; Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java Mon Aug 17 08:20:38 2009 @@ -443,7 +443,7 @@ EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("infoString"), EntityComparisonOperator.EQUALS, EntityFunction.UPPER(emailAddress)), EntityUtil.getFilterByDateExpr() - )); + )); try { GenericValue matchingEmail = EntityUtil.getFirst(delegator.findList("PartyAndContactMech", cond, null, UtilMisc.toList("fromDate"), null, false)); if (matchingEmail != null) { @@ -527,7 +527,7 @@ EntityCondition.makeCondition(UtilMisc.toMap("attnName", null, "directions", null, "postalCodeExt", null,"postalCodeGeoId", null)), EntityUtil.getFilterByDateExpr(), EntityCondition.makeCondition("partyId", partyId) - )); + )); try { GenericValue postalMatch = EntityUtil.getFirst(delegator.findList("PartyAndPostalAddress", cond, null, UtilMisc.toList("fromDate"), null, false)); if (postalMatch != null) { @@ -535,7 +535,7 @@ EntityCondition purposeCond = EntityCondition.makeCondition(UtilMisc.toList( EntityCondition.makeCondition(UtilMisc.toMap("partyId", partyId, "contactMechId", postalContactId)), EntityUtil.getFilterByDateExpr() - )); + )); List<GenericValue> postalPurposes = delegator.findList("PartyContactMechPurpose", purposeCond, null, null, null, false); List<Object> purposeStrings = EntityUtil.getFieldListFromEntityList(postalPurposes, "contactMechPurposeTypeId", false); if (UtilValidate.isNotEmpty(purposeStrings) && purposeStrings.contains("SHIPPING_LOCATION")) { @@ -593,7 +593,7 @@ try { EntityCondition cond = EntityCondition.makeCondition( UtilMisc.toMap("productStoreId", cart.getProductStoreId(), "partyId", shipMethodSplit[0], "roleTypeId", "CARRIER", "description", shippingMethodTypeDesc) - ); + ); GenericValue shipmentMethod = EntityUtil.getFirst(delegator.findList("ProductStoreShipmentMethView", cond, null, null, null, false)); cart.setShipmentMethodTypeId(shipmentMethod.getString("shipmentMethodTypeId")); } catch (GenericEntityException e1) { Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java Mon Aug 17 08:20:38 2009 @@ -66,7 +66,7 @@ Map paramMap = UtilHttp.getParameterMap(request); //if (Debug.infoOn()) Debug.logInfo("in updateStaticValues, paramMap:" + paramMap , module); String parentPlaceholderId = (String)paramMap.get("ph"); - if ( UtilValidate.isEmpty(parentPlaceholderId)) { + if (UtilValidate.isEmpty(parentPlaceholderId)) { request.setAttribute("_ERROR_MESSAGE_", "ParentPlaceholder is empty."); return "error"; } @@ -131,7 +131,7 @@ Map results = dispatcher.runSync("updateContentAssoc", serviceIn); } } - } else if ( UtilValidate.isNotEmpty(pubValue)) { + } else if (UtilValidate.isNotEmpty(pubValue)) { if (pubValue.equalsIgnoreCase("Y")) { serviceIn.put("thruDate", UtilDateTime.nowTimestamp()); Timestamp fromDate = (Timestamp)map.get(pubContentId + "FromDate"); @@ -190,7 +190,7 @@ //if (Debug.infoOn()) Debug.logInfo("in updatePublishLinks, roles:" + roles +" roleTypeList:" + roleTypeList , module); String permittedAction = (String)paramMap.get("permittedAction"); // The content to be linked to one or more sites String permittedOperations = (String)paramMap.get("permittedOperations"); // The content to be linked to one or more sites - if ( UtilValidate.isEmpty(targContentId)) { + if (UtilValidate.isEmpty(targContentId)) { request.setAttribute("_ERROR_MESSAGE_", "targContentId is empty."); return "error"; } @@ -200,7 +200,7 @@ try { // TODO: this needs to be given author userLogin GenericValue authorUserLogin = delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId", authorId)); - origPublishedLinkList = ContentManagementWorker.getPublishedLinks(delegator, targContentId, webSiteId, userLogin, security, permittedAction, permittedOperations, roles ); + origPublishedLinkList = ContentManagementWorker.getPublishedLinks(delegator, targContentId, webSiteId, userLogin, security, permittedAction, permittedOperations, roles); } catch (GenericEntityException e) { request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); return "error"; @@ -321,7 +321,7 @@ } } } - } else if ( UtilValidate.isNotEmpty(origSubContentId)) { + } else if (UtilValidate.isNotEmpty(origSubContentId)) { // if no current link is passed in, look to see if there is an existing link(s) that must be disabled List oldActiveValues = delegator.findByAnd("ContentAssoc", UtilMisc.toMap("contentId", targContentId, "contentIdTo", origSubContentId, "contentAssocTypeId", "PUBLISH_LINK", "thruDate", null)); Iterator iterOldActive = oldActiveValues.iterator(); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java Mon Aug 17 08:20:38 2009 @@ -93,7 +93,7 @@ GenericValue view = null; try { - view = ContentWorker.getSubContentCache( delegator, contentId, mapKey, subContentId, userLogin, assocTypes, fromDate, Boolean.FALSE, null); + view = ContentWorker.getSubContentCache(delegator, contentId, mapKey, subContentId, userLogin, assocTypes, fromDate, Boolean.FALSE, null); content = ContentWorker.getContentFromView(view); } catch (GenericEntityException e) { return ServiceUtil.returnError(e.toString()); @@ -117,7 +117,7 @@ GenericValue view = null; try { - view = ContentWorker.getContentCache( delegator, contentId); + view = ContentWorker.getContentCache(delegator, contentId); } catch (GenericEntityException e) { return ServiceUtil.returnError(e.toString()); } @@ -189,7 +189,7 @@ List tmpPurposes = StringUtil.split(contentPurposeString, "|"); contentPurposeList.addAll(tmpPurposes); } - if (contentPurposeList != null ) { + if (contentPurposeList != null) { context.put("contentPurposeList", contentPurposeList); context.put("contentPurposeString", null); } @@ -260,7 +260,7 @@ boolean dataResourceExists = true; if (Debug.infoOn()) Debug.logInfo("in persist... dataResourceTypeId(0):" + dataResourceTypeId, null); - if (UtilValidate.isNotEmpty(dataResourceTypeId) ) { + if (UtilValidate.isNotEmpty(dataResourceTypeId)) { Map dataResourceResult = FastMap.newInstance(); try { dataResourceResult = persistDataResourceAndDataMethod(dctx, context); @@ -290,7 +290,7 @@ context.put("skipPermissionCheck", null); // Force check here boolean contentExists = true; if (Debug.infoOn()) Debug.logInfo("in persist... contentTypeId:" + contentTypeId + " dataResourceTypeId:" + dataResourceTypeId + " contentId:" + contentId + " dataResourceId:" + dataResourceId, null); - if (UtilValidate.isNotEmpty(contentTypeId) ) { + if (UtilValidate.isNotEmpty(contentTypeId)) { if (UtilValidate.isEmpty(contentId)) { contentExists = false; } else { @@ -350,7 +350,7 @@ String contentPurposeTypeId = (String)iter.next(); GenericValue contentPurpose = delegator.makeValue("ContentPurpose", UtilMisc.toMap("contentId", contentId, - "contentPurposeTypeId", contentPurposeTypeId) ); + "contentPurposeTypeId", contentPurposeTypeId)); contentPurpose.create(); } } @@ -370,7 +370,7 @@ Map r = ContentServices.updateContentMethod(dctx, map); boolean isError = ModelService.RESPOND_ERROR.equals(r.get(ModelService.RESPONSE_MESSAGE)); if (isError) - return ServiceUtil.returnError( (String)r.get(ModelService.ERROR_MESSAGE)); + return ServiceUtil.returnError((String)r.get(ModelService.ERROR_MESSAGE)); } } @@ -474,7 +474,7 @@ try { siteRoles = delegator.findByAndCache("RoleType", UtilMisc.toMap("parentTypeId", "BLOG")); } catch (GenericEntityException e) { - return ServiceUtil.returnError( e.toString()); + return ServiceUtil.returnError(e.toString()); } Iterator siteRoleIter = siteRoles.iterator(); @@ -498,7 +498,7 @@ if (siteRoleVal != null && siteRoleVal.equalsIgnoreCase("Y")) { // for now, will assume that any error is due to duplicates - ignore //return ServiceUtil.returnError(e.toString()); - if (fromDate == null ) { + if (fromDate == null) { try { Map newContext = FastMap.newInstance(); newContext.put("contentId", serviceContext.get("contentId")); @@ -515,14 +515,14 @@ //addRoleToUser(delegator, dispatcher, serviceContext); } catch (GenericServiceException e) { Debug.logError(e, e.toString(), module); - return ServiceUtil.returnError( e.toString()); + return ServiceUtil.returnError(e.toString()); } catch (Exception e2) { Debug.logError(e2, e2.toString(), module); - return ServiceUtil.returnError( e2.toString()); + return ServiceUtil.returnError(e2.toString()); } } } else { - if (fromDate != null ) { + if (fromDate != null) { // for now, will assume that any error is due to non-existence - ignore //return ServiceUtil.returnError(e.toString()); try { @@ -541,10 +541,10 @@ return ServiceUtil.returnError(errMsg); } catch (GenericServiceException e) { Debug.logError(e, e.toString(), module); - return ServiceUtil.returnError( e.toString()); + return ServiceUtil.returnError(e.toString()); } catch (Exception e2) { Debug.logError(e2, e2.toString(), module); - return ServiceUtil.returnError( e2.toString()); + return ServiceUtil.returnError(e2.toString()); } } } @@ -649,7 +649,7 @@ dataResource = (GenericValue)thisResult.get("dataResource"); Map fileContext = FastMap.newInstance(); fileContext.put("userLogin", userLogin); - if ( dataResourceTypeId.indexOf("_FILE") >=0) { + if (dataResourceTypeId.indexOf("_FILE") >=0) { boolean hasData = false; if (textData != null) { fileContext.put("textData", textData); @@ -797,7 +797,7 @@ try { siteRoles = delegator.findByAndCache("RoleType", UtilMisc.toMap("parentTypeId", "BLOG")); } catch (GenericEntityException e) { - return ServiceUtil.returnError( e.toString()); + return ServiceUtil.returnError(e.toString()); } Iterator siteRoleIter = siteRoles.iterator(); while (siteRoleIter.hasNext()) { @@ -812,7 +812,7 @@ if (siteRoleVal != null && siteRoleVal.equalsIgnoreCase("Y")) { // for now, will assume that any error is due to duplicates - ignore //return ServiceUtil.returnError(e.toString()); - if (fromDate == null ) { + if (fromDate == null) { try { serviceContext.put("fromDate", UtilDateTime.nowTimestamp()); if (Debug.infoOn()) Debug.logInfo("updateSiteRoles, serviceContext(1):" + serviceContext, module); @@ -825,7 +825,7 @@ } } } else { - if (fromDate != null ) { + if (fromDate != null) { // for now, will assume that any error is due to non-existence - ignore //return ServiceUtil.returnError(e.toString()); try { @@ -910,7 +910,7 @@ if (UtilValidate.isNotEmpty(contentAssocTypeId)) typeList.add(contentAssocTypeId); if (UtilValidate.isEmpty(typeList)) typeList = UtilMisc.toList("PUBLISH_LINK", "SUB_CONTENT"); EntityCondition conditionType = EntityCondition.makeCondition("contentAssocTypeId", EntityOperator.IN, typeList); - EntityCondition conditionMain = EntityCondition.makeCondition(UtilMisc.toList( EntityCondition.makeCondition("contentIdTo", EntityOperator.EQUALS, contentIdTo), conditionType), EntityOperator.AND); + EntityCondition conditionMain = EntityCondition.makeCondition(UtilMisc.toList(EntityCondition.makeCondition("contentIdTo", EntityOperator.EQUALS, contentIdTo), conditionType), EntityOperator.AND); try { List listAll = delegator.findList("ContentAssoc", conditionMain, null, UtilMisc.toList("sequenceNum", "fromDate", "createdDate"), null, false); List listFiltered = EntityUtil.filterByDate(listAll); @@ -1081,7 +1081,7 @@ } EntityCondition conditionType = EntityCondition.makeCondition("contentAssocTypeId", EntityOperator.IN, typeList); - EntityCondition conditionMain = EntityCondition.makeCondition(UtilMisc.toList( EntityCondition.makeCondition("contentId", EntityOperator.EQUALS, thisContentId), conditionType), EntityOperator.AND); + EntityCondition conditionMain = EntityCondition.makeCondition(UtilMisc.toList(EntityCondition.makeCondition("contentId", EntityOperator.EQUALS, thisContentId), conditionType), EntityOperator.AND); List listAll = delegator.findByConditionCache("ContentAssoc", conditionMain, null, null); List listFiltered = EntityUtil.filterByDate(listAll); Iterator iter = listFiltered.iterator(); @@ -1590,7 +1590,7 @@ GenericValue orderHeader = null; try { List orderRoleList = delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "END_USER_CUSTOMER")); - if (orderRoleList.size() > 0 ) { + if (orderRoleList.size() > 0) { GenericValue orderRole = (GenericValue)orderRoleList.get(0); String partyId = (String) orderRole.get("partyId"); context.put("partyId", partyId); @@ -1667,7 +1667,7 @@ Map result = null; String contentId = content.getString("contentId"); - List contentAssocTypeIdList = (List)context.get("contentAssocTypeIdList" ); + List contentAssocTypeIdList = (List)context.get("contentAssocTypeIdList"); Set visitedSet = (Set)context.get("visitedSet"); if (visitedSet == null) { visitedSet = FastSet.newInstance(); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java Mon Aug 17 08:20:38 2009 @@ -64,12 +64,12 @@ public static Map cachedWebSitePublishPoints = FastMap.newInstance(); public static Map cachedStaticValues = FastMap.newInstance(); - public static void mruAdd(HttpServletRequest request, GenericEntity pk, String suffix ) { + public static void mruAdd(HttpServletRequest request, GenericEntity pk, String suffix) { HttpSession session = request.getSession(); mruAdd(session, pk); } - public static void mruAdd(HttpServletRequest request, GenericEntity pk ) { + public static void mruAdd(HttpServletRequest request, GenericEntity pk) { HttpSession session = request.getSession(); mruAdd(session, pk); } @@ -85,7 +85,7 @@ } String entityName = pk.getEntityName(); - mruAddByEntityName( entityName, pk, lookupCaches); + mruAddByEntityName(entityName, pk, lookupCaches); } /** @@ -129,7 +129,7 @@ * @param pk either a populated GenericValue or GenericPK. * @param suffix a string that can be used to distinguish the signature (probably not used). */ - public static String buildPKSig( GenericEntity pk, String suffix ) { + public static String buildPKSig(GenericEntity pk, String suffix) { String sig = ""; Collection keyColl = pk.getPrimaryKey().getAllKeys(); @@ -229,7 +229,7 @@ GenericPK cachedPK = null; if (UtilValidate.isNotEmpty(entityName)) cachedPK = (GenericPK)currentEntityMap.get(entityName); - getCurrentValueWithCachedPK( request, delegator, cachedPK, entityName); + getCurrentValueWithCachedPK(request, delegator, cachedPK, entityName); GenericPK currentPK = (GenericPK)request.getAttribute("currentPK"); currentEntityMap.put(entityName, currentPK); } @@ -258,7 +258,7 @@ // whether or not a field is populated. boolean useCached = false; boolean usePassed = true; - if (cachedPK != null ) { + if (cachedPK != null) { useCached = true; keyColl = cachedPK.getPrimaryKey().getAllKeys(); keyIt = keyColl.iterator(); @@ -383,9 +383,9 @@ return allPublishPoints; } - public static Map getPublishPointMap(GenericDelegator delegator, String pubPtId ) throws GeneralException { + public static Map getPublishPointMap(GenericDelegator delegator, String pubPtId) throws GeneralException { - List publishPointList = getAllPublishPoints( delegator, pubPtId ); + List publishPointList = getAllPublishPoints(delegator, pubPtId); Map publishPointMap = FastMap.newInstance(); Iterator it = publishPointList.iterator(); while (it.hasNext()) { @@ -397,9 +397,9 @@ } - public static void getAllPublishPointMap(GenericDelegator delegator, String pubPtId, Map publishPointMap ) throws GeneralException { + public static void getAllPublishPointMap(GenericDelegator delegator, String pubPtId, Map publishPointMap) throws GeneralException { - List publishPointList = getAllPublishPoints( delegator, pubPtId ); + List publishPointList = getAllPublishPoints(delegator, pubPtId); Iterator it = publishPointList.iterator(); while (it.hasNext()) { GenericValue webSitePublishPoint = (GenericValue)it.next(); @@ -409,7 +409,7 @@ } } - public static Map getPublishPointMap(GenericDelegator delegator, List publishPointList ) { + public static Map getPublishPointMap(GenericDelegator delegator, List publishPointList) { Map publishPointMap = FastMap.newInstance(); Iterator it = publishPointList.iterator(); @@ -558,9 +558,9 @@ // Set up one map with all the top-level publish points (to which only one sub point can be attached to) // and another map (publishPointMapAll) that points to one of the top-level points. - List allPublishPointList = getAllPublishPoints( delegator, rootPubId ); + List allPublishPointList = getAllPublishPoints(delegator, rootPubId); //if (Debug.infoOn()) Debug.logInfo("in getPublishLinks, allPublishPointList:" + allPublishPointList, module); - List publishPointList = getPermittedPublishPoints( delegator, allPublishPointList, userLogin, security , permittedAction, permittedOperations, passedRoles ); + List publishPointList = getPermittedPublishPoints(delegator, allPublishPointList, userLogin, security , permittedAction, permittedOperations, passedRoles); Map publishPointMap = FastMap.newInstance(); Map publishPointMapAll = FastMap.newInstance(); Iterator it = publishPointList.iterator(); @@ -576,7 +576,7 @@ Object [] subArr = {contentId, subPointList, description, nullObj}; publishPointMap.put(contentId, subArr); publishPointMapAll.put(contentId, contentId); - List subPublishPointList = getAllPublishPoints( delegator, contentId ); + List subPublishPointList = getAllPublishPoints(delegator, contentId); Iterator it2 = subPublishPointList.iterator(); while (it2.hasNext()) { //String [] arr2 = (String [])it2.next(); @@ -742,9 +742,9 @@ throw new RuntimeException("No entity found for id=" + contentId); EntityCondition conditionMain = null; - if (typeList.size() > 0 ) { + if (typeList.size() > 0) { EntityCondition conditionType = EntityCondition.makeCondition("contentAssocTypeId", EntityOperator.IN, typeList); - conditionMain = EntityCondition.makeCondition(UtilMisc.toList( EntityCondition.makeCondition("contentIdTo", EntityOperator.EQUALS, contentId), conditionType), EntityOperator.AND); + conditionMain = EntityCondition.makeCondition(UtilMisc.toList(EntityCondition.makeCondition("contentIdTo", EntityOperator.EQUALS, contentId), conditionType), EntityOperator.AND); } else { conditionMain = EntityCondition.makeCondition("contentIdTo", EntityOperator.EQUALS, contentId); } @@ -773,7 +773,7 @@ throw new RuntimeException("No entity found for id=" + contentId); EntityCondition conditionType = EntityCondition.makeCondition("contentAssocTypeId", EntityOperator.IN, typeList); - EntityCondition conditionMain = EntityCondition.makeCondition(UtilMisc.toList( EntityCondition.makeCondition("contentId", EntityOperator.EQUALS, contentId), conditionType), EntityOperator.AND); + EntityCondition conditionMain = EntityCondition.makeCondition(UtilMisc.toList(EntityCondition.makeCondition("contentId", EntityOperator.EQUALS, contentId), conditionType), EntityOperator.AND); List listAll = delegator.findList("ContentAssoc", conditionMain, null, null, null, true); List listFiltered = EntityUtil.filterByDate(listAll); Iterator iter = listFiltered.iterator(); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java Mon Aug 17 08:20:38 2009 @@ -74,7 +74,7 @@ BufferedReader input = null; try { if (!UtilValidate.isEmpty(file)) { - input = new BufferedReader( new FileReader(file)); + input = new BufferedReader(new FileReader(file)); String line = null; int size=0; if (file != null) { @@ -115,7 +115,7 @@ contentAssoc.put("userLogin", userLogin); dispatcher.runSync("createContentAssoc", contentAssoc); int recordCount = 0; - while (( line = input.readLine()) != null) {//start line + while ((line = input.readLine()) != null) {//start line boolean hasFolder=true; String rootContent=null, @@ -173,7 +173,7 @@ contentAssocSize=contentAssocs.size(); } - if ( contentAssocSize == 0 && contentNameMatch==false) {//New Root Content + if (contentAssocSize == 0 && contentNameMatch==false) {//New Root Content Entity = null; contentId = delegator.getNextSeqId("Content"); Entity = delegator.makeValue("Content"); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java Mon Aug 17 08:20:38 2009 @@ -193,12 +193,12 @@ results.put("permissionStatus", "granted"); permissionStatus = "granted"; if (displayPassCond) { - errBuf.append("\n hasEntityPermission(" + entityAction + "): PASSED" ); + errBuf.append("\n hasEntityPermission(" + entityAction + "): PASSED"); } } else { if (displayFailCond) { - errBuf.append("\n hasEntityPermission(" + entityAction + "): FAILED" ); + errBuf.append("\n hasEntityPermission(" + entityAction + "): FAILED"); } if (content != null) @@ -219,7 +219,7 @@ ServiceUtil.returnError(e.getMessage()); } permissionStatus = (String)results.get("permissionStatus"); - errBuf.append("\n permissionStatus:" ); + errBuf.append("\n permissionStatus:"); errBuf.append(permissionStatus); } @@ -228,24 +228,24 @@ // Don't show this if passed on 'hasEntityPermission' if (displayFailCond || displayPassCond) { if (!passed) { - errBuf.append("\n targetOperations:" ); + errBuf.append("\n targetOperations:"); errBuf.append(targetOperations); String errMsg = permCondGetter.dumpAsText(); - errBuf.append("\n" ); + errBuf.append("\n"); errBuf.append(errMsg); - errBuf.append("\n partyId:" ); + errBuf.append("\n partyId:"); errBuf.append(partyId); - errBuf.append("\n entityIds:" ); + errBuf.append("\n entityIds:"); errBuf.append(entityIds); if (auxGetter != null) { - errBuf.append("\n auxList:" ); + errBuf.append("\n auxList:"); errBuf.append(auxGetter.getList()); } if (roleGetter != null) { - errBuf.append("\n roleList:" ); + errBuf.append("\n roleList:"); errBuf.append(roleGetter.getList()); } } @@ -275,8 +275,8 @@ GenericValue contentTo = null; GenericValue contentFrom = null; try { - contentTo = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", contentIdTo) ); - contentFrom = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", contentIdFrom) ); + contentTo = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", contentIdTo)); + contentFrom = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", contentIdFrom)); } catch (GenericEntityException e) { return ServiceUtil.returnError("Error in retrieving content To or From. " + e.getMessage()); } @@ -310,7 +310,7 @@ Debug.logError(e, "Problem checking permissions", "ContentServices"); } permissionStatus = (String)permResults.get("permissionStatus"); - if (permissionStatus == null || !permissionStatus.equals("granted") ) { + if (permissionStatus == null || !permissionStatus.equals("granted")) { if (bDisplayFailCond != null && bDisplayFailCond.booleanValue()) { String errMsg = (String)permResults.get(ModelService.ERROR_MESSAGE); results.put(ModelService.ERROR_MESSAGE, errMsg); @@ -326,7 +326,7 @@ Debug.logError(e, "Problem checking permissions", "ContentServices"); } permissionStatus = (String)permResults.get("permissionStatus"); - if (permissionStatus != null && permissionStatus.equals("granted") ) { + if (permissionStatus != null && permissionStatus.equals("granted")) { results.put("permissionStatus", "granted"); } else { if (bDisplayFailCond != null && bDisplayFailCond.booleanValue()) { Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java?rev=804895&r1=804894&r2=804895&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java Mon Aug 17 08:20:38 2009 @@ -139,8 +139,8 @@ try { Map thisResults = dispatcher.runSync("traverseContent", traversMap); String errorMsg = ServiceUtil.getErrorMessage(thisResults); - if (UtilValidate.isNotEmpty(errorMsg) ) { - Debug.logError( "Problem in traverseContent. " + errorMsg, module); + if (UtilValidate.isNotEmpty(errorMsg)) { + Debug.logError("Problem in traverseContent. " + errorMsg, module); return ServiceUtil.returnError(errorMsg); } Map nodeMap = (Map)thisResults.get("nodeMap"); @@ -996,8 +996,8 @@ if (!isPublished) { //Map thisResults = dispatcher.runSync("deactivateAssocs", mapIn); //String errorMsg = ServiceUtil.getErrorMessage(thisResults); - //if (UtilValidate.isNotEmpty(errorMsg) ) { - //Debug.logError( "Problem running deactivateAssocs. " + errorMsg, "ContentServices"); + //if (UtilValidate.isNotEmpty(errorMsg)) { + //Debug.logError("Problem running deactivateAssocs. " + errorMsg, "ContentServices"); //return ServiceUtil.returnError(errorMsg); //} content.put("privilegeEnumId", privilegeEnumId); @@ -1113,7 +1113,7 @@ Map.Entry entry = (Map.Entry)iter.next(); String key = (String)entry.getKey(); Object value = entry.getValue(); - if (value instanceof String ) { + if (value instanceof String) { if (UtilValidate.isNotEmpty((String)value)) { mapFiltered.put(key, value); } @@ -1122,7 +1122,7 @@ } } String outputString = UtilHttp.urlEncodeArgs(mapFiltered); - result.put("outputString", outputString ); + result.put("outputString", outputString); } return result; } 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=804895&r1=804894&r2=804895&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 Mon Aug 17 08:20:38 2009 @@ -477,7 +477,7 @@ GenericValue assocValue = (GenericValue) it.next(); contentAssocTypeId = (String) assocValue.get("contentAssocTypeId"); assocContext.put("contentAssocTypeId", contentAssocTypeId); - //assocContext.put("contentTypeId", assocValue.get("contentTypeId") ); + //assocContext.put("contentTypeId", assocValue.get("contentTypeId")); assocContext.put("parentContent", content); String assocRelation = null; // This needs to be the opposite @@ -956,7 +956,7 @@ GenericValue contentTo = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", contentIdOther)); String contentTypeId = contentTo.getString("contentTypeId"); if (contentTypeId != null && contentTypeId.equals(passedContentTypeId)) - contentAncestorList.add(contentIdOther ); + contentAncestorList.add(contentIdOther); } } } @@ -1172,13 +1172,13 @@ if (UtilValidate.isNotEmpty(subContentId)) { ctx.put("subContentId", subContentId); ctx.put("contentId", null); - if (viewContentId != null && viewContentId.equals(subContentId) ) { + if (viewContentId != null && viewContentId.equals(subContentId)) { return currentContent; } } else { ctx.put("contentId", contentId); ctx.put("subContentId", null); - if (viewContentId != null && viewContentId.equals(contentId) ) { + if (viewContentId != null && viewContentId.equals(contentId)) { return currentContent; } } @@ -1311,7 +1311,7 @@ List targetOperationList = (List)context.get("targetOperationList"); String targetOperationString = (String)context.get("targetOperationString"); if (Debug.infoOn()) Debug.logInfo("in prepTargetOperationList, targetOperationString(0):" + targetOperationString, ""); - if (UtilValidate.isNotEmpty(targetOperationString) ) { + if (UtilValidate.isNotEmpty(targetOperationString)) { List opsFromString = StringUtil.split(targetOperationString, "|"); if (UtilValidate.isEmpty(targetOperationList)) { targetOperationList = FastList.newInstance(); @@ -1339,7 +1339,7 @@ List contentPurposeList = (List)context.get("contentPurposeList"); String contentPurposeString = (String)context.get("contentPurposeString"); if (Debug.infoOn()) Debug.logInfo("in prepContentPurposeList, contentPurposeString(0):" + contentPurposeString, ""); - if (UtilValidate.isNotEmpty(contentPurposeString) ) { + if (UtilValidate.isNotEmpty(contentPurposeString)) { List purposesFromString = StringUtil.split(contentPurposeString, "|"); if (UtilValidate.isEmpty(contentPurposeList)) { contentPurposeList = FastList.newInstance(); @@ -1408,7 +1408,7 @@ List filteredList = getContentAssocViewList(delegator, contentIdTo, contentId, contentAssocTypeId, statusId, privilegeEnumId); GenericValue val = null; - if (filteredList.size() > 0 ) { + if (filteredList.size() > 0) { val = (GenericValue)filteredList.get(0); } return val; 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=804895&r1=804894&r2=804895&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 Mon Aug 17 08:20:38 2009 @@ -261,7 +261,7 @@ //public static final String [] opFields = { "contentPurposeTypeId", "contentOperationId", "roleTypeId", "statusId", "privilegeEnumId"}; - public String renderResultRowHtml(Map rMap, Map currentContentResultMap ) { + public String renderResultRowHtml(Map rMap, Map currentContentResultMap) { StringBuilder sb = new StringBuilder(); // Do target row |
Free forum by Nabble | Edit this page |