org.broadleafcommerce.core.web.processor
Class RelatedProductProcessor

java.lang.Object
  extended by org.thymeleaf.processor.AbstractProcessor
      extended by org.thymeleaf.processor.element.AbstractElementProcessor
          extended by org.broadleafcommerce.common.web.dialect.AbstractModelVariableModifierProcessor
              extended by org.broadleafcommerce.core.web.processor.RelatedProductProcessor
All Implemented Interfaces:
Comparable<org.thymeleaf.processor.IProcessor>, org.thymeleaf.processor.IProcessor

public class RelatedProductProcessor
extends AbstractModelVariableModifierProcessor

A Thymeleaf processor that will find related products. A product or category id must be specified. If both are specified, only the productId will be used. Takes in the following parameters

The output from this operation returns a list of PromotableProducts which represent the following. relatedProduct.product relatedProduct.promotionMessage.

Author:
bpolster

Constructor Summary
RelatedProductProcessor()
          Sets the name of this processor to be used in Thymeleaf template
 
Method Summary
protected  List<Product> convertRelatedProductsToProducts(List<? extends PromotableProduct> relatedProducts)
           
 int getPrecedence()
           
protected  void modifyModelAttributes(org.thymeleaf.Arguments arguments, org.thymeleaf.dom.Element element)
           
 
Methods inherited from class org.broadleafcommerce.common.web.dialect.AbstractModelVariableModifierProcessor
addToModel, processElement
 
Methods inherited from class org.thymeleaf.processor.element.AbstractElementProcessor
doProcess, getMatcher
 
Methods inherited from class org.thymeleaf.processor.AbstractProcessor
compareTo, getMessage, getMessageForProcessor, getMessageForTemplate, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelatedProductProcessor

public RelatedProductProcessor()
Sets the name of this processor to be used in Thymeleaf template

Method Detail

getPrecedence

public int getPrecedence()
Specified by:
getPrecedence in class org.thymeleaf.processor.AbstractProcessor

modifyModelAttributes

protected void modifyModelAttributes(org.thymeleaf.Arguments arguments,
                                     org.thymeleaf.dom.Element element)
Specified by:
modifyModelAttributes in class AbstractModelVariableModifierProcessor

convertRelatedProductsToProducts

protected List<Product> convertRelatedProductsToProducts(List<? extends PromotableProduct> relatedProducts)


Copyright © 2012. All Rights Reserved.