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 Summary
FieldsModifier and TypeFieldDescriptionprotected org.broadleafcommerce.core.catalog.service.CatalogServiceFields inherited from class org.broadleafcommerce.core.web.linkeddata.generator.AbstractLinkedDataGenerator
baseUrlResolver, breadcrumbService, DEFAULT_STRUCTURED_CONTENT_CONTEXT, environment, extensionManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCategoryProductData(jakarta.servlet.http.HttpServletRequest request, org.codehaus.jettison.json.JSONObject categoryData) booleancanHandle(jakarta.servlet.http.HttpServletRequest request) Determines whether or not this LinkedDataGenerator can handle the incoming request.protected org.codehaus.jettison.json.JSONArraygetLinkedDataJsonInternal(String url, jakarta.servlet.http.HttpServletRequest request, org.codehaus.jettison.json.JSONArray schemaObjects) protected List<org.broadleafcommerce.core.catalog.domain.Product>getProducts(jakarta.servlet.http.HttpServletRequest request) Methods inherited from class org.broadleafcommerce.core.web.linkeddata.generator.AbstractLinkedDataGenerator
getLinkedDataJSON, getRequestParams, getRequestUri, getSiteBaseUrl, getStructuredDataContext
-
Field Details
-
catalogService
protected org.broadleafcommerce.core.catalog.service.CatalogService catalogService
-
-
Constructor Details
-
CategoryLinkedDataGeneratorImpl
public CategoryLinkedDataGeneratorImpl()
-
-
Method Details
-
canHandle
public boolean canHandle(jakarta.servlet.http.HttpServletRequest request) Description copied from interface:LinkedDataGeneratorDetermines whether or not this LinkedDataGenerator can handle the incoming request.- Specified by:
canHandlein interfaceLinkedDataGenerator- Specified by:
canHandlein classAbstractLinkedDataGenerator- 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:
getLinkedDataJsonInternalin classAbstractLinkedDataGenerator- 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<org.broadleafcommerce.core.catalog.domain.Product> getProducts(jakarta.servlet.http.HttpServletRequest request)
-