Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/config/ProductErrorUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/config/ProductErrorUiLabels.xml?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/config/ProductErrorUiLabels.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/config/ProductErrorUiLabels.xml Mon Nov 3 06:54:16 2014 @@ -23,6 +23,7 @@ <value xml:lang="en">Problem reading product categories: ${errMessage}.</value> <value xml:lang="it">Problemi leggendo categorie prodotto: ${errMessage}.</value> <value xml:lang="ja">製åã«ãã´ãªã®èªã¿è¾¼ã¿ä¸ã«ã¨ã©ã¼: ${errMessage}.</value> + <value xml:lang="nl">Probleem inzake productcategoriën: ${errMessage}.</value> <value xml:lang="zh">读å产ååç±»æ¶åºéï¼${errMessage}ã</value> <value xml:lang="zh_TW">è®åç¢åå顿åºé¯:${errMessage}.</value> </property> @@ -44,6 +45,7 @@ <value xml:lang="en">Product not found in the current category.</value> <value xml:lang="it">Prodotto non trovato nell'attuale categoria.</value> <value xml:lang="ja">ç¾å¨ã®ã«ãã´ãªã«è£½åãè¦ã¤ããã¾ããã</value> + <value xml:lang="nl">Product niet gevonden</value> <value xml:lang="zh">å¨å½ååç±»ä¸æ²¡ææ¾å°äº§åã</value> <value xml:lang="zh_TW">å¨ç¶ååé¡ä¸æ²ææ¾å°ç¢å.</value> </property> @@ -113,12 +115,14 @@ <property key="ProductErrorAllOrderItemsAreNotPacked"> <value xml:lang="en">ERROR: All order items are not packed</value> <value xml:lang="ja">ã¨ã©ã¼: ãã¹ã¦ã®æ³¨æã¢ã¤ãã ãæ¢±å ããã¦ãã¾ãã</value> + <value xml:lang="nl">Orderregels zijn niet verpakt</value> <value xml:lang="zh">éè¯¯ï¼ææè®¢åæç»é½æ²¡æå è£ </value> <value xml:lang="zh_TW">é¯èª¤:ææè¨å®ç´°é 齿²æå è£</value> </property> <property key="ProductErrorAllOrderItemsAreNotVerified"> <value xml:lang="en">ERROR: All order items are not verified</value> <value xml:lang="ja">ã¨ã©ã¼: ãã¹ã¦ã®æ³¨æã¢ã¤ãã ã確èªããã¦ãã¾ãã</value> + <value xml:lang="nl">Orderregels zijn niet geverifieerd</value> <value xml:lang="zh">éè¯¯ï¼ææè®¢åæç»é½æ²¡æéªè¯</value> <value xml:lang="zh_TW">é¯èª¤:ææè¨å®ç´°é 齿²æé©è</value> </property> @@ -156,6 +160,7 @@ <property key="ProductErrorNoInventoryReservationsAvailableCannotVerifyThisItem"> <value xml:lang="en">ERROR: No inventory reservations available; cannot pick this item</value> <value xml:lang="ja">ã¨ã©ã¼: æå¹ãªå¨åº«äºç´ãããã¾ããããã®ã¢ã¤ãã ããããã³ã°ã§ãã¾ãã</value> + <value xml:lang="nl">Fout: geen voorraadreservering aanwezig: dit artikel kan niet gepickt worden</value> <value xml:lang="zh">éè¯¯ï¼æ²¡æå¯ç¨çåºåé¢çï¼æ æ³åæ£è¿ä¸ªæç»</value> <value xml:lang="zh_TW">é¯èª¤:æ²æå¯ç¨ç庫åé ç;ç¡æ³æè²¨éåç´°é </value> </property> @@ -186,6 +191,7 @@ <property key="ProductErrorPackageWeightCannotBeNullOrZero"> <value xml:lang="en">ERROR: Package weight cannot be null/zero, it should be greater than zero</value> <value xml:lang="ja">ã¨ã©ã¼: ããã±ã¼ã¸ã®ééã¯ç©º/ã¼ãã«ã§ãã¾ãããã¼ããã大ãããã¦ãã ãã</value> + <value xml:lang="nl">FOUT: Gewicht kan niet nul zijn</value> <value xml:lang="zh">é误ï¼å è£ ééä¸è½ä¸ºç©ºï¼nullï¼/0ï¼èåºè¯¥å¤§äº0</value> <value xml:lang="zh_TW">é¯èª¤:å è£ééä¸è½çºç©º(null)/0,èæè©²å¤§æ¼0</value> </property> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/config/ProductUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/config/ProductUiLabels.xml?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/config/ProductUiLabels.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/config/ProductUiLabels.xml Mon Nov 3 06:54:16 2014 @@ -94,6 +94,10 @@ <value xml:lang="zh_CN">å¸åå°ååè¿è´§å°åç¸å</value> <value xml:lang="zh_TW">帳å®ä½ååé貨ä½åç¸å</value> </property> + <property key="FacilityCat"> + <value xml:lang="en">CAT</value> + <value xml:lang="en">Cat.</value> + </property> <property key="FacilityCompanyName"> <value xml:lang="de">OFBiz: Einrichtungen Verwaltung</value> <value xml:lang="en">OFBiz: Facility Manager</value> @@ -180,13 +184,16 @@ <value xml:lang="zh">ç»åç§°</value> <value xml:lang="zh_TW">群çµå稱</value> </property> + <property key="FacilityInv"> + <value xml:lang="en">INV</value> + <value xml:lang="nl">VOOR</value> + </property> <property key="FacilityReturnHeaderTypeNotSupported"> <value xml:lang="en">${returnHeader.returnHeaderTypeId} is not supported</value> <value xml:lang="it">${returnHeader.returnHeaderTypeId} non è supportata</value> <value xml:lang="ja">${returnHeader.returnHeaderTypeId} ã¯ãµãã¼ãããã¦ãã¾ãã</value> <value xml:lang="vi">${returnHeader.returnHeaderTypeId} không ÄÆ°á»£c há» trợ</value> <value xml:lang="zh">䏿¯æ${returnHeader.returnHeaderTypeId}</value> - <value xml:lang="zh_TW">䏿¯æ´${returnHeader.returnHeaderTypeId}</value> </property> <property key="FacilityHoldShipment"> <value xml:lang="en">Hold Shipment</value> @@ -3009,7 +3016,7 @@ <value xml:lang="fr">Attendre que la commande soit complète avant de l'expédier.</value> <value xml:lang="it">Per favore aspettare fino a quando l'intero ordine è pronto per la spedizione.</value> <value xml:lang="ja">注æå ¨ä½ãæºåã§ããã¾ã§çºéãå¾ ã£ã¦ãã ããã</value> - <value xml:lang="nl">Wacht alstublieft tot de gehele bestelling compleet is voor verzenden.</value> + <value xml:lang="nl">Wacht alstublieft tot de hele order compleet is voor verzenden.</value> <value xml:lang="ro">Va rog asteptati pana cand intreaga comanda este gata pentru expediere.</value> <value xml:lang="ru">ÐожалÑйÑÑа поÑÑавлÑйÑе поÑле Ñого как бÑÐ´ÐµÑ Ð³Ð¾Ñов веÑÑ Ð·Ð°ÐºÐ°Ð·.</value> <value xml:lang="th">à¸à¸£à¸¸à¸à¸²à¸£à¸à¸à¸à¸à¸£à¸°à¸à¸±à¹à¸à¸à¹à¸²à¸à¸£à¸²à¸¢à¸à¸²à¸£à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¸à¸±à¹à¸à¸«à¸¡à¸à¸à¹à¸à¸à¸à¸²à¸£à¸à¸à¸ªà¹à¸à¸ªà¸´à¸à¸à¹à¸²</value> @@ -3557,7 +3564,7 @@ <value xml:lang="es">Resto reserva stock al crear pedido</value> <value xml:lang="fr">Expédition par un tiers : réservation de stock réévaluée suivant les dates d'exp. au plus tard</value> <value xml:lang="ja">注æä½ææã«æ®é«äºç´</value> - <value xml:lang="nl">Voorraadreserveringen compenseren nav aanmaken bestelling</value> + <value xml:lang="nl">Voorraadreserveringen compenseren nav aanmaken order</value> <value xml:lang="vi">Sá» dư dá»± trữ khi Tạo Äặt hà ng</value> <value xml:lang="zh">订åå建æ¶å¹³è¡¡é¢è®¢</value> <value xml:lang="zh_TW">建ç«è¨å®æä¿çå貨</value> @@ -6353,7 +6360,7 @@ <value xml:lang="fr">Centre de profit [Réf.]</value> <value xml:lang="it">Negozio</value> <value xml:lang="ja">製ååºèID</value> - <value xml:lang="nl">Produkt Winkel Id</value> + <value xml:lang="nl">Product Winkel Id</value> <value xml:lang="ro">Magazin</value> <value xml:lang="ru">Ðод ÑоÑг. Ñ. пÑодÑкÑа</value> <value xml:lang="th">รหัสà¸à¸¥à¸±à¸à¸ªà¸´à¸à¸à¹à¸²</value> @@ -7044,7 +7051,7 @@ <value xml:lang="fr">Choisir le type de paiement par article</value> <value xml:lang="it">Seleziona Tipo Pagamento Per Riga</value> <value xml:lang="ja">ã¢ã¤ãã ã§æ¯æç¨®é¡ã鏿</value> - <value xml:lang="nl">Toestaan betaalmethode per bestellingregel</value> + <value xml:lang="nl">Toestaan betaalmethode per orderregel</value> <value xml:lang="ro">Selectioneaza Tip Plata Pe Linie</value> <value xml:lang="ru">ÐÑбиÑаÑÑ ÑпоÑоб плаÑежа по каждой позиÑии</value> <value xml:lang="th">à¹à¸¥à¸·à¸à¸à¸§à¸´à¸à¸µà¸à¸²à¸£à¸à¸³à¸£à¸°à¹à¸à¸´à¸à¸à¹à¸à¸«à¸à¸¶à¹à¸à¸£à¸²à¸¢à¸à¸²à¸£</value> @@ -10788,7 +10795,7 @@ <value xml:lang="fr">Rechercher un ou des articles</value> <value xml:lang="it">Ricerca prodotti</value> <value xml:lang="ja">製åãæ¤ç´¢</value> - <value xml:lang="nl">Produkt zoeken</value> + <value xml:lang="nl">Product zoeken</value> <value xml:lang="ro">Cauta Produse</value> <value xml:lang="ru">ÐÑкаÑÑ Ð¿ÑодÑкÑ</value> <value xml:lang="th">à¸à¹à¸à¸«à¸²à¸ªà¸´à¸à¸à¹à¸²</value> @@ -12154,7 +12161,7 @@ <value xml:lang="hi_IN">à¤à¤¸ à¤à¥à¤à¤°à¥ मॠसामानà¥à¤¯ à¤à¤¾à¤° à¤à¤¿ वसà¥à¤¤à¥ डालियà¥</value> <value xml:lang="it">Aggiungi al carrello i prodotti di questa categoria usando la quantità di default</value> <value xml:lang="ja">ããã©ã«ãæ°éã使ç¨ãã¦è²·ãç©ããã«ãã®ã«ãã´ãªã®è£½åã追å </value> - <value xml:lang="nl">Voeg produkten in deze categorie toe aan de winkelwagen gebruikmakende van de default hoeveelheden</value> + <value xml:lang="nl">Voeg producten in deze categorie toe aan de winkelwagen gebruikmakende van de default hoeveelheden</value> <value xml:lang="pt_PT">Adicionar Produtos desta Categoria para o Cesto usando as Quantidades Pré-definidas</value> <value xml:lang="ro">Adauga produse din aceasta Categorie la Cos folosind Cantitate de Default</value> <value xml:lang="ru">ÐобавиÑÑ Ð¿ÑодÑкÑÑ ÑÑой каÑегоÑии в коÑÐ·Ð¸Ð½Ñ Ð¸ÑполÑзÑÑ Ð¾Ð±ÑÑное колиÑеÑÑво</value> @@ -12519,6 +12526,7 @@ <value xml:lang="en">Customers who bought this item also bought:</value> <value xml:lang="it">Clienti che hanno comprato questo prodotto hanno comprato anche:</value> <value xml:lang="ja">ãã®ã¢ã¤ãã ãè³¼å ¥ãã人ãä»ã«è³¼å ¥ãããã®</value> + <value xml:lang="nl">Klanten die dit product kochten hebben ook gekocht:</value> <value xml:lang="vi">Khách hà ng khi mua sản phẩm nà y thưá»ng hay quan tâm Äến:</value> <value xml:lang="zh">è´ä¹°äºæ¬ååç客æ·è¿ä¹°äºï¼</value> <value xml:lang="zh_TW">è³¼è²·äºæ¬ååç客æ¶éè²·äº:</value> @@ -13091,6 +13099,7 @@ <value xml:lang="fr">Disponible</value> <value xml:lang="it">Disponibile</value> <value xml:lang="ja">æå¹</value> + <value xml:lang="nl">Beschikbaar</value> <value xml:lang="ro">Disponibile</value> <value xml:lang="ru">ÐоÑÑÑпно</value> <value xml:lang="th">à¹à¸à¹à¸à¸£à¸°à¹à¸¢à¸à¸à¹à¹à¸à¹</value> @@ -13498,7 +13507,7 @@ <value xml:lang="hi_IN">ठनà¥à¤à¤¾à¤¨ सामान नहॠदà¥à¤à¤¾ à¤à¤¾à¤à¤à¤¾</value> <value xml:lang="it">Non è possibile recensire un prodotto sconosciuto</value> <value xml:lang="ja">æªç¥ã®è£½åã¯ã¬ãã¥ã¼ã§ãã¾ãã</value> - <value xml:lang="nl">Kan niet een onbekend produkt beoordelen</value> + <value xml:lang="nl">Kan niet een onbekend product beoordelen</value> <value xml:lang="pt_PT">ImpossÃvel rever um produto desconhecido</value> <value xml:lang="ro">Nu este posibila revederea unui produs necunoscut</value> <value xml:lang="ru">Ðевозможно пÑоÑмоÑÑеÑÑ Ð½ÐµÐ¸Ð·Ð²ÐµÑÑнÑй пÑодÑкÑ</value> @@ -15044,7 +15053,7 @@ <value xml:lang="fr">Création d'une nouvelle catégorie</value> <value xml:lang="it">Creare nuova categoria</value> <value xml:lang="ja">æ°è¦ã«ãã´ãªã使</value> - <value xml:lang="nl">Aanmaken nieuwe categorie</value> + <value xml:lang="nl">Nieuwe categorie</value> <value xml:lang="ro">Creare Noua Categorie</value> <value xml:lang="ru">ÐÐ¾Ð²Ð°Ñ ÐºÐ°ÑегоÑиÑ</value> <value xml:lang="th">สรà¹à¸²à¸à¸«à¸¡à¸§à¸à¸«à¸¡à¸¹à¹à¹à¸«à¸¡à¹</value> @@ -15409,6 +15418,7 @@ <value xml:lang="fr">Vous pourriez aussi être intéressé(e) par ceci :</value> <value xml:lang="it">Tu potresti essere interessato anche a questi:</value> <value xml:lang="ja">ãã¡ãããèå³ãããããããã¾ãã:</value> + <value xml:lang="nl">Deze produten kunnen ook interessant zijn:</value> <value xml:lang="ro">Tu poti sa fii interesat si de aceste:</value> <value xml:lang="ru">ÐÐ°Ñ Ñакже могÑÑ Ð·Ð°Ð¸Ð½ÑеÑеÑоваÑÑ:</value> <value xml:lang="th">à¸à¸¸à¸à¸à¸²à¸à¸à¸°à¸ªà¸à¹à¸à¹à¸à¸ªà¸´à¹à¸à¸à¸µà¹à¸à¸µ :</value> @@ -16351,7 +16361,7 @@ <value xml:lang="hi_IN">रà¥à¤à¤¿à¤¯à¥: सामान नहॠमिला</value> <value xml:lang="it">ERRORE: Prodotto non trovato</value> <value xml:lang="ja">ã¨ã©ã¼: 製åãè¦ã¤ããã¾ãã</value> - <value xml:lang="nl">FOUT: Produkt niet gevonden</value> + <value xml:lang="nl">FOUT: Product niet gevonden</value> <value xml:lang="pt_PT">ERRO: Produto não encontrado</value> <value xml:lang="ro">ERRORE: Produs negasit ProductIncludeSubcategories=Include sub-categorie?</value> <value xml:lang="ru">ÐШÐÐÐÐ: ÐÑодÑÐºÑ Ð½Ðµ найден</value> @@ -16789,6 +16799,7 @@ <value xml:lang="fr">Lieux de stockage</value> <value xml:lang="it">Stabilimenti</value> <value xml:lang="ja">æ ç¹</value> + <value xml:lang="nl">Faciliteiten</value> <value xml:lang="ro">Compartimente</value> <value xml:lang="ru">ÐбÑекÑÑ</value> <value xml:lang="th">à¸à¸¥à¸±à¸à¸ªà¸´à¸à¸à¹à¸²</value> @@ -18487,6 +18498,7 @@ <value xml:lang="fr">Dans l'inventaire</value> <value xml:lang="it">In Inventario</value> <value xml:lang="ja">å¨åº«ä¸</value> + <value xml:lang="nl">In voorraad</value> <value xml:lang="ro">In Inventar</value> <value xml:lang="ru">Ð ÑееÑÑÑе ТÐЦ</value> <value xml:lang="th">à¹à¸à¸ªà¸´à¸à¸à¹à¸²à¸à¸à¹à¸«à¸¥à¸·à¸</value> @@ -18501,6 +18513,7 @@ <value xml:lang="fr">En production</value> <value xml:lang="it">In Produzione</value> <value xml:lang="ja">çç£ä¸</value> + <value xml:lang="nl">In productie</value> <value xml:lang="ro">In Productie</value> <value xml:lang="ru">РпÑоизводÑÑве</value> <value xml:lang="th">à¹à¸à¸à¸²à¸£à¸à¸¥à¸´à¸</value> @@ -22163,7 +22176,7 @@ <value xml:lang="hi_IN">à¤à¤¸ à¤à¤¾à¤°à¥à¤¯à¤à¤¾à¤² मॠà¤à¤ªà¤¨à¥ à¤à¥à¤ सामान नहॠदà¥à¤à¤¾</value> <value xml:lang="it">Non hai visualizzato nessun prodotto in questa sessione</value> <value xml:lang="ja">ãã®ã»ãã·ã§ã³ã§ã¯è£½åã表示ãã¦ãã¾ãã</value> - <value xml:lang="nl">U hebt geen produkten bekeken in deze sessie</value> + <value xml:lang="nl">U hebt geen producten bekeken in deze sessie</value> <value xml:lang="pt_PT">Ainda não viu quaisquer produtos nesta sessão</value> <value xml:lang="ro">Tu nu ai vizualizat nici-un produs in aceasta sesiune</value> <value xml:lang="ru">ÐÑ Ð½Ðµ пÑоÑмоÑÑели ни одного пÑодÑкÑа в ÑÑой ÑеÑÑии</value> @@ -23739,7 +23752,7 @@ <value xml:lang="fr">Popularité par nb. de cmd.</value> <value xml:lang="it">Popolarità per ordini</value> <value xml:lang="ja">注æä¸ã®äººæ°</value> - <value xml:lang="nl">succes bij bestellingen</value> + <value xml:lang="nl">succes per orders</value> <value xml:lang="ro">Popularitate pe Comenzi</value> <value xml:lang="ru">ÐопÑлÑÑноÑÑ Ð¿Ð¾ заказам</value> <value xml:lang="th">รายà¸à¸²à¸£à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¸à¸µà¹à¹à¸à¹à¸à¸à¸µà¹à¸à¸´à¸¢à¸¡</value> @@ -24521,7 +24534,7 @@ <value xml:lang="hi_IN">सामान नाम</value> <value xml:lang="it">Nome prodotto</value> <value xml:lang="ja">製ååç§°</value> - <value xml:lang="nl">Produkt Naam</value> + <value xml:lang="nl">Product Naam</value> <value xml:lang="ro">Nume Produs</value> <value xml:lang="ru">Ðазвание пÑодÑкÑа</value> <value xml:lang="th">à¸à¸·à¹à¸à¸ªà¸´à¸à¸à¹à¸²</value> @@ -24552,7 +24565,7 @@ <value xml:lang="hi_IN">यह माल बà¥à¤à¤¨à¥ à¤à¥ लियॠà¤à¤ªà¤²à¤¬à¥à¤ नहà¥</value> <value xml:lang="it">Questo prodotto non è più disponibile per la vendita</value> <value xml:lang="ja">ãã®è£½åã¯ãã販売対象ã§ã¯ããã¾ãã</value> - <value xml:lang="nl">Dit produkt wordt niet langer verkocht</value> + <value xml:lang="nl">Dit product wordt niet langer verkocht</value> <value xml:lang="pt_PT">Este produto encontra-se indisponÃvel para venda</value> <value xml:lang="ro">Acest produs nu mai este disponibil pentru vanzare.</value> <value xml:lang="ru">ÐÑÐ¾Ñ Ð¿ÑодÑÐºÑ Ð±Ð¾Ð»ÐµÐµ недоÑÑÑпен к пÑодаже</value> @@ -24570,7 +24583,7 @@ <value xml:lang="hi_IN">सामान नमà¥à¤¬à¤° सॠसामान नहॠमिला</value> <value xml:lang="it">Nessun prodotto con questo codice</value> <value xml:lang="ja">製åã¯ããã¾ããã製åID</value> - <value xml:lang="nl">Produkt niet gevonden met de ID</value> + <value xml:lang="nl">Product niet gevonden met de ID</value> <value xml:lang="pt_PT">Produto Não Encontrado Com Essa Identificação</value> <value xml:lang="ro">Nu gaseste Produs pe Cod Produs</value> <value xml:lang="ru">ÐÑодÑÐºÑ Ð½Ðµ Ð½Ð°Ð¹Ð´ÐµÑ Ð¿Ð¾ Product ID</value> @@ -24601,7 +24614,7 @@ <value xml:lang="fr">Cet article n'a encore aucun commentaire</value> <value xml:lang="it">Questo prodotto non è stato ancora recensito</value> <value xml:lang="ja">ãã®è£½åã¯ã¾ã 誰ãã¬ãã¥ã¼ãæ¸ãã¦ãã¾ãã</value> - <value xml:lang="nl">Dit produkt is nog niet beoordeeld</value> + <value xml:lang="nl">Dit product is nog niet beoordeeld</value> <value xml:lang="pt_PT">Este produto ainda não foi revisto</value> <value xml:lang="ro">Acest produs nu a fost inca recenzat</value> <value xml:lang="ru">ÐÑзÑвов по ÑÑÐ¾Ð¼Ñ Ð¿ÑодÑкÑÑ Ð½ÐµÑ</value> @@ -24619,7 +24632,7 @@ <value xml:lang="hi_IN">यह माल बà¥à¤à¤¨à¥ à¤à¥ लियॠठà¤à¥ तठà¤à¤ªà¤²à¤¬à¥à¤ नहà¥</value> <value xml:lang="it">Questo prodotto non è ancora disponibile per la vendita</value> <value xml:lang="ja">ãã®è£½åã¯ã¾ã 販売対象ã«ãªã£ã¦ãã¾ãã</value> - <value xml:lang="nl">Dit produkt is nog niet beschikbaar voor de verkoop</value> + <value xml:lang="nl">Dit product is nog niet beschikbaar voor de verkoop</value> <value xml:lang="pt_PT">Este produto ainda não se encontra disponÃvel para venda</value> <value xml:lang="ro">Acest produs nu a fost inca pus in disponibilitate la vanzare</value> <value xml:lang="ru">ÐÑÐ¾Ñ Ð¿ÑодÑÐºÑ Ð¿Ð¾ÐºÐ° еÑе не доÑÑÑпен к пÑодаже</value> @@ -24714,7 +24727,7 @@ <value xml:lang="hi_IN">सामान à¤à¥à¤</value> <value xml:lang="it">Ricerca prodotto</value> <value xml:lang="ja">è£½åæ¤ç´¢</value> - <value xml:lang="nl">Zoek naar Produkt</value> + <value xml:lang="nl">Zoek naar Product</value> <value xml:lang="ro">Cauta Produs</value> <value xml:lang="ru">ÐоиÑк пÑодÑкÑа</value> <value xml:lang="th">à¸à¹à¸à¸«à¸²à¸ªà¸´à¸à¸à¹à¸²</value> @@ -25020,7 +25033,7 @@ <value xml:lang="hi_IN">ठनà¥à¤¤ बार दà¥à¤à¤¾ सामान</value> <value xml:lang="it">Ultimi prodotti visti</value> <value xml:lang="ja">æè¿è¡¨ç¤ºãã製å</value> - <value xml:lang="nl">Produkten het laatste bekeken</value> + <value xml:lang="nl">Laatst bekeken producten</value> <value xml:lang="pt_PT">Ãltimos Produtos Visualizados</value> <value xml:lang="ro">ultimele Produse Vazute</value> <value xml:lang="ru">ÐоÑледние пÑоÑмоÑÑÑ Ð¿ÑодÑкÑов</value> @@ -26943,7 +26956,7 @@ <value xml:lang="hi_IN">सामान à¤à¤¿ à¤à¤¾à¤¨à¥à¤ à¤à¤¿à¤à¥à¤¯à¥</value> <value xml:lang="it">Recensisci questo prodotto!</value> <value xml:lang="ja">ãã®è£½åãã¬ãã¥ã¼ãã¦ãã ãã!</value> - <value xml:lang="nl">Beoordeel dit produkt!</value> + <value xml:lang="nl">Beoordeel product!</value> <value xml:lang="ro">Revedeti Acest Produs!</value> <value xml:lang="ru">ÐапиÑиÑе оÑзÑв к ÑÑÐ¾Ð¼Ñ Ð¿ÑодÑкÑÑ!</value> <value xml:lang="th">à¸à¸£à¸§à¸à¸ªà¸à¸à¸ªà¸´à¸à¸à¹à¸²à¸à¸µà¹!</value> @@ -28757,7 +28770,7 @@ </property> <property key="ProductShowProductFacilities"> <value xml:lang="de">Alle Produkteinrichtungen anzeigen</value> - <value xml:lang="en">showProductFacilities</value> + <value xml:lang="en">Show Product Facilities</value> <value xml:lang="es">Mostrar almacenes</value> <value xml:lang="fr">Montrer les lieux de stockage de l'article</value> <value xml:lang="it">Mostra Stabilimento Prodotto</value> @@ -28885,7 +28898,7 @@ <value xml:lang="fr">Trier les commandes</value> <value xml:lang="it">Ordinamento</value> <value xml:lang="ja">ã½ã¼ãé åº</value> - <value xml:lang="nl">Sorteer bestelling</value> + <value xml:lang="nl">Sorteer order</value> <value xml:lang="ro">Tip Ordonare</value> <value xml:lang="ru">ÐоÑÑдок ÑоÑÑиÑовки</value> <value xml:lang="th">à¹à¸£à¸µà¸¢à¸à¸à¸²à¸¡à¸£à¸²à¸¢à¸à¸²à¸£à¸à¸µà¹à¸ªà¸±à¹à¸à¸à¸·à¹à¸</value> @@ -31479,4 +31492,56 @@ <value xml:lang="zh">éè´§è¿è¾ç¶æ</value> <value xml:lang="zh_TW">ééçæ </value> </property> + + + <property key="ProductVirtVarSection"> + <value xml:lang="en">Virtuals and Variants</value> + <value xml:lang="nl">Sectie 1: Virtuelen en varianten</value> + </property> + <property key="ProductDatesSection"> + <value xml:lang="en">Dates</value> + <value xml:lang="nl">Sectie 2: Data</value> + </property> + <property key="ProductInventorySection"> + <value xml:lang="en">Inventory</value> + <value xml:lang="nl">Sectie 3: Voorraad</value> + </property> + <property key="ProductMeasuresSection"> + <value xml:lang="en">Measures</value> + <value xml:lang="nl">Sectie 4: Maten</value> + </property> + <property key="ProductShippingSection"> + <value xml:lang="en">Shipping</value> + <value xml:lang="nl">Sectie 5: Zending</value> + </property> + <property key="ProductCatFacSection"> + <value xml:lang="en">Prim. Category and Facility</value> + <value xml:lang="nl">Sectie 6: Category en faciliteit</value> + </property> + <property key="ProductAmountSection"> + <value xml:lang="en">Amounts</value> + <value xml:lang="nl">Sectie 7: Bedragen</value> + </property> + <property key="ProductRatingsSetion"> + <value xml:lang="en">Ratings</value> + <value xml:lang="nl">Sectie 8: Waarderingen</value> + </property> + <property key="ProductMiscellaneousSection"> + <value xml:lang="en">Miscellaneous</value> + <value xml:lang="nl">Sectie 9: Diversen</value> + </property> + + + <property key="LotUsageReport"> + <value xml:lang="en">Lot Usage Report</value> + <value xml:lang="nl">Batch rapport</value> + </property> + <property key="Manufacturer"> + <value xml:lang="en">Manufacturer</value> + <value xml:lang="nl">Producent</value> + </property> + <property key="ManufacturerRef"> + <value xml:lang="en">Lot Ref.</value> + <value xml:lang="nl">Batch ref.</value> + </property> </resource> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/script/org/ofbiz/product/product/ProductServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/script/org/ofbiz/product/product/ProductServices.xml?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/script/org/ofbiz/product/product/ProductServices.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/script/org/ofbiz/product/product/ProductServices.xml Mon Nov 3 06:54:16 2014 @@ -445,35 +445,7 @@ under the License. <call-service service-name="countProductView" in-map-name="callSubMap"></call-service> </if-not-empty> </simple-method> - <simple-method method-name="countProductQuantityOrdered" short-description="Count Product Quantity Ordered" login-required="true"> - <if-empty field="parameters.quantity"> - <calculate field="parameters.quantity" type="BigDecimal"><number value="1"/></calculate> - </if-empty> - <entity-one entity-name="ProductCalculatedInfo" value-field="productCalculatedInfo"/> - <if-empty field="productCalculatedInfo"> - <!-- go ahead and create it --> - <make-value value-field="productCalculatedInfo" entity-name="ProductCalculatedInfo"/> - <set from-field="parameters.productId" field="productCalculatedInfo.productId"/> - <set from-field="parameters.quantity" field="productCalculatedInfo.totalQuantityOrdered"/> - <create-value value-field="productCalculatedInfo"/> - <else> - <set field="productCalculatedInfo.totalQuantityOrdered" value="${productCalculatedInfo.totalQuantityOrdered + parameters.quantity}" type="BigDecimal"/> - <store-value value-field="productCalculatedInfo"/> - </else> - </if-empty> - - <!-- do the same for the virtual product... --> - <entity-one entity-name="Product" value-field="product" use-cache="true"/> - <call-class-method class-name="org.ofbiz.product.product.ProductWorker" method-name="getVariantVirtualId" ret-field="virtualProductId"> - <field field="product" type="GenericValue"/> - </call-class-method> - <if-not-empty field="virtualProductId"> - <set from-field="virtualProductId" field="callSubMap.productId"/> - <set from-field="parameters.quantity" field="callSubMap.quantity"/> - <call-service service-name="countProductQuantityOrdered" in-map-name="callSubMap"></call-service> - </if-not-empty> - </simple-method> - + <simple-method method-name="createProductReview" short-description="Create a ProductReview" login-required="false"> <make-value value-field="newEntity" entity-name="ProductReview"/> <set-nonpk-fields map="parameters" value-field="newEntity"/> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services.xml?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services.xml Mon Nov 3 06:54:16 2014 @@ -175,13 +175,7 @@ under the License. <attribute name="productId" type="String" mode="IN" optional="false"/> <attribute name="weight" type="Long" mode="IN" optional="true"/> </service> - <service name="countProductQuantityOrdered" engine="simple" - location="component://product/script/org/ofbiz/product/product/ProductServices.xml" invoke="countProductQuantityOrdered" auth="true"> - <description>count Product Quantity Ordered</description> - <attribute name="productId" type="String" mode="IN" optional="false"/> - <attribute name="quantity" type="BigDecimal" mode="IN" optional="false"/> - </service> - + <service name="createProductReview" engine="simple" location="component://product/script/org/ofbiz/product/product/ProductServices.xml" invoke="createProductReview" auth="true"> <description>Create a product review entity</description> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java Mon Nov 3 06:54:16 2014 @@ -37,6 +37,7 @@ import org.ofbiz.webapp.website.WebSiteW import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.product.category.CategoryWorker; import org.ofbiz.product.store.ProductStoreWorker; @@ -213,7 +214,7 @@ public class CatalogWorker { Delegator delegator = (Delegator) request.getAttribute("delegator"); try { - GenericValue prodCatalog = delegator.findOne("ProdCatalog", UtilMisc.toMap("prodCatalogId", prodCatalogId), true); + GenericValue prodCatalog = EntityQuery.use(delegator).from("ProdCatalog").where("prodCatalogId", prodCatalogId).cache().queryOne(); if (prodCatalog != null) { return prodCatalog.getString("catalogName"); @@ -252,7 +253,7 @@ public class CatalogWorker { Delegator delegator = (Delegator) request.getAttribute("delegator"); try { - return delegator.findOne("ProdCatalog", UtilMisc.toMap("prodCatalogId", prodCatalogId), true); + return EntityQuery.use(delegator).from("ProdCatalog").where("prodCatalogId", prodCatalogId).cache().queryOne(); } catch (GenericEntityException e) { Debug.logError(e, "Error looking up name for prodCatalog with id " + prodCatalogId, module); return null; @@ -347,7 +348,7 @@ public class CatalogWorker { Delegator delegator = (Delegator) request.getAttribute("delegator"); try { - GenericValue prodCatalog = delegator.findOne("ProdCatalog", UtilMisc.toMap("prodCatalogId", prodCatalogId), true); + GenericValue prodCatalog = EntityQuery.use(delegator).from("ProdCatalog").where("prodCatalogId", prodCatalogId).cache().queryOne(); if (prodCatalog != null) { return "Y".equals(prodCatalog.getString("useQuickAdd")); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java Mon Nov 3 06:54:16 2014 @@ -43,6 +43,7 @@ import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.condition.EntityCondition; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.product.product.ProductContentWrapper; import org.ofbiz.webapp.control.ContextFilter; @@ -349,7 +350,7 @@ public class CatalogUrlFilter extends Co String viewSort, String searchString) { Delegator delegator = (Delegator) request.getAttribute("delegator"); try { - GenericValue productCategory = delegator.findOne("ProductCategory", UtilMisc.toMap("productCategoryId", productCategoryId), true); + GenericValue productCategory = EntityQuery.use(delegator).from("ProductCategory").where("productCategoryId", productCategoryId).cache().queryOne(); CategoryContentWrapper wrapper = new CategoryContentWrapper(productCategory, request); List<String> trail = CategoryWorker.getTrail(request); return makeCategoryUrl(delegator, wrapper, trail, request.getContextPath(), previousCategoryId, productCategoryId, productId, viewSize, viewIndex, viewSort, @@ -426,7 +427,7 @@ public class CatalogUrlFilter extends Co Delegator delegator = (Delegator) request.getAttribute("delegator"); String url = null; try { - GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), true); + GenericValue product = EntityQuery.use(delegator).from("Product").where("productId", productId).cache().queryOne(); ProductContentWrapper wrapper = new ProductContentWrapper(product, request); List<String> trail = CategoryWorker.getTrail(request); url = makeProductUrl(delegator, wrapper, trail, request.getContextPath(), previousCategoryId, productCategoryId, productId); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java Mon Nov 3 06:54:16 2014 @@ -42,6 +42,7 @@ import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.model.ModelEntity; import org.ofbiz.entity.model.ModelUtil; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.service.LocalDispatcher; @@ -129,7 +130,7 @@ public class CategoryContentWrapper impl ModelEntity categoryModel = delegator.getModelEntity("ProductCategory"); if (categoryModel.isField(candidateFieldName)) { if (productCategory == null) { - productCategory = delegator.findOne("ProductCategory", UtilMisc.toMap("productCategoryId", productCategoryId), true); + productCategory = EntityQuery.use(delegator).from("ProductCategory").where("productCategoryId", productCategoryId).cache().queryOne(); } if (productCategory != null) { String candidateValue = productCategory.getString(candidateFieldName); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java Mon Nov 3 06:54:16 2014 @@ -18,9 +18,6 @@ *******************************************************************************/ package org.ofbiz.product.category; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.io.Writer; import java.sql.Timestamp; import java.util.List; import java.util.Locale; @@ -31,7 +28,6 @@ import javax.servlet.http.HttpServletRes import javolution.util.FastList; import javolution.util.FastMap; -import net.sf.json.JSONObject; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -48,6 +44,7 @@ import org.ofbiz.entity.condition.Entity import org.ofbiz.entity.model.ModelEntity; import org.ofbiz.entity.util.EntityFindOptions; import org.ofbiz.entity.util.EntityListIterator; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.product.catalog.CatalogWorker; import org.ofbiz.product.product.ProductWorker; @@ -71,7 +68,7 @@ public class CategoryServices { List<GenericValue> members = null; try { - productCategory = delegator.findOne("ProductCategory", UtilMisc.toMap("productCategoryId", categoryId), true); + productCategory = EntityQuery.use(delegator).from("ProductCategory").where("productCategoryId", categoryId).cache().queryOne(); members = EntityUtil.filterByDate(productCategory.getRelated("ProductCategoryMember", null, UtilMisc.toList("sequenceNum"), true), true); if (Debug.verboseOn()) Debug.logVerbose("Category: " + productCategory + " Member Size: " + members.size() + " Members: " + members, module); } catch (GenericEntityException e) { @@ -107,7 +104,7 @@ public class CategoryServices { GenericValue productCategory; List<GenericValue> productCategoryMembers; try { - productCategory = delegator.findOne("ProductCategory", UtilMisc.toMap("productCategoryId", categoryId), true); + productCategory = EntityQuery.use(delegator).from("ProductCategory").where("productCategoryId", categoryId).cache().queryOne(); productCategoryMembers = delegator.findByAnd(entityName, UtilMisc.toMap("productCategoryId", categoryId), orderByFields, true); } catch (GenericEntityException e) { Debug.logInfo(e, "Error finding previous/next product info: " + e.toString(), module); @@ -257,7 +254,7 @@ public class CategoryServices { GenericValue productCategory = null; try { - productCategory = delegator.findOne("ProductCategory", UtilMisc.toMap("productCategoryId", productCategoryId), true); + productCategory = EntityQuery.use(delegator).from("ProductCategory").where("productCategoryId", productCategoryId).cache().queryOne(); } catch (GenericEntityException e) { Debug.logWarning(e.getMessage(), module); productCategory = null; @@ -433,7 +430,7 @@ public class CategoryServices { // Please note : the structure of map in this function is according to the JSON data map of the jsTree @SuppressWarnings("unchecked") - public static void getChildCategoryTree(HttpServletRequest request, HttpServletResponse response){ + public static String getChildCategoryTree(HttpServletRequest request, HttpServletResponse response){ Delegator delegator = (Delegator) request.getAttribute("delegator"); String productCategoryId = request.getParameter("productCategoryId"); String isCatalog = request.getParameter("isCatalog"); @@ -527,42 +524,13 @@ public class CategoryServices { categoryList.add(josonMap); } List<Map<Object, Object>> sortedCategoryList = UtilMisc.sortMaps(categoryList, sortList); - toJsonObjectList(sortedCategoryList,response); + request.setAttribute("treeData", sortedCategoryList); } } } catch (GenericEntityException e) { Debug.logWarning(e, module); + return "error"; } - } - - public static void toJsonObjectList(List attrList, HttpServletResponse response){ - StringBuilder jsonBuilder = new StringBuilder("["); - for (Object attrMap : attrList) { - JSONObject json = JSONObject.fromObject(attrMap); - jsonBuilder.append(json.toString()); - jsonBuilder.append(','); - } - jsonBuilder.append("{ } ]"); - String jsonStr = jsonBuilder.toString(); - if (UtilValidate.isEmpty(jsonStr)) { - Debug.logError("JSON Object was empty; fatal error!",module); - } - // set the X-JSON content type - response.setContentType("application/json"); - // jsonStr.length is not reliable for unicode characters - try { - response.setContentLength(jsonStr.getBytes("UTF8").length); - } catch (UnsupportedEncodingException e) { - Debug.logError("Problems with Json encoding",module); - } - // return the JSON String - Writer out; - try { - out = response.getWriter(); - out.write(jsonStr); - out.flush(); - } catch (IOException e) { - Debug.logError("Unable to get response writer",module); - } + return "success"; } } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryWorker.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryWorker.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryWorker.java Mon Nov 3 06:54:16 2014 @@ -43,6 +43,7 @@ import org.ofbiz.entity.GenericEntityExc import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityOperator; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.product.product.ProductWorker; import org.ofbiz.service.DispatchContext; @@ -366,7 +367,7 @@ public class CategoryWorker { UtilMisc.toMap("productCategoryId", productCategoryId, "productId", productId), null, true), true); if (UtilValidate.isEmpty(productCategoryMembers)) { //before giving up see if this is a variant product, and if so look up the virtual product and check it... - GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), true); + GenericValue product = EntityQuery.use(delegator).from("Product").where("productId", productId).cache().queryOne(); List<GenericValue> productAssocs = ProductWorker.getVariantVirtualAssocs(product); //this does take into account that a product could be a variant of multiple products, but this shouldn't ever really happen... if (productAssocs != null) { Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/config/ProductConfigItemContentWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/config/ProductConfigItemContentWrapper.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/config/ProductConfigItemContentWrapper.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/config/ProductConfigItemContentWrapper.java Mon Nov 3 06:54:16 2014 @@ -40,6 +40,7 @@ import org.ofbiz.entity.DelegatorFactory import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.model.ModelEntity; import org.ofbiz.entity.model.ModelUtil; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ServiceContainer; @@ -150,7 +151,7 @@ public class ProductConfigItemContentWra ModelEntity productConfigItemModel = delegator.getModelEntity("ProductConfigItem"); if (productConfigItemModel.isField(candidateFieldName)) { if (productConfigItem == null) { - productConfigItem = delegator.findOne("ProductConfigItem", UtilMisc.toMap("configItemId", configItemId), true); + productConfigItem = EntityQuery.use(delegator).from("ProductConfigItem").where("configItemId", configItemId).cache().queryOne(); } if (productConfigItem != null) { String candidateValue = productConfigItem.getString(candidateFieldName); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Mon Nov 3 06:54:16 2014 @@ -38,6 +38,7 @@ import org.ofbiz.entity.Delegator; import org.ofbiz.entity.DelegatorFactory; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ServiceContainer; @@ -96,7 +97,7 @@ public class ProductConfigWrapper implem } private void init(Delegator delegator, LocalDispatcher dispatcher, String productId, String productStoreId, String catalogId, String webSiteId, String currencyUomId, Locale locale, GenericValue autoUserLogin) throws Exception { - product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), false); + product = EntityQuery.use(delegator).from("Product").where("productId", productId).queryOne(); if (product == null || !product.getString("productTypeId").equals("AGGREGATED") && !product.getString("productTypeId").equals("AGGREGATED_SERVICE")) { throw new ProductConfigWrapperException("Product " + productId + " is not an AGGREGATED product."); } @@ -624,7 +625,7 @@ public class ProductConfigWrapper implem String variantProductId = componentOptions.get(oneComponent.getString("productId")); if (UtilValidate.isNotEmpty(variantProductId)) { - oneComponentProduct = pcw.delegator.findOne("Product", UtilMisc.toMap("productId", variantProductId), false); + oneComponentProduct = EntityQuery.use(delegator).from("Product").where("productId", variantProductId).queryOne(); } // Get the component's price Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/feature/ParametricSearch.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/feature/ParametricSearch.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/feature/ParametricSearch.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/feature/ParametricSearch.java Mon Nov 3 06:54:16 2014 @@ -37,6 +37,7 @@ import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.util.EntityListIterator; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityUtil; /** @@ -92,7 +93,7 @@ public class ParametricSearch { for (GenericValue productFeatureCatGrpAppl: productFeatureCatGrpAppls) { List<GenericValue> productFeatureGroupAppls = delegator.findByAnd("ProductFeatureGroupAppl", UtilMisc.toMap("productFeatureGroupId", productFeatureCatGrpAppl.get("productFeatureGroupId")), null, true); for (GenericValue productFeatureGroupAppl: productFeatureGroupAppls) { - GenericValue productFeature = delegator.findOne("ProductFeature", UtilMisc.toMap("productFeatureId", productFeatureGroupAppl.get("productFeatureId")), true); + GenericValue productFeature = EntityQuery.use(delegator).from("ProductFeature").where("productFeatureId", productFeatureGroupAppl.get("productFeatureId")).cache().queryOne(); String productFeatureTypeId = productFeature.getString("productFeatureTypeId"); Map<String, GenericValue> featuresByType = productFeaturesByTypeMap.get(productFeatureTypeId); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/FrameImage.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/FrameImage.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/FrameImage.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/FrameImage.java Mon Nov 3 06:54:16 2014 @@ -54,6 +54,7 @@ import org.ofbiz.base.util.string.Flexib import org.ofbiz.content.layout.LayoutWorker; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericValue; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.service.DispatchContext; import org.ofbiz.service.GenericServiceException; @@ -97,7 +98,7 @@ public class FrameImage { String frameImageName = null; try { - GenericValue contentDataResourceView = delegator.findOne("ContentDataResourceView", UtilMisc.toMap("contentId", frameContentId, "drDataResourceId", frameDataResourceId), false); + GenericValue contentDataResourceView = EntityQuery.use(delegator).from("ContentDataResourceView").where("contentId", frameContentId, "drDataResourceId", frameDataResourceId).queryOne(); frameImageName = contentDataResourceView.getString("contentName"); } catch (Exception e) { Debug.logError(e, module); @@ -357,7 +358,7 @@ public class FrameImage { String frameImageName = null; try { - GenericValue contentDataResourceView = delegator.findOne("ContentDataResourceView", UtilMisc.toMap("contentId", frameContentId, "drDataResourceId", frameDataResourceId), false); + GenericValue contentDataResourceView = EntityQuery.use(delegator).from("ContentDataResourceView").where("contentId", frameContentId, "drDataResourceId", frameDataResourceId).queryOne(); frameImageName = contentDataResourceView.getString("contentName"); } catch (Exception e) { request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java Mon Nov 3 06:54:16 2014 @@ -26,30 +26,17 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; -import java.io.UnsupportedEncodingException; -import java.io.Writer; import java.nio.ByteBuffer; -import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Map; import javax.imageio.ImageIO; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; import javolution.util.FastList; import javolution.util.FastMap; -import net.sf.json.JSONObject; - -import org.apache.commons.fileupload.FileItem; -import org.apache.commons.fileupload.FileUploadException; -import org.apache.commons.fileupload.disk.DiskFileItemFactory; -import org.apache.commons.fileupload.servlet.ServletFileUpload; import org.jdom.JDOMException; import org.ofbiz.base.util.Debug; -import org.ofbiz.base.util.FileUtil; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; @@ -60,13 +47,12 @@ import org.ofbiz.common.image.ImageTrans import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.service.DispatchContext; import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ServiceUtil; -import org.ofbiz.webapp.event.EventHandlerException; - /** * Product Services @@ -75,7 +61,6 @@ public class ImageManagementServices { public static final String module = ImageManagementServices.class.getName(); public static final String resource = "ProductErrorUiLabels"; - private static List<Map<String,Object>> josonMap = null; private static int imageCount = 0; private static String imagePath; @@ -467,7 +452,7 @@ public class ImageManagementServices { GenericValue content = null; try { - content = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false); + content = EntityQuery.use(delegator).from("Content").where("contentId", contentId).queryOne(); } catch (GenericEntityException e) { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); @@ -648,131 +633,7 @@ public class ImageManagementServices { result.put("scaleFactor", scaleFactor); return result; } - - public static String multipleUploadImage(HttpServletRequest request, HttpServletResponse response) throws IOException, JDOMException { - HttpSession session = request.getSession(true); - GenericValue userLogin = (GenericValue) session.getAttribute("userLogin"); - LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher"); - - Map<String, String> formInput = FastMap.newInstance(); - ServletFileUpload fu = new ServletFileUpload(new DiskFileItemFactory(10240, FileUtil.getFile("runtime/tmp"))); - List<FileItem> lst = null; - try { - lst = UtilGenerics.checkList(fu.parseRequest(request)); - } catch (FileUploadException e4) { - return e4.getMessage(); - } - - FileItem fi = null; - FileItem imageFi = null; - byte[] imageBytes = {}; - for (int i=0; i < lst.size(); i++) { - fi = lst.get(i); - String fieldName = fi.getFieldName(); - if (fi.isFormField()) { - String fieldStr = fi.getString(); - formInput.put(fieldName, fieldStr); - } else if (fieldName.startsWith("imageData")) { - Map<String, Object> passedParams = FastMap.newInstance(); - Map<String, Object> contentLength = FastMap.newInstance(); - if(josonMap == null){ - josonMap = FastList.newInstance(); - } - imageFi = fi; - String fileName = fi.getName(); - String contentType = fi.getContentType(); - imageBytes = imageFi.get(); - ByteBuffer byteWrap = ByteBuffer.wrap(imageBytes); - passedParams.put("userLogin", userLogin); - passedParams.put("productId", formInput.get("productId")); - passedParams.put("productContentTypeId", "IMAGE"); - passedParams.put("_uploadedFile_fileName", fileName); - passedParams.put("_uploadedFile_contentType", contentType); - passedParams.put("uploadedFile", byteWrap); - passedParams.put("imageResize", formInput.get("imageResize")); - contentLength.put("imageSize", imageFi.getSize()); - josonMap.add(contentLength); - - if (passedParams.get("productId") != null) { - try { - dispatcher.runSync("addMultipleuploadForProduct", passedParams); - } catch (GenericServiceException e) { - Debug.logError(e, module); - return e.getMessage(); - } - } - - } - } - return "success"; - } - - public static String progressUploadImage(HttpServletRequest request, HttpServletResponse response) throws EventHandlerException{ - toJsonObjectList(josonMap,response); - josonMap.clear(); - return "success"; - } - - public static void toJsonObject(Map<String,Object> attrMap, HttpServletResponse response){ - JSONObject json = JSONObject.fromObject(attrMap); - String jsonStr = json.toString(); - if (jsonStr == null) { - Debug.logError("JSON Object was empty; fatal error!",module); - } - // set the X-JSON content type - response.setContentType("application/json"); - // jsonStr.length is not reliable for unicode characters - try { - response.setContentLength(jsonStr.getBytes("UTF8").length); - } catch (UnsupportedEncodingException e) { - Debug.logError("Problems with Json encoding",module); - } - // return the JSON String - Writer out; - try { - out = response.getWriter(); - out.write(jsonStr); - out.flush(); - } catch (IOException e) { - Debug.logError("Unable to get response writer",module); - } - } - - public static void toJsonObjectList(List<Map<String,Object>> list, HttpServletResponse response) throws EventHandlerException { - JSONObject json = null; - List<JSONObject> jsonList = new ArrayList<JSONObject>(); - if (list != null) { - for (Map<String,Object> val : list) { - json = new JSONObject(); - for (String rowKey: val.keySet()) { - json.put(rowKey, val.get(rowKey)); - } - jsonList.add(json); - } - String jsonStr = jsonList.toString(); - if (jsonStr == null) { - throw new EventHandlerException("JSON Object was empty; fatal error!"); - } - // set the X-JSON content type - response.setContentType("application/json"); - // jsonStr.length is not reliable for unicode characters - try { - response.setContentLength(jsonStr.getBytes("UTF8").length); - } catch (UnsupportedEncodingException e) { - throw new EventHandlerException("Problems with Json encoding", e); - } - // return the JSON String - Writer out; - try { - out = response.getWriter(); - out.write(jsonStr); - out.flush(); - } catch (IOException e) { - throw new EventHandlerException("Unable to get response writer", e); - } - } - } - + public static File checkExistsImage(File file) { if (!file.exists()) { imageCount = 0; @@ -958,7 +819,7 @@ public class ImageManagementServices { } GenericValue content = null; try { - content = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false); + content = EntityQuery.use(delegator).from("Content").where("contentId", contentId).queryOne(); } catch (GenericEntityException e) { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); @@ -1017,7 +878,7 @@ public class ImageManagementServices { } GenericValue contentAssocUp = null; try { - contentAssocUp = delegator.findOne("Content", UtilMisc.toMap("contentId", contentAssoc.get("contentIdTo")), false); + contentAssocUp = EntityQuery.use(delegator).from("Content").where("contentId", contentAssoc.get("contentIdTo")).queryOne(); } catch (GenericEntityException e) { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/ImageUrlServlet.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/ImageUrlServlet.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/ImageUrlServlet.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/ImageUrlServlet.java Mon Nov 3 06:54:16 2014 @@ -36,6 +36,7 @@ import org.ofbiz.base.util.UtilMisc; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; +import org.ofbiz.entity.util.EntityQuery; /** * ControlServlet.java - Master servlet for the web application. @@ -89,11 +90,11 @@ public class ImageUrlServlet extends Htt GenericValue content = null; try { - GenericValue contentResult = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false); + GenericValue contentResult = EntityQuery.use(delegator).from("Content").where("contentId", contentId).queryOne(); if (contentResult == null) { - content = delegator.findOne("Content", UtilMisc.toMap("contentId", sizeTagElement), false); + content = EntityQuery.use(delegator).from("Content").where("contentId", sizeTagElement).queryOne(); } else { - content = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false); + content = EntityQuery.use(delegator).from("Content").where("contentId", contentId).queryOne(); } } catch (GenericEntityException e) { Debug.logError(e, module); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/WatermarkImage.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/WatermarkImage.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/WatermarkImage.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/imagemanagement/WatermarkImage.java Mon Nov 3 06:54:16 2014 @@ -48,6 +48,7 @@ import org.ofbiz.base.util.string.Flexib import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ServiceUtil; @@ -280,7 +281,7 @@ public class WatermarkImage{ GenericValue content = null; try { - content = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false); + content = EntityQuery.use(delegator).from("Content").where("contentId", contentId).queryOne(); } catch (GenericEntityException e) { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Mon Nov 3 06:54:16 2014 @@ -46,6 +46,7 @@ import org.ofbiz.entity.condition.Entity import org.ofbiz.entity.model.DynamicViewEntity; import org.ofbiz.entity.model.ModelKeyMap; import org.ofbiz.entity.util.EntityListIterator; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityTypeUtil; import org.ofbiz.service.DispatchContext; import org.ofbiz.service.GenericServiceException; @@ -73,7 +74,7 @@ public class InventoryServices { Locale locale = (Locale) context.get("locale"); try { - inventoryItem = delegator.findOne("InventoryItem", UtilMisc.toMap("inventoryItemId", inventoryItemId), false); + inventoryItem = EntityQuery.use(delegator).from("InventoryItem").where("inventoryItemId", inventoryItemId).queryOne(); } catch (GenericEntityException e) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ProductNotFindInventoryItemWithId", locale) + inventoryItemId); @@ -875,7 +876,7 @@ public class InventoryServices { Map<String, String> contextInput = UtilMisc.toMap("productId", productId, "facilityId", facilityId, "statusId", statusId); GenericValue product = null; try { - product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), false); + product = EntityQuery.use(delegator).from("Product").where("productId", productId).queryOne(); } catch (GenericEntityException e) { // TODO Auto-generated catch block e.printStackTrace(); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/price/PriceServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/price/PriceServices.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/price/PriceServices.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/price/PriceServices.java Mon Nov 3 06:54:16 2014 @@ -41,6 +41,7 @@ import org.ofbiz.entity.GenericEntityExc import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityOperator; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.entity.util.EntityUtilProperties; import org.ofbiz.product.product.ProductWorker; @@ -109,7 +110,7 @@ public class PriceServices { GenericValue productStore = null; try { // we have a productStoreId, if the corresponding ProductStore.primaryStoreGroupId is not empty, use that - productStore = delegator.findOne("ProductStore", UtilMisc.toMap("productStoreId", productStoreId), true); + productStore = EntityQuery.use(delegator).from("ProductStore").where("productStoreId", productStoreId).cache().queryOne(); } catch (GenericEntityException e) { Debug.logError(e, "Error getting product store info from the database while calculating price" + e.toString(), module); return ServiceUtil.returnError(UtilProperties.getMessage(resource, @@ -277,7 +278,7 @@ public class PriceServices { BigDecimal curDefaultPrice = curDefaultPriceValue.getBigDecimal("price"); if (minDefaultPrice == null || curDefaultPrice.compareTo(minDefaultPrice) < 0) { // check to see if the product is discontinued for sale before considering it the lowest price - GenericValue curVariantProduct = delegator.findOne("Product", UtilMisc.toMap("productId", curVariantProductId), true); + GenericValue curVariantProduct = EntityQuery.use(delegator).from("Product").where("productId", curVariantProductId).cache().queryOne(); if (curVariantProduct != null) { Timestamp salesDiscontinuationDate = curVariantProduct.getTimestamp("salesDiscontinuationDate"); if (salesDiscontinuationDate == null || salesDiscontinuationDate.after(nowTimestamp)) { @@ -769,7 +770,7 @@ public class PriceServices { productPriceRules = FastList.newInstance(); for (String productPriceRuleId: productPriceRuleIds) { - GenericValue productPriceRule = delegator.findOne("ProductPriceRule", UtilMisc.toMap("productPriceRuleId", productPriceRuleId), true); + GenericValue productPriceRule = EntityQuery.use(delegator).from("ProductPriceRule").where("productPriceRuleId", productPriceRuleId).cache().queryOne(); if (productPriceRule == null) continue; productPriceRules.add(productPriceRule); } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductContentWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductContentWrapper.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductContentWrapper.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductContentWrapper.java Mon Nov 3 06:54:16 2014 @@ -43,6 +43,7 @@ import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.model.ModelEntity; import org.ofbiz.entity.model.ModelUtil; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.service.LocalDispatcher; @@ -152,7 +153,7 @@ public class ProductContentWrapper imple String candidateFieldName = ModelUtil.dbNameToVarName(productContentTypeId); ModelEntity productModel = delegator.getModelEntity("Product"); if (product == null) { - product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), true); + product = EntityQuery.use(delegator).from("Product").where("productId", productId).cache().queryOne(); } if (UtilValidate.isEmpty(product)) { Debug.logWarning("No Product entity found for productId: " + productId, module); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductEvents.java?rev=1636282&r1=1636281&r2=1636282&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductEvents.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductEvents.java Mon Nov 3 06:54:16 2014 @@ -52,6 +52,7 @@ import org.ofbiz.entity.condition.Entity import org.ofbiz.entity.transaction.GenericTransactionException; import org.ofbiz.entity.transaction.TransactionUtil; import org.ofbiz.entity.util.EntityListIterator; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.product.store.ProductStoreWorker; import org.ofbiz.security.Security; @@ -230,11 +231,11 @@ public class ProductEvents { Timestamp fromDate = null; try { - if (delegator.findOne("Product", UtilMisc.toMap("productId", productId), false) == null) { + if (EntityQuery.use(delegator).from("Product").where("productId", productId).queryOne() == null) { Map<String, String> messageMap = UtilMisc.toMap("productId", productId); errMsgList.add(UtilProperties.getMessage(resource,"productevents.product_with_id_not_found", messageMap, UtilHttp.getLocale(request))); } - if (delegator.findOne("Product", UtilMisc.toMap("productId", productIdTo), false) == null) { + if (EntityQuery.use(delegator).from("Product").where("productId", productIdTo).queryOne() == null) { Map<String, String> messageMap = UtilMisc.toMap("productIdTo", productIdTo); errMsgList.add(UtilProperties.getMessage(resource,"productevents.product_To_with_id_not_found", messageMap, UtilHttp.getLocale(request))); } @@ -433,7 +434,7 @@ public class ProductEvents { if (variantProductId == null) { // only single product to update String productId = request.getParameter("productId"); - GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), false); + GenericValue product = EntityQuery.use(delegator).from("Product").where("productId", productId).queryOne(); product.set("lastModifiedDate", nowTimestamp); product.setString("lastModifiedByUserLogin", userLogin.getString("userLoginId")); try { @@ -472,7 +473,7 @@ public class ProductEvents { int attribIdx = 0; String productId = variantProductId; do { - GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), false); + GenericValue product = EntityQuery.use(delegator).from("Product").where("productId", productId).queryOne(); try { product.set("productHeight", parseBigDecimalForEntity(request.getParameter("productHeight" + attribIdx))); product.set("productWidth", parseBigDecimalForEntity(request.getParameter("productWidth" + attribIdx))); @@ -533,8 +534,8 @@ public class ProductEvents { private static void setOrCreateProdFeature(Delegator delegator, String productId, List<GenericValue> currentProductFeatureAndAppls, String uomId, String productFeatureTypeId, BigDecimal numberSpecified) throws GenericEntityException { - GenericValue productFeatureType = delegator.findOne("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", productFeatureTypeId), false); - GenericValue uom = delegator.findOne("Uom", UtilMisc.toMap("uomId", uomId), false); + GenericValue productFeatureType = EntityQuery.use(delegator).from("ProductFeatureType").where("productFeatureTypeId", productFeatureTypeId).queryOne(); + GenericValue uom = EntityQuery.use(delegator).from("Uom").where("uomId", uomId).queryOne(); Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); @@ -572,7 +573,7 @@ public class ProductEvents { // if there is a productFeatureCategory with the same id as the productFeatureType, use that category. // otherwise, use a default category from the configuration - if (delegator.findOne("ProductFeatureCategory", UtilMisc.toMap("productFeatureCategoryId", productFeatureTypeId), false) == null) { + if (EntityQuery.use(delegator).from("ProductFeatureCategory").where("productFeatureCategoryId", productFeatureTypeId).queryOne() == null) { GenericValue productFeatureCategory = delegator.makeValue("ProductFeatureCategory"); productFeatureCategory.set("productFeatureCategoryId", productFeatureTypeId); productFeatureCategory.set("description", productFeatureType.get("description")); @@ -605,7 +606,7 @@ public class ProductEvents { try { boolean beganTransaction = TransactionUtil.begin(); try { - GenericValue productFeatureType = delegator.findOne("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", productFeatureTypeId), false); + GenericValue productFeatureType = EntityQuery.use(delegator).from("ProductFeatureType").where("productFeatureTypeId", productFeatureTypeId).queryOne(); if (productFeatureType == null) { String errMsg = "Error: the ProductFeature Type specified was not valid and one is require to add or update variant features."; request.setAttribute("_ERROR_MESSAGE_", errMsg); @@ -616,9 +617,9 @@ public class ProductEvents { if (variantProductId != null) { // multiple products, so use a numeric suffix to get them all int attribIdx = 0; - GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), false); + GenericValue product = EntityQuery.use(delegator).from("Product").where("productId", productId).queryOne(); do { - GenericValue variantProduct = delegator.findOne("Product", UtilMisc.toMap("productId", variantProductId), false); + GenericValue variantProduct = EntityQuery.use(delegator).from("Product").where("productId", variantProductId).queryOne(); String description = request.getParameter("description" + attribIdx); // blank means null, which means delete the feature application if ((description != null) && (description.trim().length() < 1)) { @@ -736,7 +737,7 @@ public class ProductEvents { // if there is a productFeatureCategory with the same id as the productFeatureType, use that category. // otherwise, create a category for the feature type - if (delegator.findOne("ProductFeatureCategory", UtilMisc.toMap("productFeatureCategoryId", productFeatureTypeId), false) == null) { + if (EntityQuery.use(delegator).from("ProductFeatureCategory").where("productFeatureCategoryId", productFeatureTypeId).queryOne() == null) { GenericValue productFeatureCategory = delegator.makeValue("ProductFeatureCategory"); productFeatureCategory.set("productFeatureCategoryId", productFeatureTypeId); productFeatureCategory.set("description", productFeatureType.get("description")); @@ -768,7 +769,7 @@ public class ProductEvents { String productFeatureTypeId = request.getParameter("productFeatureTypeId"); try { - GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), false); + GenericValue product = EntityQuery.use(delegator).from("Product").where("productId", productId).queryOne(); // get all the variants List<GenericValue> variantAssocs = product.getRelated("MainProductAssoc", UtilMisc.toMap("productAssocTypeId", "PRODUCT_VARIANT"), null, false); variantAssocs = EntityUtil.filterByDate(variantAssocs); @@ -1194,7 +1195,7 @@ public class ProductEvents { GenericValue userLogin = null; try { - userLogin = delegator.findOne("UserLogin", UtilMisc.toMap("userLoginId", "system"), true); + userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", "system").cache().queryOne(); } catch (GenericEntityException e) { request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); return "error"; |
Free forum by Nabble | Edit this page |