Author: lektran
Date: Sat Mar 27 20:51:04 2010
New Revision: 928265
URL: http://svn.apache.org/viewvc?rev=928265&view=rev
Log:
The following deprecated classes, constructors or methods have been removed:
org.ofbiz.product.product.ProductWorker.getProduct(PageContext, String)
org.ofbiz.product.product.ProductWorker.getProduct(PageContext, String, String)
org.ofbiz.product.product.ProductWorker.getAssociatedProducts(PageContext,
String, String)
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=928265&r1=928264&r2=928265&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
(original)
+++
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
Sat Mar 27 20:51:04 2010
@@ -62,12 +62,6 @@ public class ProductWorker {
public static final MathContext generalRounding = new MathContext(10);
- /** @deprecated */
- @Deprecated
- public static void getProduct(PageContext pageContext, String
attributeName) {
- getProduct(pageContext, attributeName, null);
- }
-
public static boolean shippingApplies(GenericValue product) {
String errMsg = "";
if (product != null) {
@@ -153,30 +147,6 @@ public class ProductWorker {
}
}
- /** @deprecated */
- @Deprecated
- public static void getProduct(PageContext pageContext, String
attributeName, String productId) {
- Delegator delegator = (Delegator)
pageContext.getRequest().getAttribute("delegator");
- ServletRequest request = pageContext.getRequest();
-
- if (productId == null)
- productId =
UtilFormatOut.checkNull(request.getParameter("product_id"),
request.getParameter("PRODUCT_ID"));
-
- if (productId.equals(""))
- return;
-
- GenericValue product = null;
-
- try {
- product = delegator.findByPrimaryKey("Product",
UtilMisc.toMap("productId", productId));
- } catch (GenericEntityException e) {
- Debug.logWarning(e.getMessage(), module);
- product = null;
- }
- if (product != null)
- pageContext.setAttribute(attributeName, product);
- }
-
public static String getInstanceAggregatedId(Delegator delegator, String
instanceProductId) throws GenericEntityException {
GenericValue instanceProduct = delegator.findByPrimaryKey("Product",
UtilMisc.toMap("productId", instanceProductId));
@@ -295,46 +265,6 @@ public class ProductWorker {
return available;
}
- /** @deprecated */
- @Deprecated
- public static void getAssociatedProducts(PageContext pageContext, String
productAttributeName, String assocPrefix) {
- GenericValue product = (GenericValue)
pageContext.getAttribute(productAttributeName);
-
- if (product == null)
- return;
-
- try {
- List<GenericValue> upgradeProducts =
product.getRelatedByAndCache("MainProductAssoc",
- UtilMisc.toMap("productAssocTypeId", "PRODUCT_UPGRADE"));
-
- List<GenericValue> complementProducts =
product.getRelatedByAndCache("MainProductAssoc",
- UtilMisc.toMap("productAssocTypeId",
"PRODUCT_COMPLEMENT"));
-
- List<GenericValue> obsolescenceProducts =
product.getRelatedByAndCache("AssocProductAssoc",
- UtilMisc.toMap("productAssocTypeId",
"PRODUCT_OBSOLESCENCE"));
-
- List<GenericValue> obsoleteByProducts =
product.getRelatedByAndCache("MainProductAssoc",
- UtilMisc.toMap("productAssocTypeId",
"PRODUCT_OBSOLESCENCE"));
-
- // since ProductAssoc records have a fromDate and thruDate, we can
filter by now so that only assocs in the date range are included
- upgradeProducts = EntityUtil.filterByDate(upgradeProducts);
- complementProducts = EntityUtil.filterByDate(complementProducts);
- obsolescenceProducts =
EntityUtil.filterByDate(obsolescenceProducts);
- obsoleteByProducts = EntityUtil.filterByDate(obsoleteByProducts);
-
- if (UtilValidate.isNotEmpty(upgradeProducts))
- pageContext.setAttribute(assocPrefix + "upgrade",
upgradeProducts);
- if (UtilValidate.isNotEmpty(complementProducts))
- pageContext.setAttribute(assocPrefix + "complement",
complementProducts);
- if (UtilValidate.isNotEmpty(obsolescenceProducts))
- pageContext.setAttribute(assocPrefix + "obsolescence",
obsolescenceProducts);
- if (UtilValidate.isNotEmpty(obsoleteByProducts))
- pageContext.setAttribute(assocPrefix + "obsoleteby",
obsoleteByProducts);
- } catch (GenericEntityException e) {
- Debug.logWarning(e, module);
- }
- }
-
/**
* Gets ProductFeature GenericValue for all distinguishing features of a
variant product.
* Distinguishing means all features that are selectable on the
corresponding virtual product and standard on the variant plus all
DISTINGUISHING_FEAT assoc type features on the variant.