Package de.hybris.platform.variants.jalo
Class VariantsManager
- java.lang.Object
-
- de.hybris.platform.variants.jalo.VariantsManager
-
@Deprecated public class VariantsManager extends java.lang.ObjectDeprecated.since ages - please use {see de.hybris.platform.product.VariantsService} instead This is the extension manager of the Variants extension.
The UML diagram:
TODO remove Foo - merge test
-
-
Constructor Summary
Constructors Constructor Description VariantsManager()Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidbeforeItemCreation(SessionContext ctx, ComposedType type, Item.ItemAttributeMap attributes)Deprecated.since agesProductcreateBaseProduct(java.lang.String code, java.lang.String variantTypeCode)Deprecated.since ages - please use {see de.hybris.platform.servicelayer.model.ModelService} insteadSavedQuerycreateBaseProductsSearch()Deprecated.since agesvoidcreateEssentialData(java.util.Map params, JspContext jspc)Deprecated.since agesVariantAttributeDescriptorcreateVariantAttributeDescriptor(SessionContext ctx, java.util.Map attributeValues)Deprecated.Generated methods from old GeneratedVariantsManager startsVariantAttributeDescriptorcreateVariantAttributeDescriptor(java.util.Map attributeValues)Deprecated.VariantTypecreateVariantType(SessionContext ctx, java.util.Map attributeValues)Deprecated.VariantTypecreateVariantType(java.lang.String code)Deprecated.since ages - please use {see de.hybris.platform.servicelayer.model.ModelService} insteadVariantTypecreateVariantType(java.util.Map attributeValues)Deprecated.java.util.Collection<Product>getAllBaseProducts(SessionContext ctx)Deprecated.since ages - shouldn't be use because of performance problems.java.util.CollectiongetAssignedAttributeValues(SessionContext ctx, VariantType vt, java.lang.String qualifier)Deprecated.since agesjava.util.Map<java.lang.String,java.util.Collection>getAssignedVariantAttributes(Product baseProduct)Deprecated.since ages - please use {see de.hybris.platform.product.VariantsService.getAssignedVariantAttributes()} insteadjava.lang.ClassgetAttributeValueClass(VariantType vt, java.lang.String qualifier)Deprecated.since agesstatic VariantsManagergetInstance()Deprecated.java.lang.StringgetName()Deprecated.java.util.Map<AttributeDescriptor,java.lang.Object>getProductAttributes(Product product, java.util.Collection ignoreAttributes)Deprecated.since agesjava.util.Collection<VariantProduct>getVariantProductByAttributeValues(Product base, java.util.Map values)Deprecated.since ages - please use {see de.hybris.platform.product.VariantsService.getVariantProductByAttributeValues()} insteadjava.util.CollectiongetVariantProductByAttributeValues(java.util.Map attributeValuesMap)Deprecated.since ages - please usegetVariantProductByAttributeValues(Product, Map)insteadjava.util.Collection<VariantProduct>getVariantProductByAttributeValues(java.util.Map<AttributeDescriptor,java.lang.Object> attributeValuesMap, java.lang.String variantTypeCode)Deprecated.since ages - please use {see de.hybris.platform.product.VariantsService.getVariantProductByAttributeValues()} insteadjava.util.Collection<VariantProduct>getVariants(Product item)Deprecated.java.util.Collection<VariantProduct>getVariants(SessionContext ctx, Product baseProduct)Deprecated.since ages - covered by ProductModelVariantTypegetVariantType(Product item)Deprecated.VariantTypegetVariantType(SessionContext ctx, Product item)Deprecated.java.util.Collection<VariantType>getVariantTypesByAttributes(java.util.Map<java.lang.String,Type> attributeMap, boolean matchExact)Deprecated.since agesbooleanisBaseProduct(Product product)Deprecated.since ages - covered by ProductModelbooleanisCreatorDisabled()Deprecated.Part ofDataCreatorinterface.voidremoveVariants(SessionContext ctx, java.util.Collection<VariantProduct> variants, Product baseProduct)Deprecated.since ages - covered by ProductModelvoidremoveVariants(java.util.Collection<VariantProduct> variants, Product baseProduct)Deprecated.since ages - covered by ProductModelvoidsetVariants(Product item, java.util.Collection<VariantProduct> value)Deprecated.voidsetVariants(SessionContext ctx, Product baseProduct, java.util.Collection variants)Deprecated.since agesvoidsetVariantType(Product item, VariantType param)Deprecated.since ages - covered by ProductModelvoidsetVariantType(SessionContext ctx, Product item, VariantType param)Deprecated.since ages - covered by ProductModel
-
-
-
Method Detail
-
beforeItemCreation
@Deprecated public void beforeItemCreation(SessionContext ctx, ComposedType type, Item.ItemAttributeMap attributes) throws JaloBusinessException
Deprecated.since agesOverwritten to ensure Product.variantType and VariantProduct.baseProduct attributes are stored as initial attributes.- Throws:
JaloBusinessException
-
getInstance
public static VariantsManager getInstance()
Deprecated.- Returns:
- instance of this manager
-
createVariantType
@Deprecated public VariantType createVariantType(java.lang.String code)
Deprecated.since ages - please use {see de.hybris.platform.servicelayer.model.ModelService} insteadCreates a new variant type with the specified code.- Parameters:
code-- Returns:
- the created variant type
-
getProductAttributes
@Deprecated public java.util.Map<AttributeDescriptor,java.lang.Object> getProductAttributes(Product product, java.util.Collection ignoreAttributes)
Deprecated.since agesReturns all attributes of the specified product.Collection ignoreAttributes = Arrays.asList( new String[] { Item.TYPE, Product.NAME, VariantsConstants.Attributes.Product.VARIANTS, VariantsConstants.Attributes.Product.VARIANTTYPE, VariantsConstants.Attributes.VariantProduct.BASEPRODUCT } ); VariantsManager vm = (VariantsManager) jaloSession.getExtensionManager( ).getExtension( VariantsConstants.EXTENSIONNAME ) Product product = jaloSession.getProductManager().getProductsByCode("dummy"); Map attributes = vm.getProductAttributes( product, ignoreAttributes);- Parameters:
product- the productignoreAttributes- the attributes to be ignored (optional)- Returns:
- the attributes of the specified product
-
getAssignedAttributeValues
@Deprecated public java.util.Collection getAssignedAttributeValues(SessionContext ctx, VariantType vt, java.lang.String qualifier)
Deprecated.since agesSearches all assigned values of the assigned variant type.- Parameters:
ctx-vt-qualifier-- Returns:
- the assigned values
-
getAssignedVariantAttributes
@Deprecated public java.util.Map<java.lang.String,java.util.Collection> getAssignedVariantAttributes(Product baseProduct) throws JaloInvalidParameterException, JaloSecurityException
Deprecated.since ages - please use {see de.hybris.platform.product.VariantsService.getAssignedVariantAttributes()} instead
-
getAttributeValueClass
@Deprecated public java.lang.Class getAttributeValueClass(VariantType vt, java.lang.String qualifier)
Deprecated.since agesReturns the class of the specified variant type attribute.- Parameters:
vt-qualifier-- Returns:
- the attribute value class
-
getVariantTypesByAttributes
@Deprecated public java.util.Collection<VariantType> getVariantTypesByAttributes(java.util.Map<java.lang.String,Type> attributeMap, boolean matchExact)
Deprecated.since agesSearches variant types which attributes match the specified attribute names. and types.Map attributeMap = new HashMap(); attributeMap.put( "color" , jaloSession.getTypeManager().getType( "java.lang.String" ) ); attributeMap.put( "unit" , jaloSession.getTypeManager().getComposedType( Unit.class ) ); <p/> VariantsManager vm = (VariantsManager)jaloSession.getExtension(VariantsConstants.EXTENSIONNAME); Collection matchingVariantTypes = vm.getVariantTypesByAttributes( attributeMap );- Parameters:
attributeMap- the requested attributes as Map { String ->TypematchExact- iftrueonly types which do not have additional variant attributes are returned, otherwise all types whith the requested attribute are returned
-
getVariantProductByAttributeValues
@Deprecated public java.util.Collection getVariantProductByAttributeValues(java.util.Map attributeValuesMap)
Deprecated.since ages - please usegetVariantProductByAttributeValues(Product, Map)insteadSearches variant products which values match the specified values.Map valuesMap = new HashMap(); valuesMap.put(getSession().getTypeManager().getComposedType("Shoe").getAttributeDescriptor("color") , "Camel/Rot"); <p/> VariantsManager vm = (VariantsManager)getSession()..getExtension(VariantsConstants.EXTENSIONNAME); Collection matchingVariantProducts = vm..getVariantProductByAttributeValues( valuesMap);- Parameters:
attributeValuesMap- the requested values as Map { AttributeDescriptor -> {Object} }
-
getVariantProductByAttributeValues
@Deprecated public java.util.Collection<VariantProduct> getVariantProductByAttributeValues(java.util.Map<AttributeDescriptor,java.lang.Object> attributeValuesMap, java.lang.String variantTypeCode)
Deprecated.since ages - please use {see de.hybris.platform.product.VariantsService.getVariantProductByAttributeValues()} insteadSearches variant products which values match the specified values and variant typecode.Map valuesMap = new HashMap(); valuesMap.put(getSession().getTypeManager().getComposedType("Trousers").getAttributeDescriptor(" color"), "light broken-in"); <p/> VariantsManager vm = (VariantsManager)getSession()..getExtension(VariantsConstants.EXTENSIONNAME); Collection matchingVariantProducts = vm..getVariantProductByAttributeValues( valuesMap, "Trousers");- Parameters:
attributeValuesMap- the requested values as Map { AttributeDescriptor -> {Object} }variantTypeCode- the requested variant typecode
-
getVariantProductByAttributeValues
@Deprecated public java.util.Collection<VariantProduct> getVariantProductByAttributeValues(Product base, java.util.Map values)
Deprecated.since ages - please use {see de.hybris.platform.product.VariantsService.getVariantProductByAttributeValues()} insteadFilters a range of variants from a given base product according to the given variant attribute value map. If not all available attributes are specified the method is likely to return more than one variant - if all attributes are specified there should be only one variant which matches them.- Parameters:
base- the base product to get variants forvalues- the variant attribute values to match
-
isCreatorDisabled
public boolean isCreatorDisabled()
Deprecated.Part ofDataCreatorinterface. Returnsfalse.- Returns:
false
-
createEssentialData
@Deprecated public void createEssentialData(java.util.Map params, JspContext jspc) throws java.lang.ExceptionDeprecated.since ages- Throws:
java.lang.Exception
-
createBaseProductsSearch
@Deprecated public SavedQuery createBaseProductsSearch()
Deprecated.since ages
-
createBaseProduct
@Deprecated public Product createBaseProduct(java.lang.String code, java.lang.String variantTypeCode)
Deprecated.since ages - please use {see de.hybris.platform.servicelayer.model.ModelService} insteadCreates a typed base product with a specified variants type.- Parameters:
code- the code of the new base productvariantTypeCode- the code of the variants type
-
setVariants
@Deprecated public void setVariants(SessionContext ctx, Product baseProduct, java.util.Collection variants)
Deprecated.since ages
-
getAllBaseProducts
@Deprecated public java.util.Collection<Product> getAllBaseProducts(SessionContext ctx)
Deprecated.since ages - shouldn't be use because of performance problems.Searches all existing base products.- Parameters:
ctx-- Returns:
- the base products
-
isBaseProduct
@Deprecated public boolean isBaseProduct(Product product)
Deprecated.since ages - covered by ProductModelChecks if the assigned product is a base product. (owns the attribute 'varianttype')- Parameters:
product-- Returns:
- true if the assigned product is a base
-
getVariants
@Deprecated public java.util.Collection<VariantProduct> getVariants(SessionContext ctx, Product baseProduct)
Deprecated.since ages - covered by ProductModelSearches the variants of the assigned product.- Parameters:
ctx-baseProduct-- Returns:
- the variants of the assigned product
-
removeVariants
@Deprecated public void removeVariants(java.util.Collection<VariantProduct> variants, Product baseProduct)
Deprecated.since ages - covered by ProductModelRemoves the specified variants from the assigned product.- Parameters:
variants-baseProduct-
-
removeVariants
@Deprecated public void removeVariants(SessionContext ctx, java.util.Collection<VariantProduct> variants, Product baseProduct)
Deprecated.since ages - covered by ProductModelRemoves the specified variants from the assigned product.- Parameters:
ctx-variants-baseProduct-
-
setVariantType
@Deprecated public void setVariantType(SessionContext ctx, Product item, VariantType param)
Deprecated.since ages - covered by ProductModelSets a new variant type for the assigned product. Note: You will get an error if the product has already an assigned variant type, which owns instances.- Parameters:
ctx-item-param-
-
setVariantType
@Deprecated public void setVariantType(Product item, VariantType param)
Deprecated.since ages - covered by ProductModelSets a new variant type for the assigned product. Note: You will get an error if the product has already an assigned variant type, which owns instances- Parameters:
item-param-
-
createVariantAttributeDescriptor
public VariantAttributeDescriptor createVariantAttributeDescriptor(SessionContext ctx, java.util.Map attributeValues)
Deprecated.Generated methods from old GeneratedVariantsManager starts
-
createVariantAttributeDescriptor
public VariantAttributeDescriptor createVariantAttributeDescriptor(java.util.Map attributeValues)
Deprecated.
-
createVariantType
public VariantType createVariantType(SessionContext ctx, java.util.Map attributeValues)
Deprecated.
-
createVariantType
public VariantType createVariantType(java.util.Map attributeValues)
Deprecated.
-
getName
public java.lang.String getName()
Deprecated.
-
getVariants
public java.util.Collection<VariantProduct> getVariants(Product item)
Deprecated.
-
setVariants
public void setVariants(Product item, java.util.Collection<VariantProduct> value)
Deprecated.
-
getVariantType
public VariantType getVariantType(SessionContext ctx, Product item)
Deprecated.
-
getVariantType
public VariantType getVariantType(Product item)
Deprecated.
-
-