Class ProductServices


  • public class ProductServices
    extends java.lang.Object
    Product Services
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String module  
      static java.lang.String resource  
      static java.lang.String resourceError  
    • Constructor Summary

      Constructors 
      Constructor Description
      ProductServices()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,​java.lang.Object> addAdditionalViewForProduct​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> addImageForProductPromo​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> findProductById​(DispatchContext ctx, java.util.Map<java.lang.String,​java.lang.Object> context)
      Finds productId(s) corresponding to a product reference, productId or a GoodIdentification idValue
      static java.util.Map<java.lang.String,​java.lang.Object> prodFindAllVariants​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Creates a Collection of product entities which are variant products from the specified product ID.
      static java.util.Map<java.lang.String,​java.lang.Object> prodFindAssociatedByType​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Finds associated products by product ID and association ID.
      static java.util.Map<java.lang.String,​java.lang.Object> prodFindFeatureTypes​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Finds a Set of feature types in sequence.
      static java.util.Map<java.lang.String,​java.lang.Object> prodFindProduct​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Finds a product by product ID.
      static java.util.Map<java.lang.String,​java.lang.Object> prodFindSelectedVariant​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Finds a specific product or products which contain the selected features.
      static java.util.Map<java.lang.String,​java.lang.Object> prodGetFeatures​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Gets the product features of a product.
      static java.util.Map<java.lang.String,​java.lang.Object> prodMakeFeatureTree​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Builds a variant feature tree.
      static java.util.Map<java.lang.String,​java.lang.Object> quickAddVariant​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> quickCreateVirtualWithVariants​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      This will create a virtual product and return its ID, and associate all of the variants with it.
      static java.util.Map<java.lang.String,​java.lang.Object> updateProductIfAvailableFromShipment​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • module

        public static final java.lang.String module
    • Constructor Detail

      • ProductServices

        public ProductServices()
    • Method Detail

      • prodFindAllVariants

        public static java.util.Map<java.lang.String,​java.lang.Object> prodFindAllVariants​(DispatchContext dctx,
                                                                                                 java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Creates a Collection of product entities which are variant products from the specified product ID.
      • prodFindSelectedVariant

        public static java.util.Map<java.lang.String,​java.lang.Object> prodFindSelectedVariant​(DispatchContext dctx,
                                                                                                     java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Finds a specific product or products which contain the selected features.
      • prodFindFeatureTypes

        public static java.util.Map<java.lang.String,​java.lang.Object> prodFindFeatureTypes​(DispatchContext dctx,
                                                                                                  java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Finds a Set of feature types in sequence.
      • prodMakeFeatureTree

        public static java.util.Map<java.lang.String,​java.lang.Object> prodMakeFeatureTree​(DispatchContext dctx,
                                                                                                 java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Builds a variant feature tree.
      • prodGetFeatures

        public static java.util.Map<java.lang.String,​java.lang.Object> prodGetFeatures​(DispatchContext dctx,
                                                                                             java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Gets the product features of a product.
      • prodFindProduct

        public static java.util.Map<java.lang.String,​java.lang.Object> prodFindProduct​(DispatchContext dctx,
                                                                                             java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Finds a product by product ID.
      • prodFindAssociatedByType

        public static java.util.Map<java.lang.String,​java.lang.Object> prodFindAssociatedByType​(DispatchContext dctx,
                                                                                                      java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Finds associated products by product ID and association ID.
      • quickAddVariant

        public static java.util.Map<java.lang.String,​java.lang.Object> quickAddVariant​(DispatchContext dctx,
                                                                                             java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • quickCreateVirtualWithVariants

        public static java.util.Map<java.lang.String,​java.lang.Object> quickCreateVirtualWithVariants​(DispatchContext dctx,
                                                                                                            java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        This will create a virtual product and return its ID, and associate all of the variants with it. It will not put the selectable features on the virtual or standard features on the variant.
      • updateProductIfAvailableFromShipment

        public static java.util.Map<java.lang.String,​java.lang.Object> updateProductIfAvailableFromShipment​(DispatchContext dctx,
                                                                                                                  java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • addAdditionalViewForProduct

        public static java.util.Map<java.lang.String,​java.lang.Object> addAdditionalViewForProduct​(DispatchContext dctx,
                                                                                                         java.util.Map<java.lang.String,​? extends java.lang.Object> context)
                                                                                                  throws org.apache.commons.imaging.ImageReadException
        Throws:
        org.apache.commons.imaging.ImageReadException
      • findProductById

        public static java.util.Map<java.lang.String,​java.lang.Object> findProductById​(DispatchContext ctx,
                                                                                             java.util.Map<java.lang.String,​java.lang.Object> context)
        Finds productId(s) corresponding to a product reference, productId or a GoodIdentification idValue
        Parameters:
        ctx - the dispatch context
        context - productId use to search with productId or goodIdentification.idValue
        Returns:
        a GenericValue with a productId and a List of complementary productId found
      • addImageForProductPromo

        public static java.util.Map<java.lang.String,​java.lang.Object> addImageForProductPromo​(DispatchContext dctx,
                                                                                                     java.util.Map<java.lang.String,​? extends java.lang.Object> context)