Class DefaultLinkedDataGeneratorImpl

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

@Service("blDefaultLinkedDataGenerator") public class DefaultLinkedDataGeneratorImpl extends AbstractLinkedDataGenerator
This generator runs for all pages.

Currently, it only generates breadcrumb structured data.

See http://schema.org/BreadcrumbList.

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

    • DefaultLinkedDataGeneratorImpl

      public DefaultLinkedDataGeneratorImpl()
  • 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
    • addBreadcrumbData

      protected org.codehaus.jettison.json.JSONObject addBreadcrumbData(jakarta.servlet.http.HttpServletRequest request) throws org.codehaus.jettison.json.JSONException
      Generates an object representing the Schema.org BreadcrumbList
      Returns:
      JSON representation of BreadcrumbList from Schema.org
      Throws:
      org.codehaus.jettison.json.JSONException