Package org.apache.ofbiz.product.product
Class ProductUtilServices
- java.lang.Object
-
- org.apache.ofbiz.product.product.ProductUtilServices
-
public final class ProductUtilServices extends java.lang.Object
Product Services
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
attachProductFeaturesToCategory(java.lang.String productCategoryId, java.util.Set<java.lang.String> productFeatureTypeIdsToInclude, java.util.Set<java.lang.String> productFeatureTypeIdsToExclude, Delegator delegator, boolean doSubCategories, java.sql.Timestamp nowTimestamp)
Get all features associated with products and associate them with a feature group attached to the category for each feature type; includes products associated with this category only, but will also associate all feature groups of sub-categories with this category, optionally calls this method for all sub-categories toostatic java.util.Map<java.lang.String,java.lang.Object>
attachProductFeaturesToCategory(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
static java.util.Map<java.lang.String,java.lang.Object>
clearAllVirtualProductImageNames(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
static java.util.Map<java.lang.String,java.lang.Object>
discVirtualsWithDiscVariants(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
First expire all ProductAssocs for all disc variants, then disc all virtuals that have all expired variant ProductAssocsprotected static void
duplicateRelated(GenericValue product, java.lang.String title, java.lang.String relatedEntityName, java.lang.String productIdField, java.lang.String variantProductId, java.sql.Timestamp nowTimestamp, boolean removeOld, Delegator delegator, boolean test)
static java.util.Map<java.lang.String,java.lang.Object>
makeStandAloneFromSingleVariantVirtuals(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
static java.util.Map<java.lang.String,java.lang.Object>
mergeVirtualWithSingleVariant(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
static java.util.Map<java.lang.String,java.lang.Object>
removeCategoryMembersOfDiscProducts(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
for all disc products, remove from category membershipsstatic java.util.Map<java.lang.String,java.lang.Object>
removeDuplicateOpenEndedCategoryMembers(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
static java.util.Map<java.lang.String,java.lang.Object>
setAllProductImageNames(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
reset all product image names with a certain pattern, ex: /images/products/${size}/${productId}.jpg NOTE: only works on fields of Product right now
-
-
-
Method Detail
-
discVirtualsWithDiscVariants
public static java.util.Map<java.lang.String,java.lang.Object> discVirtualsWithDiscVariants(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
First expire all ProductAssocs for all disc variants, then disc all virtuals that have all expired variant ProductAssocs
-
removeCategoryMembersOfDiscProducts
public static java.util.Map<java.lang.String,java.lang.Object> removeCategoryMembersOfDiscProducts(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
for all disc products, remove from category memberships
-
removeDuplicateOpenEndedCategoryMembers
public static java.util.Map<java.lang.String,java.lang.Object> removeDuplicateOpenEndedCategoryMembers(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
-
makeStandAloneFromSingleVariantVirtuals
public static java.util.Map<java.lang.String,java.lang.Object> makeStandAloneFromSingleVariantVirtuals(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
-
mergeVirtualWithSingleVariant
public static java.util.Map<java.lang.String,java.lang.Object> mergeVirtualWithSingleVariant(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
-
duplicateRelated
protected static void duplicateRelated(GenericValue product, java.lang.String title, java.lang.String relatedEntityName, java.lang.String productIdField, java.lang.String variantProductId, java.sql.Timestamp nowTimestamp, boolean removeOld, Delegator delegator, boolean test) throws GenericEntityException
- Throws:
GenericEntityException
-
setAllProductImageNames
public static java.util.Map<java.lang.String,java.lang.Object> setAllProductImageNames(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
reset all product image names with a certain pattern, ex: /images/products/${size}/${productId}.jpg NOTE: only works on fields of Product right now
-
clearAllVirtualProductImageNames
public static java.util.Map<java.lang.String,java.lang.Object> clearAllVirtualProductImageNames(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
-
attachProductFeaturesToCategory
public static java.util.Map<java.lang.String,java.lang.Object> attachProductFeaturesToCategory(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
-
attachProductFeaturesToCategory
public static void attachProductFeaturesToCategory(java.lang.String productCategoryId, java.util.Set<java.lang.String> productFeatureTypeIdsToInclude, java.util.Set<java.lang.String> productFeatureTypeIdsToExclude, Delegator delegator, boolean doSubCategories, java.sql.Timestamp nowTimestamp) throws GenericEntityException
Get all features associated with products and associate them with a feature group attached to the category for each feature type; includes products associated with this category only, but will also associate all feature groups of sub-categories with this category, optionally calls this method for all sub-categories too- Throws:
GenericEntityException
-
-