Class BreadcrumbRetriever

    • Method Detail

      • fetchCategoriesBreadcrumbs

        protected List<? extends com.adobe.cq.commerce.magento.graphql.CategoryInterface> fetchCategoriesBreadcrumbs()
        Executes the GraphQL query and returns an array of categories with breadcrumbs information. For subsequent calls of this method, a cached response is returned.
        Returns:
        The list of categories with breadcrumbs information.
      • fetchProductName

        protected String fetchProductName()
        Executes the GraphQL query and returns the name of the product. This assumes that setProductIdentifier(ProductIdentifierType, String) has been called before. For subsequent calls of this method, a cached response is returned.
        Returns:
        The product name.
      • setProductIdentifier

        protected void setProductIdentifier​(UrlProvider.ProductIdentifierType productIdentifierType,
                                            String productIdentifier)
        Set the identifier and the identifier type of the product that should be fetched. Setting the identifier, removes any cached data.
        Parameters:
        productIdentifierType - The product identifier type.
        productIdentifier - The product identifier.
      • setCategoryIdentifier

        protected void setCategoryIdentifier​(UrlProvider.CategoryIdentifierType categoryIdentifierType,
                                             String categoryIdentifier)
        Set the identifier and the identifier type of the category that should be fetched. Setting the identifier, removes any cached data.
        Parameters:
        categoryIdentifierType - The category identifier type.
        categoryIdentifier - The category identifier.
      • executeQuery

        protected com.adobe.cq.commerce.graphql.client.GraphqlResponse<com.adobe.cq.commerce.magento.graphql.Query,​com.adobe.cq.commerce.magento.graphql.gson.Error> executeQuery()
        Description copied from class: AbstractRetriever
        Execute the GraphQL query with the GraphQL client.
        Specified by:
        executeQuery in class AbstractRetriever
        Returns:
        GraphqlResponse object
      • generateProductQuery

        protected String generateProductQuery()
        Generate a complete breadcrumbs GraphQL query with a filter for the product identifier.
        Returns:
        GraphQL query as string
      • generateCategoryQuery

        protected String generateCategoryQuery()
        Generate a complete breadcrumbs GraphQL query with a filter for the category identifier.
        Returns:
        GraphQL query as string