Class CategoryLinkedDataGeneratorImpl

java.lang.Object
org.broadleafcommerce.core.web.linkeddata.generator.AbstractLinkedDataGenerator
org.broadleafcommerce.core.web.linkeddata.generator.CategoryLinkedDataGeneratorImpl
All Implemented Interfaces:
LinkedDataGenerator

@Service("blCategoryLinkedDataGenerator") public class CategoryLinkedDataGeneratorImpl extends AbstractLinkedDataGenerator
This generator generates structured data specific to the category pages.

See http://schema.org/ItemList and http://schema.org/ListItem

Author:
Jacob Mitash, Nathan Moore (nathanmoore).
  • Field Details

  • Constructor Details

    • CategoryLinkedDataGeneratorImpl

      public CategoryLinkedDataGeneratorImpl()
  • Method Details

    • canHandle

      public boolean canHandle(jakarta.servlet.http.HttpServletRequest request)
      Description copied from interface: LinkedDataGenerator
      Determines whether or not this LinkedDataGenerator can handle the incoming request.
      Specified by:
      canHandle in interface LinkedDataGenerator
      Specified by:
      canHandle in class AbstractLinkedDataGenerator
      Returns:
      whether to handle the destination type
    • getLinkedDataJsonInternal

      protected org.codehaus.jettison.json.JSONArray getLinkedDataJsonInternal(String url, jakarta.servlet.http.HttpServletRequest request, org.codehaus.jettison.json.JSONArray schemaObjects) throws org.codehaus.jettison.json.JSONException
      Specified by:
      getLinkedDataJsonInternal in class AbstractLinkedDataGenerator
      Throws:
      org.codehaus.jettison.json.JSONException
    • addCategoryProductData

      protected void addCategoryProductData(jakarta.servlet.http.HttpServletRequest request, org.codehaus.jettison.json.JSONObject categoryData) throws org.codehaus.jettison.json.JSONException
      Throws:
      org.codehaus.jettison.json.JSONException
    • getProducts

      protected List<Product> getProducts(jakarta.servlet.http.HttpServletRequest request)