public class ProductVariantRuntimeHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ATTRIBUTE_NAME_RUNTIME_ID |
protected static String |
ATTRIBUTE_NAME_VARIED_PRODUCT_CMPT |
| Constructor and Description |
|---|
ProductVariantRuntimeHelper() |
| Modifier and Type | Method and Description |
|---|---|
protected ProductComponentGeneration |
createNewInstance(ProductComponentGeneration generationTemplate,
ProductComponent parentProductCmpt)
Creates a new instance of the given
ProductComponentGeneration's class. |
ProductComponent |
getOriginalProdCmpt(IRuntimeRepository runtimeRepository,
Element element) |
IProductComponentGeneration |
initProductComponentGenerationVariation(IRuntimeRepository runtimeRepository,
GenerationTocEntry tocEntry,
Element genElement)
The given generation is initialized with the data of the original product component
generation and the variations defined by the variant.
|
void |
initProductComponentVariation(ProductComponent originalProductComponent,
ProductComponent productComponentToBeInitialized,
Element prodCmptElement)
The given product component is initialized with the data of the original product component
and the variations defined by the variant.
|
boolean |
isProductVariantXML(Element productVariantElement) |
protected void |
loadAndVary(IXmlPersistenceSupport originalObject,
Element variationXML,
IClRepositoryObject objectToInitialize) |
protected static final String ATTRIBUTE_NAME_VARIED_PRODUCT_CMPT
protected static final String ATTRIBUTE_NAME_RUNTIME_ID
public void initProductComponentVariation(ProductComponent originalProductComponent, ProductComponent productComponentToBeInitialized, Element prodCmptElement)
originalProductComponent - the original product component that provides default valuesproductComponentToBeInitialized - the yet un-initialized product component.prodCmptElement - the XML element containing product component's variation data.public IProductComponentGeneration initProductComponentGenerationVariation(IRuntimeRepository runtimeRepository, GenerationTocEntry tocEntry, Element genElement)
runtimeRepository - the runtime repository calling this method. It will be used to load
the original product component.tocEntry - the GenerationTocEntry for the requested
ProductComponentGenerationgenElement - the XML element containing the variation of a product component generation.protected ProductComponentGeneration createNewInstance(ProductComponentGeneration generationTemplate, ProductComponent parentProductCmpt)
ProductComponentGeneration's class. Uses the
given ProductComponent as new parent.parentProductCmpt - the new parent component.generationTemplate - the generation a new instance is created ofProductComponentGeneration instance of the same class as this classprotected void loadAndVary(IXmlPersistenceSupport originalObject, Element variationXML, IClRepositoryObject objectToInitialize)
public ProductComponent getOriginalProdCmpt(IRuntimeRepository runtimeRepository, Element element)
public boolean isProductVariantXML(Element productVariantElement)
Copyright © 2016. All rights reserved.