Package de.hybris.platform.variants.jalo
Class VariantsManager
java.lang.Object
de.hybris.platform.variants.jalo.VariantsManager
Deprecated.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeItemCreation(SessionContext ctx, ComposedType type, Item.ItemAttributeMap attributes) Deprecated.since agescreateBaseProduct(String code, String variantTypeCode) Deprecated.since ages - please use {see de.hybris.platform.servicelayer.model.ModelService} insteadDeprecated.since agesvoidcreateEssentialData(Map params, JspContext jspc) Deprecated.since agescreateVariantAttributeDescriptor(SessionContext ctx, Map attributeValues) Deprecated.Generated methods from old GeneratedVariantsManager startscreateVariantAttributeDescriptor(Map attributeValues) Deprecated.createVariantType(SessionContext ctx, Map attributeValues) Deprecated.createVariantType(String code) Deprecated.since ages - please use {see de.hybris.platform.servicelayer.model.ModelService} insteadcreateVariantType(Map attributeValues) Deprecated.Deprecated.since ages - shouldn't be use because of performance problems.getAssignedAttributeValues(SessionContext ctx, VariantType vt, String qualifier) Deprecated.since agesgetAssignedVariantAttributes(Product baseProduct) Deprecated.since ages - please use {see de.hybris.platform.product.VariantsService.getAssignedVariantAttributes()} insteadgetAttributeValueClass(VariantType vt, String qualifier) Deprecated.since agesstatic VariantsManagerDeprecated.getName()Deprecated.getProductAttributes(Product product, Collection ignoreAttributes) Deprecated.since agesgetVariantProductByAttributeValues(Product base, Map values) Deprecated.since ages - please use {see de.hybris.platform.product.VariantsService.getVariantProductByAttributeValues()} insteadgetVariantProductByAttributeValues(Map attributeValuesMap) Deprecated.since ages - please usegetVariantProductByAttributeValues(Product, Map)insteadgetVariantProductByAttributeValues(Map<AttributeDescriptor, Object> attributeValuesMap, String variantTypeCode) Deprecated.since ages - please use {see de.hybris.platform.product.VariantsService.getVariantProductByAttributeValues()} insteadgetVariants(Product item) Deprecated.getVariants(SessionContext ctx, Product baseProduct) Deprecated.since ages - covered by ProductModelgetVariantType(Product item) Deprecated.getVariantType(SessionContext ctx, Product item) Deprecated.getVariantTypesByAttributes(Map<String, Type> attributeMap, boolean matchExact) Deprecated.since agesbooleanisBaseProduct(Product product) Deprecated.since ages - covered by ProductModelbooleanDeprecated.Part ofDataCreatorinterface.voidremoveVariants(SessionContext ctx, Collection<VariantProduct> variants, Product baseProduct) Deprecated.since ages - covered by ProductModelvoidremoveVariants(Collection<VariantProduct> variants, Product baseProduct) Deprecated.since ages - covered by ProductModelvoidsetVariants(Product item, Collection<VariantProduct> value) Deprecated.voidsetVariants(SessionContext ctx, Product baseProduct, 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
-
Constructor Details
-
VariantsManager
public VariantsManager()Deprecated.
-
-
Method Details
-
beforeItemCreation
@Deprecated(since="ages", forRemoval=false) 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
Deprecated.- Returns:
- instance of this manager
-
createVariantType
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(since="ages", forRemoval=false) public Map<AttributeDescriptor,Object> getProductAttributes(Product product, 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(since="ages", forRemoval=false) public Collection getAssignedAttributeValues(SessionContext ctx, VariantType vt, String qualifier) Deprecated.since agesSearches all assigned values of the assigned variant type.- Parameters:
ctx-vt-qualifier-- Returns:
- the assigned values
-
getAssignedVariantAttributes
@Deprecated(since="ages", forRemoval=false) public Map<String,Collection> getAssignedVariantAttributes(Product baseProduct) throws JaloInvalidParameterException, JaloSecurityException Deprecated.since ages - please use {see de.hybris.platform.product.VariantsService.getAssignedVariantAttributes()} instead -
getAttributeValueClass
@Deprecated(since="ages", forRemoval=false) public Class getAttributeValueClass(VariantType vt, String qualifier) Deprecated.since agesReturns the class of the specified variant type attribute.- Parameters:
vt-qualifier-- Returns:
- the attribute value class
-
getVariantTypesByAttributes
@Deprecated(since="ages", forRemoval=false) public Collection<VariantType> getVariantTypesByAttributes(Map<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(since="ages", forRemoval=false) public Collection getVariantProductByAttributeValues(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(since="ages", forRemoval=false) public Collection<VariantProduct> getVariantProductByAttributeValues(Map<AttributeDescriptor, Object> attributeValuesMap, 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(since="ages", forRemoval=false) public Collection<VariantProduct> getVariantProductByAttributeValues(Product base, 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(since="ages", forRemoval=false) public void createEssentialData(Map params, JspContext jspc) throws Exception Deprecated.since ages- Throws:
Exception
-
createBaseProductsSearch
Deprecated.since ages -
createBaseProduct
@Deprecated(since="ages", forRemoval=false) public Product createBaseProduct(String code, 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(since="ages", forRemoval=false) public void setVariants(SessionContext ctx, Product baseProduct, Collection variants) Deprecated.since ages -
getAllBaseProducts
@Deprecated(since="ages", forRemoval=false) public 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.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(since="ages", forRemoval=false) public 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(since="ages", forRemoval=false) public void removeVariants(Collection<VariantProduct> variants, Product baseProduct) Deprecated.since ages - covered by ProductModelRemoves the specified variants from the assigned product.- Parameters:
variants-baseProduct-
-
removeVariants
@Deprecated(since="ages", forRemoval=false) public void removeVariants(SessionContext ctx, Collection<VariantProduct> variants, Product baseProduct) Deprecated.since ages - covered by ProductModelRemoves the specified variants from the assigned product.- Parameters:
ctx-variants-baseProduct-
-
setVariantType
@Deprecated(since="ages", forRemoval=false) 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(since="ages", forRemoval=false) 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, Map attributeValues) Deprecated.Generated methods from old GeneratedVariantsManager starts -
createVariantAttributeDescriptor
Deprecated. -
createVariantType
Deprecated. -
createVariantType
Deprecated. -
getName
Deprecated. -
getVariants
Deprecated. -
setVariants
Deprecated. -
getVariantType
Deprecated. -
getVariantType
Deprecated.
-
The UML diagram: